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_pgdir
set up in kern/entry.S to the
newly created kern_pgdir
.
Submit: Draw a diagram of the virtual address space
represented by entry_pgdir
(the definition is
in kern/entrypgdir.c). What about the layouts of
the entry_pgdir
and the kern_pgdir
make it
safe for the kernel to switch from the former the latter and continue
executing?