diff options
author | Robert Morris <rtm@csail.mit.edu> | 2019-06-01 05:33:38 -0400 |
---|---|---|
committer | Robert Morris <rtm@csail.mit.edu> | 2019-06-01 05:33:38 -0400 |
commit | 50cbc7510250a64674d619d13f5912edf08b767d (patch) | |
tree | 874895d11adb72fed959619d85596b062260276f /trap.c | |
parent | 7fd1f1eb0aab4d52852fc4f5e83eafc991f9a627 (diff) | |
download | xv6-labs-50cbc7510250a64674d619d13f5912edf08b767d.tar.gz xv6-labs-50cbc7510250a64674d619d13f5912edf08b767d.tar.bz2 xv6-labs-50cbc7510250a64674d619d13f5912edf08b767d.zip |
first shell prints $ prompt, though no console input yet
Diffstat (limited to 'trap.c')
-rw-r--r-- | trap.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -9,7 +9,7 @@ struct spinlock tickslock; uint ticks; -extern char trampstart[], trampvec[]; +extern char trampout[], trampin[]; void kerneltrap(); @@ -53,6 +53,7 @@ usertrap(void) syscall(); } else { printf("usertrap(): unexpected scause 0x%x pid=%d\n", r_scause(), p->pid); + printf(" sepc=%p stval=%p\n", r_sepc(), r_stval()); panic("usertrap"); } @@ -71,7 +72,7 @@ usertrapret(void) // now from kerneltrap() to usertrap(). // send interrupts and exceptions to trampoline.S - w_stvec(TRAMPOLINE + (trampvec - trampstart)); + w_stvec(TRAMPOLINE + (trampin - trampout)); // set up values that trampoline.S will need when // the process next re-enters the kernel. @@ -108,5 +109,8 @@ kerneltrap() if((r_sstatus() & SSTATUS_SPP) == 0) panic("kerneltrap: not from supervisor mode"); + printf("scause 0x%x\n", r_scause()); + printf("sepc=%p stval=%p\n", r_sepc(), r_stval()); + panic("kerneltrap"); } |