diff options
author | Yunsup Lee <yunsup@cs.berkeley.edu> | 2014-02-06 11:22:32 -0800 |
---|---|---|
committer | Yunsup Lee <yunsup@cs.berkeley.edu> | 2014-02-06 11:22:32 -0800 |
commit | fba067ffed05ffff662cb280df822da2eaf12a0b (patch) | |
tree | 0df257d3af54df4ca0f59dc51848cd08762d9c14 /v/vm.c | |
parent | 43599293d347be1b30d8feb22c4a8c0091ad80b9 (diff) | |
download | env-fba067ffed05ffff662cb280df822da2eaf12a0b.zip env-fba067ffed05ffff662cb280df822da2eaf12a0b.tar.gz env-fba067ffed05ffff662cb280df822da2eaf12a0b.tar.bz2 |
fix recursive interrupts, and more improvements to code
Diffstat (limited to 'v/vm.c')
-rw-r--r-- | v/vm.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -150,9 +150,9 @@ static void do_vxcptrestore(long* where) static void restore_vector(trapframe_t* tf) { if (read_csr(impl) == IMPL_ROCKET) - do_vxcptrestore(tf->evac); + do_vxcptrestore(tf->hwacha_opaque); else - vxcptrestore(tf->evac); + vxcptrestore(tf->hwacha_opaque); } void handle_trap(trapframe_t* tf) @@ -185,10 +185,9 @@ void handle_trap(trapframe_t* tf) handle_fault(tf->badvaddr); else if ((long)tf->cause < 0 && (uint8_t)tf->cause == IRQ_COP) { - long hwacha_cause = vxcptcause(); - if (hwacha_cause == HWACHA_CAUSE_VF_FAULT_FETCH || - hwacha_cause == HWACHA_CAUSE_FAULT_LOAD || - hwacha_cause == HWACHA_CAUSE_FAULT_STORE) + if (tf->hwacha_cause == HWACHA_CAUSE_VF_FAULT_FETCH || + tf->hwacha_cause == HWACHA_CAUSE_FAULT_LOAD || + tf->hwacha_cause == HWACHA_CAUSE_FAULT_STORE) { long badvaddr = vxcptaux(); handle_fault(badvaddr); |