![](http://datasheet.mmic.net.cn/230000/79RC32438-200BB_datasheet_15568909/79RC32438-200BB_121.png)
IDT MIPS32 4Kc Processor Core
CP0 Registers
79RC32438 User Reference Manual
2 - 59
November 4, 2002
Notes
Context Register (CP0 Register 4, Select 0)
The Context register is a read/write register containing a pointer to an entry in the page table entry (PTE)
array. This array is an operating system data structure that stores virtual-to-physical translations. During a
TLB miss, the operating system loads the TLB with the missing translation from the PTE array. The Context
register duplicates some of the information provided in the BadVAddr register but is organized in such a
way that the operating system can directly reference an 8-byte page table entry (PTE) in memory.
A TLB exception (TLB Refill, TLB Invalid, or TLB Modified) causes bits VA31:13 of the virtual address to
be written into the BadVPN2 field of the Context register. The PTEBase field is written and used by the
operating system. Refer to Table 2.31. The BadVPN2 field of the Context register is not defined after an
address error exception. This register is only valid with the TLB.
Context Register Format
31
PageMask Register (CP0 Register 5, Select 0)
The PageMask register is a read/write register used for reading from and writing to the TLB. It holds a
comparison mask that sets the variable page size for each TLB entry, as shown in Table 2.33. Behavior is
UNDEFINED if a value other than those listed is used. This register is only valid with the TLB.
PageMask Register Format
31
23 22
4 3
0
PTEBase
BadVPN2
0
Fields
Description
Read/
Write
Reset
State
Name
Bit(s)
PTEBase
31:23
This field is for use by the operating system and is
normally written with a value that allows the operat-
ing system to use the
Context
Register as a pointer
into the current PTE array in memory.
R/W
Undefined
BadVPN2
22:4
This field is written by hardware on a TLB miss for
the 4Kc core. It contains bits VA
31:13
of the virtual
address that missed.
R
Undefined
0
3:0
Must be written as zero; returns zero on read.
0
0
Table 2.31 Context Register Field Descriptions
25 24
13 12
0
0
Mask
0
Fields
Description
Read/
Write
Reset
State
Name
Bit(s)
Mask
24:13
The Mask field is a bit mask in which a “1” indicates
that the corresponding bit of the virtual address
should not participate in the TLB match.
R/W
Undefined
0
31:25 and
12:0
Must be written as zero; returns zero on read.
0
0
Table 2.32 PageMask Register Field Descriptions