diff --git a/firmware/fw_base.S b/firmware/fw_base.S index a76ddc1b..f1752d5c 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -458,6 +458,9 @@ _start_warm: /* update the mscratch */ csrw CSR_MSCRATCH, tp + /* Clear trap_context in scratch space */ + REG_S zero, SBI_SCRATCH_TRAP_CONTEXT_OFFSET(tp) + /* Setup stack */ add sp, tp, zero