MIPS R4000 Microprocessor User's Manual 67
Memory Management
Operating Modes
The processor has three operating modes that function in both 32- and 64-
bit operations:
• User mode
• Supervisor mode
• Kernel mode
These modes are described in the next three sections.
User Mode Operations
In User mode, a single, uniform virtual address space—labelled User
segment—is available; its size is:
• 2 Gbytes (2
31
bytes) in 32-bit mode (useg)
• 1 Tbyte (2
40
bytes) in 64-bit mode (xuseg)
Figure 4-4 shows User mode virtual address space.
Figure 4-4 User Mode Virtual Address Space
*NOTE: The R4000 uses 64-bit addresses internally. When the kernel
is running in Kernel mode, it initializes registers before switching
modes, and saves (or restores, whichever is appropriate) register
values on context switches. In 32-bit mode, a valid address must be a
32-bit signed number, where bits 63:32 = bit 31. In normal operation
it is not possible for a 32-bit User-mode program to produce invalid
addresses. However, although it would be an error, it is possible for a
Kernel-mode program to erroneously place a value that is not a 32-bit
signed number into a 64-bit register, in which case the User-mode
program generates an invalid address.
useg xuseg
Address
Error
1 TB
Mapped
32-bit* 64-bit
0x FFFF FFFF FFFF FFFF
0x 0000 0000 0000 0000
0x FFFF FFFF
0x 8000 0000
0x 0000 0000
0x 0000 0100 0000 0000
Address
Error
Mapped
2 GB