添加一些 los_dispatch.S 注释

This commit is contained in:
2025-05-29 03:22:53 +00:00
parent f9666deb0d
commit 7eacd52ff2

View File

@@ -114,9 +114,12 @@ HalTaskContextSwitch:
and a0, a0, a2
// get mie
// a0 mstatusmie0
// taskmie1
andi a1, a0, RISCV_MSTATUS_MIE // 0x00000008
// must be in machine mode
// 4miempiemret
ori a1, a1, 0x180
slli a1, a1, 0x4
or a0, a0, a1
@@ -127,7 +130,8 @@ HalTaskContextSwitch:
and a0, a0, a2
// a0 mie mstatus
SREG a0, 16 * REGBYTES(sp)
//
// ramepcmretret
// mret
SREG ra, 17 * REGBYTES(sp)
la a1, g_losTask
@@ -155,7 +159,7 @@ HalStartToRun:
// retrieve the registers
POP_ALL_REG
// task
mret
.section .text