3.8 The TLB and translation
Programming the MIPS32® 74K™ Core Family, Revision 02.14
52
If
Config3
CTXTC
=0 and
Config3
SM
=0, then the
Context
register is organized in such a way that the operating system
can directly reference a 16-byte structure in memory that describes the mapping. For PTE structures of other sizes,
the content of this register can be used by the TLB refill handler after appropriate shifting and masking.
If
Config3
CTXTC
=0 and
Config3
SM
=0 then a TLB exception (TLB Refill, TLB Invalid, or TLB Modified) causes bits
VA
31..13
of the virtual address to be written into the BadVPN2 field of the
Context
register. The PTEBase field is writ-
ten and used by the operating system.
The
BadVPN2
field of the
Context
register is not defined after an address error exception and this field may be modi-
fied by hardware during the address error exception sequence.
shows the format of the
Context
Register when
Config3
CTXTC
=0 and
Config3
SM
=0.
If
Config3
CTXTC
=1 or
Config3
SM
=1 then the pointer implemented by the
Context
register can point to any power-of-
two-sized PTE structure within memory. This allows the TLB refill handler to use the pointer without additional shift-
ing and masking steps. Depending on the value in the
ContextConfig
register, it may point to an 8-byte pair of 32-bit
PTEs within a single-level page table scheme, or to a first level page directory entry in a two-level lookup scheme.
If
Config3
CTXTC
=1 or
Config3
SM
=1 then the a TLB exception (Refill, Invalid, or Modified) causes bits VA
X+9:Y+9
to
be written to a variable range of bits “(X-1):Y” of the
Context
register, where this range corresponds to the contiguous
range of set bits in the
ContextConfig
register. Bits 31:X are R/W to software, and are unaffected by the exception.
Bits Y-1:0 will always read as 0. If X = 23 and Y = 4, i.e. bits 22:4 are set in
ContextConfig
, the behavior is identical
to the standard MIPS32
Context
register (bits 22:4 are filled with VA
31:13
). Although the fields have been made vari-
able in size and interpretation, the MIPS32 nomenclature is retained. Bits 31:X are referred to as the PTEBase field,
and bits X-1:Y are referred to as BadVPN2.
The value of the
Context
register is UNPREDICTABLE following a modification of the contents of the
ContextConfig
register.
shows the format of the
Context
Register when
Config3
CTXTC
=1 or
Config3
SM
=1.
Figure 3.15 Fields in the Context register when Config3
CTXTC
=1 or Config3
SM
=1
The
ContextConfig
register defines the bits of the
Context
register into which the high order bits of the virtual address
causing a TLB exception will be written, and how many bits of that virtual address will be extracted. Bits above the
selected of the
Context
register are R/W to software and serve as the PTEBase field. Bits below the selected field of
the
Context
register will read as zeroes.
The field to contain the virtual address index is defined by a single block of contiguous non-zero bits within the
ContextConfig
register’s VirtualIndex field. Any zero bits to the right of the least significant one bit cause the corre-
sponding
Context
register bits to read as zero. Any zero bits to the left of the most significant one bit cause the corre-
sponding
Context
register bits to be R/W to software and unaffected by TLB exceptions.
A value of all ones in the
ContextConfig
register means that the full 32 bits of the faulting virtual address will be cop-
ied into the context register, making it duplicate the
BadVAddr
register. A value of all zeroes means that the full 32
bits of the
Context
register are R/W for software and unaffected by TLB exceptions.
31
X
X-1
Y
Y-1
0
PTEBase
BadVPN2
0
Содержание 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...