8.3 CP0 Watchpoints
Programming the MIPS32® 74K™ Core Family, Revision 02.14
128
8.3 CP0 Watchpoints
Some
core
s may be built with no EJTAG debug unit to save space, and some debug software may not know how to use
EJTAG resources. So it may be worth configuring the four non-EJTAG CP0 watchpoint registers. In 74K
core
s you
get two I-side and two D-side registers.
These registers provide the interface to a debug facility that causes an exception if an instruction or data access
matches the address specified in the registers. Watch exceptions are not taken if the CPU is already in exception mode
(that is if
Status[EXL]
or
Status[ERL]
is already set).
Watch events which trigger in exception mode are remembered, and result in a “deferred” exception, taken as soon as
the CPU leaves exception mode.
This CP0 watchpoint system is independent of the EJTAG debug system (which provides more sophisticated hard-
ware breakpoints).
The
WatchLo0-3
registers hold the address to match, while
WatchHi0-3
hold a bundle of control fields.
8.3.1 The WatchLo0-3 registers
Used in conjunction with
WatchHi0-3
respectively, each of these registers carries the virtual address and what-to-
match fields for a CP0 watchpoint.
Figure 8.22 Fields in the WatchLo0-3 Register
WatchLo0-3[VAddr]
: the address to match on, with a resolution of a doubleword.
WatchLo0-3[I,R,W]
: accesses to match: I-fetches, Reads (loads), Writes (stores). 74K
core
s have separate I- and D-side
watchpoints, so you’ll find that the I-side
WatchLo0-1[R]
and
WatchLo0-1[W]
is fixed to zero, while for the D-side-
only watchpoint,
WatchLo2-3[I]
will be zero.
8.3.2 The WatchHi0-3 registers
Figure 8.23 Fields in the WatchHi0-3 Register
WatchHi0-3[M]
: the
WatchHi0-3[M]
bit is set whenever there is one more watchpoint register pair to find; your soft-
ware should use it (starting with
WatchHi0
) to figure out how many watchpoints there are. That’s more robust than
reading the CPU manual...
WatchHi0-3[G,ASID]
:
WatchHi0-3[ASID]
matches addresses from a particular address space (the "ASID" is like that
in TLB entries) — except that you can set
WatchHi0-3[G]
("global") to match the address in any address space.
31
3
2
1
0
VAddr
I
R W
0
0
0
31
30
29
24
23
16
15
12
11
3
2
1
0
M G
0
ASID
0
Mask
I
R W
X
Summary of Contents for MIPS32 74K Series
Page 1: ...Document Number MD00541 Revision 02 14 March 30 2011 Programming the MIPS32 74K Core Family...
Page 10: ...Programming the MIPS32 74K Core Family Revision 02 14 10...
Page 54: ...3 8 The TLB and translation Programming the MIPS32 74K Core Family Revision 02 14 54...
Page 83: ......
Page 101: ...The MIPS32 DSP ASE 101 Programming the MIPS32 74K Core Family Revision 02 14...
Page 134: ...8 4 Performance counters Programming the MIPS32 74K Core Family Revision 02 14 134...