riscv/nuttsbi: add MTVAL argument
The MTVAL and the other two provides a complete exception story. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
parent
3b1f4562a0
commit
9790248f9a
@ -30,8 +30,9 @@
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
void sbi_mexception(uintptr_t mcause, uintptr_t *mepc)
|
||||
void sbi_mexception(uintreg_t mcause, uintreg_t *mepc, uintreg_t tval)
|
||||
{
|
||||
(void) mcause;
|
||||
(void) mepc;
|
||||
UNUSED(mcause);
|
||||
UNUSED(mepc);
|
||||
UNUSED(tval);
|
||||
}
|
||||
|
@ -127,6 +127,7 @@ machine_trap:
|
||||
|
||||
csrr a0, CSR_MCAUSE /* Interrupt cause [arg0] */
|
||||
csrr a1, CSR_MEPC /* Interrupt PC (instruction) [arg1] */
|
||||
csrr a2, CSR_MTVAL /* The MTVAL value [arg2] */
|
||||
jal x1, sbi_mexception
|
||||
j __start
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user