I am studying Professional Linux Kernel Architecture and I am in Chapter 3 Memory Management. While I studied kernel address space itself is split into direct mapping area, vmalloc area, kmap area and fixed mapping area.
What I am wondering is just like below.
Can direct mapping area(896MB) of kernel address space in 32-bit machine be accessed by function like __va, __pa without MMU?
if 1. is true then master kernel page table(swapper_pg_dir) manages only 128MB ?
While I am studying kernel code I found difference in paging_init function between 32-bit and 64-bit. In 32-bit, I found pagetable_init function which initialize and master kernel page table in paging_init function.
function paging_init in 32-bit
void __init pageit_init(void){
pagetable_init();
__flush_tlb_all();
kmap_init();
olpc_dt_build_devicetree();
sparse_memory_present_with_active_regions(MAX_NUMNODES);
sparse_init();
zone_sizes_init();
}
But in 64-bit, I could't find kernel page table related function in paging_init function.
void __init paging_init(void)
{
sparse_memory_present_with_active_regions(MAX_NUMNODES);
sparse_init();
node_clear_state(0, N_MEMORY);
if (N_MEMORY != N_NORMAL_MEMORY)
node_clear_state(0, N_NORMAL_MEMORY);
zone_sizes_init();
}
Is 64-bit kernel doesn't have master kernel page table? If it's true is it just access kernel memory only by direct mapping?