zephyr/arch
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
..
arc everywhere: replace double words 2024-06-25 06:05:35 -04:00
arm arch: arm: cortex_m: add ip & lr to the clobber list 2024-07-10 11:58:13 -04:00
arm64 arch/arm64/mmu: improve debugging output 2024-06-26 13:06:42 -04:00
common everywhere: replace #if IS_ENABLED() as per docs 2024-06-28 07:20:32 -04:00
mips arch: remove the use of z_arch_esf_t completely from internal 2024-06-04 14:02:51 -05:00
nios2 arch: remove the use of z_arch_esf_t completely from internal 2024-06-04 14:02:51 -05:00
posix build: namespace the generated headers with zephyr/ 2024-05-28 22:03:55 +02:00
riscv arch: riscv: stacktrace: fix user thread stack bound check 2024-07-27 20:47:51 +03:00
sparc arch: remove the use of z_arch_esf_t completely from internal 2024-06-04 14:02:51 -05:00
x86 arch: x86: corrected parameter names 2024-06-27 20:06:20 -04:00
xtensa xtensa: mmu: clear ZSR_DEPC_SAVE at boot 2024-06-28 20:53:37 -04:00
archs.yml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
CMakeLists.txt cmake: enable -Wshadow partially for in-tree code 2023-08-22 11:39:58 +02:00
Kconfig everywhere: replace double words 2024-06-22 05:40:22 -04:00
Kconfig.v1 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
Kconfig.v2 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00