bugfix: fix wrong RvCoreCriticalSleepFrame ptr value after wake restore

This commit is contained in:
wuzhenghui 2023-04-07 18:55:44 +08:00
parent 1b6461b9f8
commit 5ccf93d788

View File

@ -53,11 +53,12 @@ rv_core_critical_regs_save:
sw t2, RV_SLP_CTX_T2(t0) sw t2, RV_SLP_CTX_T2(t0)
sw s0, RV_SLP_CTX_S0(t0) sw s0, RV_SLP_CTX_S0(t0)
sw s1, RV_SLP_CTX_S1(t0) sw s1, RV_SLP_CTX_S1(t0)
sw a0, RV_SLP_CTX_A0(t0)
/* !! WARNING, do not use the a0 register below, a0 carries important sleep /* a0 is caller saved, so it does not need to be saved, but it should be the
* information and will be returned as the return value !! */ pointer value of RvCoreCriticalSleepFrame for return.
*/
mv a0, t0 mv a0, t0
sw a0, RV_SLP_CTX_A0(t0)
sw a1, RV_SLP_CTX_A1(t0) sw a1, RV_SLP_CTX_A1(t0)
sw a2, RV_SLP_CTX_A2(t0) sw a2, RV_SLP_CTX_A2(t0)