mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
riscv: Simplify reset trampoline
By loading the absolute address of _start_real we can unconditionally jump to it regardless if the PC is somewhere at 0x0 or at ROM_START_ADDR
This commit is contained in:
parent
0b7eb2bbc9
commit
b70a4b7694
@ -18,11 +18,8 @@ _start:
|
||||
.option push
|
||||
.option norelax
|
||||
csrc CSR_MSTATUS, MSTATUS_MIE
|
||||
la a0, _start
|
||||
li a1, ROM_START_ADDR
|
||||
bleu a1, a0, _start_real
|
||||
la a0, _start_real
|
||||
add a0, a0, a1
|
||||
lui a0, %hi(_start_real)
|
||||
addi a0, a0, %lo(_start_real)
|
||||
jr a0
|
||||
|
||||
_start_real:
|
||||
|
Loading…
Reference in New Issue
Block a user