]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: clarify error message on undefined exceptions
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Fri, 4 Jan 2019 00:37:28 +0000 (01:37 +0100)
committerAndes <uboot@andestech.com>
Tue, 15 Jan 2019 01:36:31 +0000 (09:36 +0800)
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>
arch/riscv/lib/interrupts.c

index e185933b01ef04cde12988058d137dda9bd363cd..74c1e561c713b04c456ff2cade618817ad805c10 100644 (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",
                       code, exception_code[code], epc, regs->ra);
        } else {
-               printf("Reserved\n");
+               printf("reserved exception code: %ld , epc %lx , ra %lx\n",
+                      code, epc, regs->ra);
        }
 
        hang();