NonStop S-Series Server Description Manual (G06.27+)
Memory Addressing and Access
HP NonStop S-Series Server Description Manual—520331-004
4-6
Addressing in the Process Address Space
Addressing in the Process Address Space
All addressing is accomplished with 32-bit byte addresses, thus determining the
4-gigabyte addressing range of the process address space. That space, however, is
not of uniform function. As already shown by the previous two topics, the process
address space is divided into a nonprivileged space (the lower-address half) and a
privileged space (the higher-address half). The privileged space can be addressed
only in privileged mode; the nonprivileged space can be addressed in either privileged
or nonprivileged mode.
A further division of the process address space divides the privileged space into three
distinct areas, as shown in Figure 4-3. These are designated Kseg0, Kseg1, and
Kseg2. Kseg0 and Kseg1 together constitute the lower-address half of the privileged
space, and Kseg2 constitutes the higher-address half. Therefore, there are altogether
four addressing spaces in the process address space. (Not used is a RISC chip
capability that permits splitting the Kseg2 area into Kseg2 and Kseg3 areas.) The
Kseg nomenclature is RISC terminology and has nothing to do with “segments” in
NonStop processors.
The first of the four spaces, consisting of the entire nonprivileged space, is addressed
with relative addressing. That is, every process can address its own code and data
in pages and unitary segments relative to page 0 in segment 0. Accordingly, the term
“process-relative addressing” is sometimes used for added clarity.
The second of the four spaces, Kseg0, corresponds directly to the physical memory
addresses, up to a maximum of 512 megabytes. This space is addressed with
physical addressing. The availability of physical addressing in Kseg0 provides a
means for privileged software to directly access physical memory without the need for
low-level translation of addresses.
Kseg1 is very similar to Kseg0, except that it addresses the same physical memory
even more directly. That is, it bypasses the caches. This mode of addressing is used
only in special circumstances, such as reading and writing special hardware registers
that are addressed as if they are memory cells (memory-mapped registers).
Kseg2 provides privileged addressing that can be mapped to different areas of physical
memory as required. One region (256 unitary segments) is used for privileged data for
the process. The rest of Kseg2 provides absolute addressing for up to 7936 (that is,
8192 less 256) absolute unitary segments.
All Kseg0 and Kseg1 addresses map directly to physical addresses, so they are
always global. Each page of nonprivileged space and Kseg2 addresses can be
mapped to any frame of physical memory, and each mapping can be either per-
process or global. All Kseg2 addresses are global.