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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.7 Debug exception<br />

Debug<br />

The processor takes a debug exception when a software debug event occurs while in Monitor<br />

debug-mode. Prefetch Abort and Data Abort Vector catch debug events are ignored though.<br />

If the processor takes a debug exception because of a breakpoint, BKPT, or vector catch debug<br />

event, the processor performs the following actions:<br />

• Sets the DSCR[5:2] method of entry bits to indicate that a watchpoint occurred.<br />

• Sets the CP15 IFSR and IFAR registers as described in Effect of debug exceptions on<br />

CP15 registers and WFAR on page 12-54.<br />

• Performs the same sequence of actions as in a Prefetch Abort exception by:<br />

— updating the SPSR_abt with the saved CPSR<br />

— changing the CPSR to abort mode and <strong>ARM</strong> state with normal interrupts and<br />

imprecise aborts disabled<br />

— setting R14_abt as a regular Prefetch Abort exception, that is, this register gets the<br />

address of the cancelled instruction plus 0x04<br />

— setting the PC to the appropriate Prefetch Abort vector.<br />

Note<br />

The Prefetch Abort handler checks the IFSR bit to determine if a debug exception or other kind<br />

of Prefetch Abort exception causes the exception entry. If the cause is a debug exception, the<br />

Prefetch Abort handler must branch to the debug monitor. You can find the address of the<br />

instruction to restart in the R14_abt register.<br />

If the processor takes a debug exception because of a watchpoint debug event, the processor<br />

performs the following actions:<br />

• sets the DSCR[5:2] method of debug entry bits to the Precise Watchpoint Occurred<br />

encoding<br />

• sets the CP15 DFSR, FAR, and WFAR registers as described in Effect of debug exceptions<br />

on CP15 registers and WFAR on page 12-54<br />

• performs the same sequence of actions as in a Data Abort exception by:<br />

— updating the SPSR_abt with the saved CPSR<br />

— changing the CPSR to abort mode and <strong>ARM</strong> state with normal interrupts and<br />

imprecise aborts disabled<br />

— setting R14_abt as a regular Data Abort exception, that is, this register gets the<br />

address of the cancelled instruction plus 0x08<br />

— setting the PC to the appropriate Data Abort vector.<br />

Note<br />

The Data Abort handler checks the DFSR bits to determine if the exception entry was caused<br />

by a Debug exception or other kind of Data Abort exception. If the cause is a Debug exception,<br />

the Data Abort handler must branch to the debug monitor. The address of the instruction to<br />

restart can be found in the R14_abt register.<br />

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

ID060510 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!