Hardware Reference
In-Depth Information
Linux
Physical page
allocation
(1)
HIGHMEM area
allocation
Memory access
(2)
(5)
Architecture independent
Architecture dependent
Update PTE
Resolve TLB Miss
(3)
(6)
(4)
PTE
Software
Hardware
TLB
Fig. 5.6
Calling sequence of HIGHMEM memory access
does not have the I/O space, so we do not need to worry about the I/O space. The
address of the memory-mapped I/O space must not be changed regardless of the
existence or nonexistence of HIGHMEM, in order to keep the driver's source
code compatible. However, if I/O devices use DMA, which accesses the physical
address space directly, it is necessary to modify DMA's physical address in the
driver's source code.
5. Application Layer
By implementing the above design, application programs can run without any
modi fi cations.
In summary, we have designed a new HIGHMEM framework according to
the following policy:
a. Place the HIGHMEM area in the virtual address space.
b. Leave the memory-mapped I/O area as it is.
c. Leave the user area as it is.
5.1.3.2
Implementation
The calling sequence of physical page allocation to use the HIGHMEM area is
shown in Fig. 5.6 . This function returns the physical page address. In step (1), the
physical page allocator calls the HIGHMEM area allocator to access the HIGHMEM
area. In step (2), the HIGHMEM area allocator allocates the virtual address for a
HIGHMEM page and calls the page table entry (PTE) updater. In step (3), the PTE
updater updates the PTE. In step (5), a TLB miss occurs when Linux accesses a
virtual address, and the address is not registered in the TLB. At this time, the TLB
Search WWH ::




Custom Search