diff mbox series

[U-Boot,1/6] riscv: clarify error message on undefined exceptions

Message ID 20181230182746.23448-2-lukas.auer@aisec.fraunhofer.de
State Superseded
Headers show
Series Small fixes for RISC-V | expand

Commit Message

Lukas Auer Dec. 30, 2018, 6:27 p.m. UTC
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>
---

 arch/riscv/lib/interrupts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bin Meng Dec. 31, 2018, 6:05 a.m. UTC | #1
On Mon, Dec 31, 2018 at 2:28 AM Lukas Auer
<lukas.auer@aisec.fraunhofer.de> wrote:
>
> 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>
> ---
>
>  arch/riscv/lib/interrupts.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
index e185933b01..74c1e561c7 100644
--- a/arch/riscv/lib/interrupts.c
+++ b/arch/riscv/lib/interrupts.c
@@ -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();