diff --git a/arch/risc-v/include/irq.h b/arch/risc-v/include/irq.h index 20651c9a3d..5abe73499a 100644 --- a/arch/risc-v/include/irq.h +++ b/arch/risc-v/include/irq.h @@ -492,7 +492,7 @@ struct xcptcontext /* These additional register save locations are used to implement the * signal delivery trampoline. * - * REVISIT: Because there is only one copy of these save areas, + * REVISIT: Because there is only a reference of these save areas, * only a single signal handler can be active. This precludes * queuing of signal actions. As a result, signals received while * another signal handler is executing will be ignored! diff --git a/arch/risc-v/src/common/riscv_internal.h b/arch/risc-v/src/common/riscv_internal.h index 5e1dacc216..be7967e8ec 100644 --- a/arch/risc-v/src/common/riscv_internal.h +++ b/arch/risc-v/src/common/riscv_internal.h @@ -64,8 +64,8 @@ # define PRIxREG "016" PRIxPTR #endif -/* In the RISC_V model, the state is copied from the stack to the TCB, but - * only a referenced is passed to get the state from the TCB. +/* In the RISC-V model, the state is saved in stack, + * only a reference stored in TCB. */ #ifdef CONFIG_ARCH_FPU diff --git a/arch/risc-v/src/common/riscv_swint.c b/arch/risc-v/src/common/riscv_swint.c index 16f05af9b5..7d14148e1c 100644 --- a/arch/risc-v/src/common/riscv_swint.c +++ b/arch/risc-v/src/common/riscv_swint.c @@ -214,8 +214,8 @@ int riscv_swint(int irq, void *context, void *arg) * A1 = restoreregs * * In this case, we simply need to set CURRENT_REGS to restore register - * area referenced in the saved R1. context == CURRENT_REGS is the - * normal exception return. By setting CURRENT_REGS = context[R1], we + * area referenced in the saved A1. context == CURRENT_REGS is the + * normal exception return. By setting CURRENT_REGS = context[A1], we * force the return to the saved context referenced in $a1. */ @@ -364,9 +364,9 @@ int riscv_swint(int irq, void *context, void *arg) * * At this point, the following values are saved in context: * - * R0 = SYS_pthread_start - * R1 = entrypt - * R2 = arg + * A0 = SYS_pthread_start + * A1 = entrypt + * A2 = arg */ #if !defined(CONFIG_BUILD_FLAT) && !defined(CONFIG_DISABLE_PTHREAD) @@ -396,11 +396,11 @@ int riscv_swint(int irq, void *context, void *arg) * * At this point, the following values are saved in context: * - * R0 = SYS_signal_handler - * R1 = sighand - * R2 = signo - * R3 = info - * R4 = ucontext + * A0 = SYS_signal_handler + * A1 = sighand + * A2 = signo + * A3 = info + * A4 = ucontext */ #ifndef CONFIG_BUILD_FLAT