Set the _hang trap in mtvec
This commit is contained in:
parent
2dcb2ac209
commit
417a4d5c75
@ -22,6 +22,10 @@
|
|||||||
.globl _start
|
.globl _start
|
||||||
_start:
|
_start:
|
||||||
jal print_hello // Print initial message on HART 0 only
|
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
|
csrr a0, mhartid // Load HART ID into a0
|
||||||
li s0, DRAM_BASE // Load next address into s0
|
li s0, DRAM_BASE // Load next address into s0
|
||||||
jr s0 // Jump to s0
|
jr s0 // Jump to s0
|
||||||
|
Loading…
Reference in New Issue
Block a user