diff options
author | Howard Mao <zhehao.mao@gmail.com> | 2015-11-17 21:20:37 -0800 |
---|---|---|
committer | Howard Mao <zhehao.mao@gmail.com> | 2015-11-17 21:20:37 -0800 |
commit | b8548164acc7a0b36aebc8855a9457057b28189e (patch) | |
tree | 289124141404ac8fb8353b582b4ca8f2f3e1e840 /v/vm.c | |
parent | cdf86f59e5706d1c35371b555892fe7b8ab2b01d (diff) | |
download | env-vectorless.zip env-vectorless.tar.gz env-vectorless.tar.bz2 |
disable vector trap handlingvectorless
Diffstat (limited to 'v/vm.c')
-rw-r--r-- | v/vm.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -196,24 +196,24 @@ void handle_trap(trapframe_t* tf) } else if (tf->cause == CAUSE_FAULT_LOAD || tf->cause == CAUSE_FAULT_STORE) handle_fault(tf->badvaddr); - else if ((long)tf->cause < 0 && (uint8_t)tf->cause == IRQ_COP) - { - 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); - } - else - assert(!"unexpected interrupt"); - } + //else if ((long)tf->cause < 0 && (uint8_t)tf->cause == IRQ_COP) + //{ + // 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); + // } + // else + // assert(!"unexpected interrupt"); + //} else assert(!"unexpected exception"); out: - if (!(tf->sr & SSTATUS_PS) && (tf->sr & SSTATUS_XS)) - restore_vector(tf); + //if (!(tf->sr & SSTATUS_PS) && (tf->sr & SSTATUS_XS)) + // restore_vector(tf); pop_tf(tf); } |