[arch][riscv] more work on riscv MMU code

Use a callback based shared walker to implement the
same page table walking code for different operations.

Add SBI hooks for TLB flushing.
This commit is contained in:
Travis Geiselbrecht
2021-03-05 02:21:00 -08:00
parent c6d8476adb
commit 45a27cbf14
6 changed files with 308 additions and 96 deletions

View File

@@ -59,6 +59,10 @@ void arch_early_init(void) {
#if RISCV_S_MODE
sbi_early_init();
#endif
#if RISCV_MMU
riscv_early_mmu_init();
#endif
}
@@ -89,6 +93,7 @@ void arch_init(void) {
dprintf(INFO, "RISCV: Supervisor mode\n");
#if RISCV_MMU
dprintf(INFO, "RISCV: MMU enabled sv%u\n", RISCV_MMU);
riscv_mmu_init();
#endif
sbi_init();
#endif