diff options
| author | Atish Patra <[email protected]> | 2019-02-27 11:08:26 -0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2019-03-06 08:59:54 +0530 |
| commit | d4dd2b37f3a80fc99345930879721499cf9e0c8a (patch) | |
| tree | b9b3eaf5413f7c1dcb9d7bcf2602b005f2a25fb8 | |
| parent | 754ff341085902e999c512f15e9fc1d59c8a8aa2 (diff) | |
firmware: Ensure the mtvec is updated.
Signed-off-by: Atish Patra <[email protected]>
| -rw-r--r-- | firmware/fw_base.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/fw_base.S b/firmware/fw_base.S index 3c509cfb..83fe2aae 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -184,6 +184,11 @@ _start_warm: /* Setup trap handler */ la a4, _trap_handler csrw CSR_MTVEC, a4 + /* Make sure that mtvec is updated */ + 1: + csrr a5, CSR_MTVEC + bne a4, a5, 1b + /* Initialize SBI runtime */ csrr a0, CSR_MSCRATCH |
