sfence.vma in trampoline as well
This commit is contained in:
parent
9b9e2dd0f2
commit
25e113138d
|
@ -13,7 +13,9 @@ main()
|
|||
if(cpuid() == 0){
|
||||
consoleinit();
|
||||
printfinit();
|
||||
printf("hart %d starting\n", cpuid());
|
||||
printf("\n");
|
||||
printf("xv6 kernel is booting\n");
|
||||
printf("\n");
|
||||
kinit(); // physical page allocator
|
||||
kvminit(); // create kernel page table
|
||||
kvminithart(); // turn on paging
|
||||
|
|
|
@ -75,8 +75,8 @@ uservec:
|
|||
|
||||
# restore kernel page table from p->tf->kernel_satp
|
||||
ld t1, 0(a0)
|
||||
sfence.vma zero, zero
|
||||
csrw satp, t1
|
||||
sfence.vma zero, zero
|
||||
|
||||
# a0 is no longer valid, since the kernel page
|
||||
# table does not specially map p->td.
|
||||
|
@ -93,8 +93,8 @@ userret:
|
|||
# a1: user page table, for satp
|
||||
|
||||
# switch to the user page table.
|
||||
sfence.vma zero, zero
|
||||
csrw satp, a1
|
||||
sfence.vma zero, zero
|
||||
|
||||
# put the saved user a0 in sscratch, so we
|
||||
# can swap it with our a0 (TRAPFRAME) in the last step.
|
||||
|
|
Loading…
Reference in a new issue