14.06.2015 Views

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

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.

<strong>Version</strong> <strong>2.03</strong><br />

[Category: Embedded.Enhanced Debug] will contain<br />

the address of the instruction after the one which<br />

enabled the Debug interrupt by setting MSR DE to 1.<br />

Software in the Debug interrupt handler can observe<br />

the DBSR IDE bit to determine how to interpret the value<br />

in CSRR0/DSRR0 [Category: Embedded.Enhanced<br />

Debug.<br />

8.4.7 Return Debug Event<br />

A Return debug event (RET) occurs if DBCR0 RET =1<br />

and an attempt is made to execute an rfi. Return debug<br />

events can occur regardless of the setting of MSR DE .<br />

When a Return debug event occurs, DBSR RET is set to<br />

1 to record the debug exception. If MSR DE =0, DBSR IDE<br />

is also set to 1 to record the imprecise debug event.<br />

If MSR DE =1 at the time of the Return Debug event, a<br />

Debug interrupt will occur immediately, and CSRR0/<br />

DSRR0 [Category: Embedded.Enhanced Debug will be<br />

set to the address of the rfi.<br />

If MSR DE =0 at the time of the Return Debug event, a<br />

Debug interrupt will not occur.<br />

Later, if the Debug exception has not been reset by<br />

clearing DBSR RET , and MSR DE is set to 1, a delayed<br />

imprecise Debug interrupt will occur. In this case,<br />

CSRR0/DSRR0 [Category: Embedded.Enhanced<br />

Debug will contain the address of the instruction after<br />

the one which enabled the Debug interrupt by setting<br />

MSR DE to 1. An imprecise Debug interrupt can be<br />

caused by executing an rfi when DBCR0 RET =1 and<br />

MSR DE =0, and the execution of that rfi happens to<br />

cause MSR DE to be set to 1. Software in the Debug<br />

interrupt handler can observe the DBSR IDE bit to determine<br />

how to interpret the value in CSRR0/DSRR0 [Category:<br />

Embedded.Enhanced Debug].<br />

8.4.8 Unconditional Debug Event<br />

An Unconditional debug event (UDE) occurs when the<br />

Unconditional Debug Event (UDE) signal is activated<br />

by the debug mechanism. The exact definition of the<br />

UDE signal and how it is activated is implementationdependent.<br />

The Unconditional debug event is the only<br />

debug event which does not have a corresponding<br />

enable bit for the event in DBCR0 (hence the name of<br />

the event). The Unconditional debug event can occur<br />

regardless of the setting of MSR DE .<br />

When an Unconditional debug event occurs, the<br />

DBSR UDE bit is set to 1 to record the Debug exception.<br />

If MSR DE =0, DBSR IDE is also set to 1 to record the<br />

imprecise debug event.<br />

If MSR DE =1 (i.e. Debug interrupts are enabled) at the<br />

time of the Unconditional Debug exception, a Debug<br />

interrupt will occur immediately (provided there exists<br />

no higher priority exception which is enabled to cause<br />

an interrupt), and CSRR0/DSRR0 [Category: Embedded.Enhanced<br />

Debug] will be set to the address of the<br />

instruction which would have executed next had the<br />

interrupt not occurred.<br />

If MSR DE =0 (i.e. Debug interrupts are disabled) at the<br />

time of the Unconditional Debug exception, a Debug<br />

interrupt will not occur.<br />

Later, if the Unconditional Debug exception has not<br />

been reset by clearing DBSR UDE , and MSR DE is set to<br />

1, a delayed Debug interrupt will occur. In this case,<br />

CSRR0/DSRR0 [Category: Embedded.Enhanced<br />

Debug] will contain the address of the instruction after<br />

the one which enabled the Debug interrupt by setting<br />

MSR DE to 1. Software in the Debug interrupt handler<br />

can observe DBSR IDE to determine how to interpret the<br />

value in CSRR0/DSRR0 [Category: Embedded.Enhanced<br />

Debug].<br />

8.4.9 Critical Interrupt Taken<br />

Debug Event [Category: Embedded.Enhanced<br />

Debug]<br />

A Critical Interrupt Taken debug event (CIRPT) occurs<br />

if DBCR0 CIRPT = 1 (i.e. Critical Interrupt Taken debug<br />

events are enabled) and a critical interrupt occurs. A<br />

critical interrupt is any interrupt that saves state in<br />

CSRR0 and CSRR1 when the interrupt is taken. Critical<br />

Interrupt Taken debug events can occur regardless of<br />

the setting of MSR DE .<br />

When a Critical Interrupt Taken debug event occurs,<br />

DBSR CIRPT is set to 1 to record the debug event. If<br />

MSR DE =0, DBSR IDE is also set to 1 to record the<br />

imprecise debug event.<br />

If MSR DE = 1 (i.e. Debug Interrupts are enabled) at the<br />

time of the Critical Interrupt Taken debug event, a<br />

Debug Interrupt will occur immediately (provided there<br />

is no higher priority exception which is enabled to<br />

cause an interrupt), and DSRR0 will be set to the<br />

address of the first instruction of the critical interrupt<br />

handler. No instructions at the critical interrupt handler<br />

will have been executed.<br />

If MSR DE = 0 (i.e. Debug Interrupts are disabled) at the<br />

time of the Critical Interrupt Taken debug event, a<br />

Debug Interrupt will not occur, and the handler for the<br />

critical interrupt which caused the debug event will be<br />

allowed to execute normally. Later, if the debug exception<br />

has not been reset by clearing DBSR CIRPT and<br />

MSR DE is set to 1, a delayed Debug Interrupt will occur.<br />

In this case DSRR0 will contain the address of the<br />

instruction after the one that set MSR DE = 1. Software<br />

in the Debug Interrupt handler can observe DBSR IDE to<br />

determine how to interpret the value in DSRR0.<br />

590<br />

<strong>Power</strong> ISA -- Book III-E

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

Saved successfully!

Ooh no, something went wrong!