vmm/riscv: fix bug in `vmm_max_paging_mode()`

This commit is contained in:
xvanc 2023-08-02 15:05:11 -05:00 committed by mintsuki
parent b64335f62a
commit 030242d69a
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@ int vmm_max_paging_mode(void)
pt_entry_t entry = PT_FLAG_ACCESSED | PT_FLAG_DIRTY | PT_FLAG_RWX | PT_FLAG_VALID;
for (int i = 0; i < 256; i++) {
table[i] = entry;
entry += page_sizes[lvl];
entry += page_sizes[lvl] >> 2;
}
uint64_t satp = ((uint64_t)(6 + lvl) << 60) | ((uint64_t)table >> 12);