incubator-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
c906
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
hpm6750 add hpmicro chip: hpm6750 2023-02-09 14:17:49 +08:00
k210
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
rv32m1
.gitignore
arch.h risc-v: SV32 MMU support for qemu-rv. 2023-03-29 22:15:19 +09:00
barriers.h
csr.h
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
mode.h
setjmp.h
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