comment the sfences
This commit is contained in:
parent
581bc4cbd1
commit
ed101befee
|
@ -80,10 +80,18 @@ uservec:
|
||||||
# load the address of usertrap(), from p->trapframe->kernel_trap
|
# load the address of usertrap(), from p->trapframe->kernel_trap
|
||||||
ld t0, 16(a0)
|
ld t0, 16(a0)
|
||||||
|
|
||||||
# load the kernel page table, from p->trapframe->kernel_satp
|
|
||||||
|
# fetch the kernel page table address, from p->trapframe->kernel_satp.
|
||||||
ld t1, 0(a0)
|
ld t1, 0(a0)
|
||||||
|
|
||||||
|
# wait for any previous memory operations to complete, so that
|
||||||
|
# they use the user page table.
|
||||||
sfence.vma zero, zero
|
sfence.vma zero, zero
|
||||||
|
|
||||||
|
# install the kernel page table.
|
||||||
csrw satp, t1
|
csrw satp, t1
|
||||||
|
|
||||||
|
# flush now-stale user entries from the TLB.
|
||||||
sfence.vma zero, zero
|
sfence.vma zero, zero
|
||||||
|
|
||||||
# jump to usertrap(), which does not return
|
# jump to usertrap(), which does not return
|
||||||
|
|
Loading…
Reference in a new issue