mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
Kernel/riscv64: Add MMU initialization code
We initialize the MMU by first setting up the page tables for the kernel image and the initial kernel stack. Then we jump to a identity mapped page which makes the newly created kernel root page table active by setting `satp` and then jumps to `init`.
This commit is contained in:
parent
27860cfaa2
commit
da33e2a564
4 changed files with 276 additions and 3 deletions
|
@ -51,9 +51,7 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void pre_init(FlatPtr mhartid, Physical
|
|||
// Catch traps in pre_init
|
||||
RISCV64::CSR::write(RISCV64::CSR::Address::STVEC, bit_cast<FlatPtr>(&early_trap_handler));
|
||||
|
||||
// FIXME: Implement this
|
||||
|
||||
Processor::halt();
|
||||
Memory::init_page_tables_and_jump_to_init();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue