
CHAPTER 4 MEMORY MANAGEMENT SYSTEM
59
4.2.6 Operating Modes
The processor has three operating modes that function in both 32- and 64-bit operations:
"
User mode
"
Supervisor mode
"
Kernel mode
User and Kernel modes are common to all V
R
-Series processors. Generally, Kernel mode is used to
executing the operating system, while User mode is used to run application programs. The V
R
4000
series processors have a third mode, which is called Supervisor mode and categorized in between User
and Kernel modes. This mode is used to configure a high-security system.
When an exception occurs, the CPU enters Kernel mode, and remains in this mode until an exception
return instruction (ERET) is executed. The ERET instruction brings back the processor to the mode in
which it was just before the exception occurs.
These modes are described in the next three sections.
(1) User-mode virtual addressing
In User mode, a single virtual address space labeled User segment is available; its size is:
"
2 Gbytes (2
"
1 Tbyte (2
31
bytes) in 32-bit mode (useg)
40
bytes) in 64-bit mode (xuseg)
Table 4-1 lists the characteristics of each user segment (useg and xuseg).
Figure 4-5. User Mode Address Space
64-bit mode
Note
32-bit mode
Note
0x8000 0000
0x7FFF FFFF
0xFFFF FFFF
Address error
0x0000 0100 0000 0000
0x0000 00FF FFFF FFFF
0xFFFF FFFF FFFF FFFF
Address error
xuseg
useg
0x0000 0000
2 Gbytes with
TLB mapping
0x0000 0000 0000 0000
1 Tbyte with
TLB mapping
Note
The V
R
4101 uses 64-bit addresses within it. When the processor is running in Kernel mode, it
saves the contents of each register or restores their previous contents to initialize them before
switching the context. For 32-bit mode addressing, bit 31 is sign-extended to bits 32 to 63, and
the resulting 32 bits are used for addressing. Usually, it is impossible for 32-bit mode programs
to generate invalid addresses. If context switching occurs and the processor enters Kernel
mode, however, an attempt may be made to save an address other than the sign-extended 32-
bit address mentioned above to a 64-bit register. In this case, user-mode programs are likely to
generate an invalid address.