summaryrefslogtreecommitdiff
path: root/kernel/trampoline.S
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-07-26 10:17:02 -0400
committerRobert Morris <[email protected]>2019-07-26 10:17:02 -0400
commitc714e3e35c98ed1fb13a8f1b52f6b1a03cfad783 (patch)
tree0c780982a4f824c79d8f5511c99e1b096ce47286 /kernel/trampoline.S
parentfa2e2e3c81b2686229acc204ece380953a8031ea (diff)
downloadxv6-labs-c714e3e35c98ed1fb13a8f1b52f6b1a03cfad783.tar.gz
xv6-labs-c714e3e35c98ed1fb13a8f1b52f6b1a03cfad783.tar.bz2
xv6-labs-c714e3e35c98ed1fb13a8f1b52f6b1a03cfad783.zip
machinevec -> timervec
Diffstat (limited to 'kernel/trampoline.S')
-rw-r--r--kernel/trampoline.S16
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/trampoline.S b/kernel/trampoline.S
index 6e436d2..24499d9 100644
--- a/kernel/trampoline.S
+++ b/kernel/trampoline.S
@@ -25,10 +25,10 @@ uservec:
#
# swap a0 and sscratch
- # so that a0 is p->tf
+ # so that a0 is TRAPFRAME
csrrw a0, sscratch, a0
- # save the user registers in p->tf
+ # save the user registers in TRAPFRAME
sd ra, 40(a0)
sd sp, 48(a0)
sd gp, 56(a0)
@@ -86,22 +86,22 @@ uservec:
.globl userret
userret:
- # userret(trapframe, pagetable)
+ # userret(TRAPFRAME, pagetable)
# switch from kernel to user.
# usertrapret() calls here.
- # a0: p->tf in user page table
- # a1: new value for satp, for user page table
+ # a0: TRAPFRAME, in user page table
+ # a1: user page table, for satp
# switch to the user page table.
sfence.vma zero, zero
csrw satp, a1
# put the saved user a0 in sscratch, so we
- # can swap it with our a0 (p->tf) in the last step.
+ # can swap it with our a0 (TRAPFRAME) in the last step.
ld t0, 112(a0)
csrw sscratch, t0
- # restore all but a0 from p->tf
+ # restore all but a0 from TRAPFRAME
ld ra, 40(a0)
ld sp, 48(a0)
ld gp, 56(a0)
@@ -133,7 +133,7 @@ userret:
ld t5, 272(a0)
ld t6, 280(a0)
- # restore user a0, and save p->tf in sscratch
+ # restore user a0, and save TRAPFRAME in sscratch
csrrw a0, sscratch, a0
# return to user mode and user pc.