summaryrefslogtreecommitdiff
path: root/trampoline.S
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-06-05 11:42:03 -0400
committerRobert Morris <[email protected]>2019-06-05 11:42:03 -0400
commitf1a727b971a59bab6025b4c4111342c27356ca40 (patch)
treed22d52c613bfc003e6fb75b5d137aeff9d954201 /trampoline.S
parentec3d3a1fceee437c640f9c5c05fc517edfb1899e (diff)
downloadxv6-labs-f1a727b971a59bab6025b4c4111342c27356ca40.tar.gz
xv6-labs-f1a727b971a59bab6025b4c4111342c27356ca40.tar.bz2
xv6-labs-f1a727b971a59bab6025b4c4111342c27356ca40.zip
start at support for multiple CPUs
Diffstat (limited to 'trampoline.S')
-rw-r--r--trampoline.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/trampoline.S b/trampoline.S
index 5886942..dd4eb02 100644
--- a/trampoline.S
+++ b/trampoline.S
@@ -120,6 +120,9 @@ trampin:
# restore kernel stack pointer from p->tf->kernel_sp
ld sp, 8(a0)
+ # make tp hold the current hartid, from p->tf->hartid
+ ld tp, 32(a0)
+
# remember the address of usertrap(), p->tf->kernel_trap
ld t0, 16(a0)