mirror of
https://gitee.com/cosyos/cosyos.git
synced 2026-08-17 08:42:13 +08:00
update Port/port_x32/RISC-V32/port_rv32_HWS.S.
Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
This commit is contained in:
@@ -24,6 +24,11 @@
|
||||
.align 2
|
||||
OS_PendSV_Handler: // hardware push Caller
|
||||
|
||||
#if defined ( __TEST_PENDSV )
|
||||
la tp, test_pendsv_fault_handler
|
||||
csrw mscratch, tp
|
||||
#endif
|
||||
|
||||
/* push Callee */
|
||||
#if !defined ( __riscv_32e )
|
||||
addi sp, sp,-32 * MCUCFG_REGBYTES
|
||||
@@ -153,6 +158,7 @@ _task_switch_:
|
||||
fstore f30, 30 * MCUCFG_FPUBYTES(sp)
|
||||
fstore f31, 31 * MCUCFG_FPUBYTES(sp)
|
||||
#endif
|
||||
|
||||
/* switch */
|
||||
la t0, s_task_current
|
||||
lw t2, (t0)
|
||||
@@ -163,6 +169,12 @@ _task_switch_:
|
||||
lw sp, (t2)
|
||||
sw t2, (t0)
|
||||
|
||||
#if defined ( __TEST_PENDSV )
|
||||
li a0, (0x0001UL << (MCUCFG_XXXx_IRQn % 32) )
|
||||
li a1, (0xE000E200 + MCUCFG_XXXx_IRQn / 32 * 4)
|
||||
sw a0, (a1)
|
||||
#endif
|
||||
|
||||
/* pop FPU */
|
||||
#if (MCUCFG_FPU_AUTOSTORE == 1)
|
||||
fload f0, 0 * MCUCFG_FPUBYTES(sp)
|
||||
|
||||
Reference in New Issue
Block a user