Browse Source

sfence before enabling paging

util
Robert Morris 3 years ago
parent
commit
581bc4cbd1
  1. 5
      kernel/vm.c

5
kernel/vm.c

@ -61,7 +61,12 @@ kvminit(void) @@ -61,7 +61,12 @@ kvminit(void)
void
kvminithart()
{
// wait for any previous writes to the page table memory to finish.
sfence_vma();
w_satp(MAKE_SATP(kernel_pagetable));
// flush stale entries from the TLB.
sfence_vma();
}

Loading…
Cancel
Save