zephyr/arch/riscv/core
Yong Cong Sin 7db18ab721 arch: riscv: stacktrace: fix user thread stack bound check
According to the riscv's `arch.h`:

 +------------+ <- thread.arch.priv_stack_start
 | Guard      | } Z_RISCV_STACK_GUARD_SIZE
 +------------+
 | Priv Stack | } CONFIG_PRIVILEGED_STACK_SIZE
 +------------+ <- thread.arch.priv_stack_start +
                   CONFIG_PRIVILEGED_STACK_SIZE +
                   Z_RISCV_STACK_GUARD_SIZE

The start of the privilege stack should be:

  `thread.arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE`

Instead of

  `thread.arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE`

For the `end`, use the same equation of `top_of_priv_stack` in
the `arch_user_mode_enter()`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-27 20:47:51 +03:00
..
offsets
CMakeLists.txt arch: riscv: skip `isr.S` when SW ISR table is not generated 2024-06-13 16:57:32 -04:00
asm_macros.inc
coredump.c
cpu_idle.c
fatal.c arch: riscv: remove PMP stack guard for stack overflow handler 2024-07-27 15:12:25 +03:00
fpu.S
fpu.c
irq_manage.c
irq_offload.c
isr.S arch: riscv: update PMP setting to privileged mode for fault handler 2024-07-27 15:12:25 +03:00
pmp.S
pmp.c arch: riscv: remove PMP stack guard for stack overflow handler 2024-07-27 15:12:25 +03:00
prep_c.c
reboot.c
reset.S
semihost.c
smp.c arch: call arch_smp_init() directly, do not use SYS_INIT 2024-06-12 18:23:54 -04:00
stacktrace.c arch: riscv: stacktrace: fix user thread stack bound check 2024-07-27 20:47:51 +03:00
switch.S
thread.c
tls.c
userspace.S
vector_table.ld