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 set architecture riscv
target remote 127.0.0.1:1234 target remote 127.0.0.1:1234
symbol-file kernel/kernel symbol-file kernel/kernel
set disassemble-next-line auto

View file

@ -12,6 +12,7 @@
.section trampoline .section trampoline
.globl trampout .globl trampout
trampout: trampout:
# trampout(trapframe, pagetable)
# switch from kernel to user. # switch from kernel to user.
# usertrapret() calls here. # usertrapret() calls here.
# a0: p->tf in user page table # 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. // set S Exception Program Counter to the saved user pc.
w_sepc(p->tf->epc); 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); uint64 satp = MAKE_SATP(p->pagetable);
// jump to trampoline.S at the top of memory, which // jump to trampoline.S at the top of memory, which