Debug Support
e200z3 Power Architecture Core Reference Manual, Rev. 2
Freescale Semiconductor
9-27
normal mode. In addition to saved internal state variables, two of the bits are used by emulation firmware
to control the debug process. In certain circumstances, emulation firmware must modify the content of this
register as well as the PC and IR values in the CPUSCR before exiting debug mode. These cases are
described more specifically in the text after the table.
0
15
Field
Internal state bits
Waiting
16
19
20
21
22
23
24
25
26
27
28
29
30
31
Field
PCOFST PCINV FFRA IRSTAT0 IRSTAT1 IRSTAT2 IRSTAT3 IRSTAT4 IRSTAT5 IRSTAT6 IRSTAT7 IRSTAT8 IRSTAT9
Figure 9-9. Control State Register (CTL)
Table 9-11. CTL Field Definitions
Bits
Name
Description
0–15
Internal
state bits
Internal state bits.These control bits represent the internal processor state and should be restored to their
original value after a debug session is completed, that is, when a OnCE command is issued with the GO
and EX bits set and not ignored. When performing instruction execution during a debug session (see
Section 9.2.1, “Software Debug Facilities”
), these bits should be cleared.
15
Waiting
WAITING State Status
This bit indicates whether the CPU was in the waiting state prior to entering debug mode. If set, the CPU
was in the waiting state. Upon exiting a debug session, the value of this bit in the restored CPUSCR will
determine whether the CPU re-enters the waiting state on a go+exit.
0 CPU was not in the waiting state when debug mode was entered
1 CPU was in the waiting state when debug mode was entered
16–19 PCOFST PC offset field. Indicates whether the value in the PC portion of the CPUSCR must be adjusted before
exiting debug mode. Due to the pipelined nature of the CPU, the PC value must be backed up by emulation
software in certain circumstances. The PCOFST field specifies the value to be subtracted from the original
value of the PC. This adjusted PC value should be restored into the PC portion of the CPUSCR just before
exiting debug mode with a Go+Exit. In the event the PCOFST is non-zero, the IR should be loaded with a
nop instruction instead of the original IR value; otherwise, the original value of IR should be restored (but
see PCINV which overrides this field).
0000 No correction required
0001 Subtract 0x04 from PC.
0010 Subtract 0x08 from PC.
0011 Subtract 0x0C from PC.
0100 Subtract 0x10 from PC.
0101 Subtract 0x14 from PC.
All other encodings are reserved.
20
PCINV
PC and IR invalid status bit. This status bit indicates that the values in the IR and PC portions of the
CPUSCR are invalid. Exiting debug mode with the saved values in the PC and IR will have unpredictable
results. Debug firmware should initialize the PC and IR values in the CPUSCR with desired values before
exiting debug mode if this bit was set when debug mode was initially entered.
0 No error condition exists.
1 Error condition exists. PC and IR are corrupted.