mem_init()function in kern/pmap.c. Try to understand from the code what page mappings are being constructed. You may find the discussion in part 3 of the lab assignment helpful.
Submit: Draw a diagram of the virtual address space constructed by mem_init(), and identify any instances where multiple regions of virtual memory might be pointing to the same physical memory. Explain why the kernel might want to have different virtual addresses pointing to the same physical memory.
entry_pgdirset up in kern/entry.S to the newly created
Submit: Draw a diagram of the virtual address space
entry_pgdir (the definition is
in kern/entrypgdir.c). What about the layouts of
entry_pgdir and the
kern_pgdir make it
safe for the kernel to switch from the former the latter and continue