riscv: clarify error message on undefined exceptions

Undefined exceptions are treated as reserved. This is not clearly
communicated to the user. Adjust the error message to clarify that a
reserved exception has occurred and add additional details.

Fixes: e8b522b ("riscv: treat undefined exception codes as reserved")
Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Lukas Auer 2019-01-04 01:37:28 +01:00 committed by Andes
parent d3689267f9
commit 0c85c113c4

View file

@ -37,7 +37,8 @@ static void _exit_trap(ulong code, ulong epc, struct pt_regs *regs)
printf("exception code: %ld , %s , epc %lx , ra %lx\n", printf("exception code: %ld , %s , epc %lx , ra %lx\n",
code, exception_code[code], epc, regs->ra); code, exception_code[code], epc, regs->ra);
} else { } else {
printf("Reserved\n"); printf("reserved exception code: %ld , epc %lx , ra %lx\n",
code, epc, regs->ra);
} }
hang(); hang();