From 417a4d5c750001025c9a3b43e873de50386dd2e4 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 23 Aug 2024 16:46:40 +0200 Subject: [PATCH] Set the _hang trap in mtvec --- bootrom/rbootrom.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootrom/rbootrom.S b/bootrom/rbootrom.S index 45c08fd..04454d8 100644 --- a/bootrom/rbootrom.S +++ b/bootrom/rbootrom.S @@ -22,6 +22,10 @@ .globl _start _start: jal print_hello // Print initial message on HART 0 only + + la t0, _hang + csrw mtvec, t0 // Set the machine trap vector + csrr a0, mhartid // Load HART ID into a0 li s0, DRAM_BASE // Load next address into s0 jr s0 // Jump to s0