display assembly instructions, to help with first.tex exercise

This commit is contained in:
Robert Morris 2019-07-24 10:15:45 -04:00
parent 49db5119e9
commit 8f6865d1f1
3 changed files with 3 additions and 1 deletions

View file

@ -2,3 +2,4 @@ set confirm off
set architecture riscv
target remote 127.0.0.1:1234
symbol-file kernel/kernel
set disassemble-next-line auto

View file

@ -12,6 +12,7 @@
.section trampoline
.globl trampout
trampout:
# trampout(trapframe, pagetable)
# switch from kernel to user.
# usertrapret() calls here.
# a0: p->tf in user page table

View file

@ -117,7 +117,7 @@ usertrapret(void)
// set S Exception Program Counter to the saved user pc.
w_sepc(p->tf->epc);
// tell trampline.S the user page table to switch to.
// tell trampoline.S the user page table to switch to.
uint64 satp = MAKE_SATP(p->pagetable);
// jump to trampoline.S at the top of memory, which