sfence before enabling paging
This commit is contained in:
parent
29ce3161f8
commit
581bc4cbd1
|
@ -61,7 +61,12 @@ kvminit(void)
|
||||||
void
|
void
|
||||||
kvminithart()
|
kvminithart()
|
||||||
{
|
{
|
||||||
|
// wait for any previous writes to the page table memory to finish.
|
||||||
|
sfence_vma();
|
||||||
|
|
||||||
w_satp(MAKE_SATP(kernel_pagetable));
|
w_satp(MAKE_SATP(kernel_pagetable));
|
||||||
|
|
||||||
|
// flush stale entries from the TLB.
|
||||||
sfence_vma();
|
sfence_vma();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue