Chapter 2. Programming Model
2-21
The MPC7400 Processor Register Set
2.1.3.1 User Breakpoint Address Mask Register (UBAMR)
The contents of BAMR are reected to UBAMR, which can be read by user-level software.
UBAMR can be accessed with the
mfspr
instructions using SPR 935.
2.1.3.1.1 Performance Monitor Counter Registers (PMC1DPMC4)
PMC1DPMC4, shown in Figure 2-9, are 32-bit counters that can be programmed to
generate interrupt signals when they overow.
Figure 2-9. Performance Monitor Counter Registers (PMC1DPMC4)
The bits contained in the PMC registers are described in Table 2-11.
Counters overow when the high-order bit (the sign bit) becomes set; that is, they reach the
value 2,147,483,648 (0x8000_0000). However, an interrupt is not signaled unless both
MMCR0[PMXE] and either MMCR0[PMC1CE] or MMCR0[PMCjCE] are also set as
appropriate.
Note that the interrupts can be masked by clearing MSR[EE]; the interrupt signal condition
may occur with MSR[EE] cleared, but the exception is not taken until MSR[EE] is set.
Setting MMCR0[FCECE] forces counters to stop counting when a counter interrupt or any
enabled condition or event occurs. Setting MMCR0[TRIGGER] forces counters PMCj
(j > 1), to begin counting with PMC1 goes negative or an enabled condition or event occurs.
Software is expected to use the
mtspr
instruction to explicitly set PMC to non-overowed
values. Setting an overowed value may cause an erroneous exception. For example, if both
MMCR0[PMXE] and either MMCR0[PMC1CE] or MMCR0[PMCjCE] are set and the
mtspr
instruction loads an overow value, an interrupt signal may be generated without an
event counting having taken place.
The event to be monitored can be chosen by setting MMCR
x
bits, as described in
Section 11.5, òEvent Selection.ó
Table 2-11. PMC
n
Field Descriptions
Bits
Name
Description
0
OV
Overow. When this bit is set, it indicates that this counter has reached its maximum value.
1D31
Counter value
Indicates the number of occurrences of the speciTed event.
OV
0
1
31
Counter Value