Skip to content

Commit 5e3bfc2

Browse files
wangfei_chentdrozdovsky
authored andcommitted
freertos: riscv: fix t0 restore in ecall_yield
In trap entry, t0 is saved to mscratch. Signed-off-by: wangfei_chen <wangfei_chen@realsil.com.cn>
1 parent e0cf236 commit 5e3bfc2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

freertos/portable/GCC/RISC-V/portASM.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ ecall_end:
529529

530530
ecall_yield:
531531
/* restore t0 */
532-
csrr t0, mstatus
532+
csrr t0, mscratch
533533
portSAVE_BaseReg
534534
/* a4 = mepc
535535
* a5 = mstatus

0 commit comments

Comments
 (0)