Simplify virtual memory management
wangrunji0408 opened this issue · comments
The current code structure is confusing!
The recursive mapping is really hard to understand and make the code more complicated.
BlogOS has replaced recursive mapping by linear mapping all physical memory.
See discussions here: phil-opp/blog_os#545.
Some ideas:
-
Deprecate
InactivePageTable
and only accessActivePageTable
- Remove
remap_the_kernel
from kernel. - Build a fine page table for kernel in bootloader (as x86_64 did).
- Let
MemorySet
owns&'static mut ActivePageTable
- Remove
-
Move arch-specific page table implementation to memory crate
@miskcoo is doing similar work on mipsel platform. Maybe he will be interested.