zephyr/arch/sparc/core
Martin Åberg fd4e66499c SPARC: Update the Flush windows software trap
This commit re-implements the SPARC V8 ABI "Flush windows" software
trap. The trap is generated by C++ compilers for exceptions and also by
the C standard library function longjmp().

There were two issues with the previous implementation:
1. It did reads and writes via the stack pointer of the trap window,
   which is not defined.
2. It executed with traps enabled but without the processor run-time
   state set to safely handle traps. In particular there was no valid
   stack for trap processing. Even though interrupt priority was set to
   highest level, the behavior at other traps was not deterministic. For
   example non-maskable interrupt (15) trap or bus error trap for
   instruction fetch.

This new implementation does not store backup copies of CPU registers to
the stack, and it executes with traps disabled.

Fixes #63901

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2023-10-25 09:54:31 -05:00
..
offsets arch: sparc: Remove unused absolute symbols 2023-04-18 10:51:28 -04:00
CMakeLists.txt sparc: add support for thread local storage 2020-11-13 14:53:55 -08:00
fatal.c arch: migrate includes to <zephyr/...> 2022-05-06 19:57:22 +02:00
fault_trap.S asm: update files with <zephyr/...> include prefix 2022-05-09 12:45:29 -04:00
interrupt_trap.S asm: update files with <zephyr/...> include prefix 2022-05-09 12:45:29 -04:00
irq_manage.c arch: migrate includes to <zephyr/...> 2022-05-06 19:57:22 +02:00
irq_offload.c arch: migrate includes to <zephyr/...> 2022-05-06 19:57:22 +02:00
prep_c.c core: z_data_copy does not depend on CONFIG_XIP 2022-02-22 10:22:53 +01:00
reset_trap.S asm: update files with <zephyr/...> include prefix 2022-05-09 12:45:29 -04:00
stack_offsets.h SPARC: optimized interrupt stack frame size 2020-12-04 14:33:43 +02:00
sw_trap_set_pil.S asm: update files with <zephyr/...> include prefix 2022-05-09 12:45:29 -04:00
switch.S SPARC: reduce z_thread_entry_wrapper 2022-08-03 12:05:49 +02:00
thread.c SPARC: reduce z_thread_entry_wrapper 2022-08-03 12:05:49 +02:00
tls.c arch: migrate includes to <zephyr/...> 2022-05-06 19:57:22 +02:00
trap_table_mvt.S asm: update files with <zephyr/...> include prefix 2022-05-09 12:45:29 -04:00
window_trap.S SPARC: Update the Flush windows software trap 2023-10-25 09:54:31 -05:00