09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

12.8.9 Leaving debug state<br />

Imprecise Data Aborts on entry and exit from debug state<br />

Debug<br />

The processor performs an implicit Data Synchronization Barrier (DSB) operation as part of the<br />

debug state entry sequence. If this operation detects an imprecise Data Abort, the processor<br />

records this event and its type as if the CPSR A bit was set to 1. The purpose of latching this<br />

event is to ensure that it can be taken on exit from debug state.<br />

If the processor detects an imprecise Data Abort while already in debug state, for example a<br />

debugger-generated imprecise abort, the processor sets the sticky imprecise Data Abort bit,<br />

DSCR[7], to 1 but otherwise it discards it. The act of discarding these debugger-generated<br />

imprecise Data Aborts does not affect recorded application-generated imprecise Data Aborts.<br />

Before forcing the processor to leave debug state, the debugger must execute a DSB sequence<br />

to ensure that all debugger-generated imprecise Data Aborts are detected, and therefore<br />

discarded, while still in debug state. After exiting debug state, the processor acts on any<br />

recorded imprecise Data Aborts as indicated by the CPSR A bit.<br />

Imprecise Data Aborts and watchpoints<br />

The watchpoint exception has a higher priority than an imprecise Data Abort. If a data access<br />

causes both a watchpoint and an imprecise Data Abort, the processor enters debug state before<br />

taking the imprecise Data Abort. The imprecise Data Abort is recorded. This priority order<br />

ensures correct behavior where invasive debug is not permitted in privileged modes.<br />

The debugger can force the processor to leave debug state by setting the restart request bit,<br />

DRCR[1], to 1. Another way of forcing the processor to leave debug state is through the CTI<br />

external restart request mechanism. When one of those restart requests occurs, the processor:<br />

1. Clears the DSCR[1] core restarted flag to 0.<br />

2. Leaves debug state.<br />

3. Clears the DSCR[0] core halted flag to 0.<br />

4. Drives the DBGACK signal LOW, unless the DSCR[11] DbgAck bit is set to 1.<br />

5. Starts executing instructions from the address last written to the PC in the processor mode<br />

and state indicated by the current value of the CPSR.<br />

6. Sets the DSCR[1] core restarted flag to 1.<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 12-62<br />

ID060510 Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!