display assembly instructions, to help with first.tex exercise
This commit is contained in:
parent
49db5119e9
commit
8f6865d1f1
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue