One, why need high-end memory
A: For a 32-bit machine, the maximum Linux virtual memory is 4G, where 3-4g space is used as the kernel space, considering that if the physical memory is greater than 1G, then the physical memory can not be fully mapped, so Linux rules "kernel Direct mapping Space" mapping 896M physical Memory, ARM architecture has the concept of high-end memory, but not fixed in the area of more than 896M ~
Second, the Linux kernel address space
Linux virtual address 3G to 4G space is the kernel address space, kernel space is the kernel responsible for mapping, he will not follow the process changes, is fixed.
1,3G---3g+896m is a direct mapping area where the linear address and physical address have a linear transition relationship: The linear address =3g+ the physical address.
2,3g+896m---3g+896m+120m is a dynamic memory mapping area, which is allocated by the kernel function Vmalloc, characterized by: linear space continuous, but the corresponding physical space is not necessarily continuous. The physical page that corresponds to the linear address assigned by the Vmalloc may be in low-end memory or high-end memory.
3, the next 4M is the permanent memory-mapped area, which accesses high-end memory. The access method is to use Alloc_page (_GFP_HIGHMEM) to allocate high-end memory pages or to map high-end memory allocated to the zone using the Kmap function. 4, the final 4M is a fixed mapping area, the region and 4G at the top of the 4k barrier, each of its address items to serve a specific purpose, such as acpi_base, etc.
Note: The above values are not fixed and may be different on different platforms or on different implementations.
| Error Value (1 page) |
|
| Vector table (4 K) |
|
| Fixaddr_start |
| IO map Space |
| Vmalloc Space |
| Vmalloc_offset |
| Low Memory |
| Manager SYS Buffer |
| Padding |
| . Data. BSS |
| . text |
| . init data |
| Pgd |
| Boot parameters |
| Pkmap_base |
| *.ko |
User space
|
[Linux memory]--kernel address space