Hardware Reference
In-Depth Information
FIGURE B.27 The mapping of an Opteron virtual address . The Opteron virtual memory
implementation with four page table levels supports an effective physical address size of 40
bits. Each page table has 512 entries, so each level field is 9 bits wide. The AMD64 architec-
ture document allows the virtual address size to grow from the current 48 bits to 64 bits, and
the physical address size to grow from the current 40 bits to 52 bits.
The offsets for each of these page tables come from four 9-bit fields. Address translation
starts with adding the first offset to the page-map level 4 base register and then reading
memory from this location to get the base of the next-level page table. The next address offset
is in turn added to this newly fetched address, and memory is accessed again to determine the
base of the third page table. It happens again in the same fashion. The last address field is ad-
ded to this final base address, and memory is read using this sum to (finally) get the physical
address of the page being referenced. This address is concatenated with the 12-bit page offset
to get the full physical address. Note that the page table in the Opteron architecture fits within
a single 4 KB page.
The Opteron uses a 64-bit entry in each of these page tables. The first 12 bits are reserved
for future use, the next 52 bits contain the physical page frame number, and the last 12 bits
give the protection and use information. Although the fields vary some between the page table
levels, here are the basic ones:
Presence —Says that page is present in memory.
Read/write —Says whether page is read-only or read-write.
User/supervisor —Says whether a user can access the page or if it is limited to the upper three
privilege levels.
Dirty —Says if page has been modified.
Accessed —Says if page has been read or writen since the bit was last cleared.
 
Search WWH ::




Custom Search