zephyr/arch
Nicolas Pitre 1f362a81f1 riscv: fix crash resulting from touching the initial stack's guard area
The interrupt stack is used as the system stack during kernel
initialization while IRQs are not yet enabled. The sp register is
set to z_interrupt_stacks + CONFIG_ISR_STACK_SIZE.

CONFIG_ISR_STACK_SIZE only represents the desired usable stack size.
This does not take into account the added guard area. Result is a stack
whose pointer is much closer to the trigger zone than expected when
CONFIG_PMP_STACK_GUARD=y, and the SMP configuration in particular pushes
it over the edge during many CI test cases.

Worse: during early init we're not quite ready to handle exceptions
yet and complete havoc ensues with no meaningful debugging output.

Make sure the early assembly code locates the actual top of the stack
by generating a constant with its true size.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-09-28 07:53:56 +00:00
..
arc ARC: fx possible memory corruption with userspace 2022-09-21 18:46:06 +00:00
arm arch: arm: userspace: fix the incorrect ssf under bad syscall 2022-09-19 09:17:26 +02:00
arm64 arch: arm64: Disable ldp/stp Qn for consecutive 32-byte loads/stores 2022-09-23 12:10:25 +02:00
common cmake: Add support to add symbols to nocache section 2022-08-29 11:19:48 +02:00
mips include: types: remove ulong_t 2022-09-06 18:16:33 +02:00
nios2
posix arch/posix: Fix main() renaming trickery 2022-09-15 16:23:11 +00:00
riscv riscv: fix crash resulting from touching the initial stack's guard area 2022-09-28 07:53:56 +00:00
sparc SPARC: reduce z_thread_entry_wrapper 2022-08-03 12:05:49 +02:00
x86 x86: Kconfig: update dependency for X86_FP_USE_SOFT_FLOAT 2022-09-21 18:43:11 +00:00
xtensa xtensa: use lower-case hex in backtrace output 2022-09-09 14:09:33 -05:00
CMakeLists.txt
Kconfig arch/riscv: support CONFIG_CODE_DATA_RELOCATION 2022-08-24 10:08:06 +02:00