mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
firmware: Ensure the mtvec is updated.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -184,6 +184,11 @@ _start_warm:
|
|||||||
/* Setup trap handler */
|
/* Setup trap handler */
|
||||||
la a4, _trap_handler
|
la a4, _trap_handler
|
||||||
csrw CSR_MTVEC, a4
|
csrw CSR_MTVEC, a4
|
||||||
|
/* Make sure that mtvec is updated */
|
||||||
|
1:
|
||||||
|
csrr a5, CSR_MTVEC
|
||||||
|
bne a4, a5, 1b
|
||||||
|
|
||||||
|
|
||||||
/* Initialize SBI runtime */
|
/* Initialize SBI runtime */
|
||||||
csrr a0, CSR_MSCRATCH
|
csrr a0, CSR_MSCRATCH
|
||||||
|
Reference in New Issue
Block a user