zephyr/arch
Carlo Caione cd4b01e0bb arm64: Use syscall frame and fix bad syscall handling
This patch is fixing three related problems:

1. When calling a syscall the marshalling function is using the ssf
   parameter as value to be saved in _current->syscall_frame to mark the
   beginning and the end of the syscall. This ssf value is not currently
   being explictly set and instead the syscall code is using whatever
   value is stored in x6 when the syscall is called. If it happens that
   x6 is 0 at the time the syscall is called, this causes the
   z_is_in_user_syscall() function to fail. Fix this passing the ESF as
   value for ssf.

2. Given that in the ssf is now present the ESF, we can fix
   arch_syscall_oops() using the ESF to print a more detailed error
   message with registers dump.

3. When a wrong syscall number is used, handler_bad_syscall() is called.
   This function expects the ID number as first parameter to print the
   error message, fix this.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-04-18 22:04:52 -04:00
..
arc ARC: allow to configure the RGF_NUM_BANKS only if ARC_FIRQ is enabled 2021-04-13 06:59:20 -04:00
arm arch: arm: Unconditionally compile IRQ_ZERO_LATENCY flag 2021-04-12 07:33:27 -04:00
arm64 arm64: Use syscall frame and fix bad syscall handling 2021-04-18 22:04:52 -04:00
common arch: common: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
nios2 arch: nios2: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
posix kernel: Add new k_thread_abort()/k_thread_join() 2021-02-24 16:39:15 -05:00
riscv arch: riscv: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
sparc arch: sparc: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
x86 arch: x86: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
xtensa arch: xtensa: Fix 10.4 violations 2021-04-10 09:59:37 -04:00
CMakeLists.txt cmake: fix include directories to work with out-of-tree arch 2020-08-05 08:06:07 -04:00
Kconfig kernel: enable using timing subsys to collect paging histograms 2021-04-06 16:43:55 -04:00