Memory map, caching, reads, writes and translation
47
Programming the MIPS32® 74K™ Core Family, Revision 02.14
Each device within the CDMM begins with an Access Control and Status Register which gives information about the
device and also provides a means for giving user and supervisor programs access to the rest of the device. The
FDACSR
is shown in
Figure 3.10 Fields in the Access Control and Status (ACSR) Register
Where:
DevID
: (read only) indicates the device ID.
DevSize
: (read only) indicates how many additional 64B blocks this device uses
DevRev
: (read only) Revision number of the device.
Uw/Ur:
control whether write and reads, respectively, from user programs are allowed to access the device registers. If 0,
reads will return 0 and writes will be dropped.
Sw/Sr
: Same idea as
Uw/Ur
, but for supervisor access
3.8 The TLB and translation
The TLB is the key piece of hardware which MIPS architecture CPUs have for memory management. It’s a hardware
array, and for maintenance you access fields by their index. For memory translation, it’s a real content-addressed
memory, whose input is a virtual page address together with the “address space identifier” from
EntryHi[ASID].
The
table also stores a physical address plus “cacheability” attributes, which becomes the output of the translation lookup.
The hardware TLB is relatively small, configurable with 16, 32, 48 or 64 entries (read
Config1[MMUSize]
for the
number configured for your core). Each entry can map a 2-page-size virtual region to a pair of physical pages. Entries
can map different size pages, too.
System software maintains the TLB as a cache of a much larger number of possible translations. An attempt to use a
mapped-space address for which no translation is in the hardware TLB invokes a special exception handler which is
carefully crafted to find and load the right entry as quickly as possible. Read on for a summary of all the fields and
how it gets used; but the OS ramifications are far too extensive to cover here; for a better description in context see
, and for full details of the architectural specification see
3.8.1 A TLB entry
Let’s start with a sketch of a TLB entry. For MIPS32 cores, that consists of a virtual address portion to match against
and two output sections, something like
- which also shows which TLB fields are carried in which CP0
registers.
31
24
23
22
21
16
15
12
11
4
3
2
1
0
DevID
zero
DevSize
DevRev
zero
Uw
Ur
Sw
Sr
Содержание MIPS32 74K Series
Страница 1: ...Document Number MD00541 Revision 02 14 March 30 2011 Programming the MIPS32 74K Core Family...
Страница 10: ...Programming the MIPS32 74K Core Family Revision 02 14 10...
Страница 20: ...1 4 A brief guide to the 74K core implementation Programming the MIPS32 74K Core Family Revision 02 14 20...
Страница 28: ...2 2 PRId register identifying your CPU type Programming the MIPS32 74K Core Family Revision 02 14 28...
Страница 54: ...3 8 The TLB and translation Programming the MIPS32 74K Core Family Revision 02 14 54...
Страница 83: ......
Страница 86: ...6 5 FPU pipeline and instruction timing Programming the MIPS32 74K Core Family Revision 02 14 86...
Страница 101: ...The MIPS32 DSP ASE 101 Programming the MIPS32 74K Core Family Revision 02 14...
Страница 134: ...8 4 Performance counters Programming the MIPS32 74K Core Family Revision 02 14 134...
Страница 154: ...C 3 FPU changes in Release 2 of the MIPS32 Architecture Programming the MIPS32 74K Core Family Revision 02 14 154...