nuttx/arch/risc-v/include
Ville Juven 7bc8e59cce riscv/kernel_stack: Use kernel stack to store the user context
If a kernel stack exists, use that whenever the user process is in
privileged mode, i.e. running an exception or in system call. Previously
the exception context was stored into the user's stack, which is not ideal.

Why?

1. Because the exception entry status (REG_INT_CTX) is needed by the
   kernel, and this is now in user memory which requires that the correct
   user mappings are active when it is accessed.

2. The user must currently account for the exception stack frame (which
   is BIG) in its own stack allocation. Moving the exception context save
   to the kernel stack offloads this responsibility from the user to the
   kernel, which is IMO the correct behavior.

3. The kernel access to user memory is currently allowed without condition,
   however this is not ideal either. The privileged mode status CSR allows
   blocking access to user memory via the STATUS_SUM-bit, which should be
   disabled by default and only enabled when access to user space is really
   needed. This patch allows implementing such features.
2023-06-09 13:53:27 +08:00
..
bl602 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
c906 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
esp32c3 arch/risc-v/esp32c3: Add RTC interrupt support 2023-02-08 10:42:19 +08:00
esp32c6 Remove the tail spaces from all files except Documentation 2023-02-26 13:24:24 -08:00
espressif risc-v: Add Espressif chip family support on top of esp-hal-3rdparty 2023-03-14 23:55:35 +01:00
fe310 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
hpm6750 add hpmicro chip: hpm6750 2023-02-09 14:17:49 +08:00
k210 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
litex litex: Support for kernel build with vexriscv-smp. 2023-04-22 01:40:32 +08:00
mpfs risc-v/mpfs: add athena irq defines 2023-02-15 00:21:03 +08:00
qemu-rv arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
rv32m1 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
.gitignore
arch.h risc-v: SV32 MMU support for qemu-rv. 2023-03-29 22:15:19 +09:00
barriers.h RISC-V: Add common data memory and instruction barriers 2022-03-18 18:20:12 +08:00
csr.h arch/riscv: Align the macro definition in csr.h 2022-04-02 14:08:37 +03:00
elf.h
inttypes.h
irq.h riscv/kernel_stack: Use kernel stack to store the user context 2023-06-09 13:53:27 +08:00
limits.h arch: Define WCHAR_[MIN|MAX] in arch/include/limits.h 2022-06-03 22:25:49 +03:00
mode.h riscv: Dump trap val in exception handler 2022-08-30 14:55:33 +08:00
setjmp.h arch/risc-v: Save/Load float register in setjmp 2022-03-09 10:15:54 +02:00
spinlock.h
stdarg.h
syscall.h arch/risc-v: change up_saveusercontext to assembly code 2023-04-27 17:34:30 +08:00
types.h