diff options
author | Mazen NEIFER <mazen@nestwave.com> | 2017-04-26 11:57:14 +0200 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2017-04-28 15:49:01 +0000 |
commit | 51eb081311a55b27a3e57483fc967dc1dd9796d7 (patch) | |
tree | 8735068f4791ea43505c9318625fb00c80fba6d3 | |
parent | 2bbaa1353313de2a552f0d3d309aa0d6992d0180 (diff) |
xtensa port: Fixed crash on interrupt handlers when logger is enabled.
This fixes ZEP-1955. The issue was that the interrupt stack frame only
allocates 4 registers. This means that if any window overflow happens,
only 4 registers can be saved. This implies that the interrupt handler
can not call functions other than using call4. If this rule is not
honored, then it will result in the registers being overwriting other
context information and thus a stack corruption.
The fix consists on using call4 for calling even t logger function,
which is by the way more optimal as the interrupt handler does not need
to save more than 4 registers when these functions are called.
Issue: ZEP-1955
Change-Id: Iacea626443d1d61d95a52253ac8ff15fc3722d2c
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
-rw-r--r-- | arch/xtensa/core/xtensa_vectors.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/xtensa/core/xtensa_vectors.S b/arch/xtensa/core/xtensa_vectors.S index 7b48c73b2..a08ee3a98 100644 --- a/arch/xtensa/core/xtensa_vectors.S +++ b/arch/xtensa/core/xtensa_vectors.S @@ -164,7 +164,7 @@ #ifdef __XTENSA_CALL0_ABI__ call0 _sys_k_event_logger_interrupt #else - call8 _sys_k_event_logger_interrupt + call4 _sys_k_event_logger_interrupt #endif #endif @@ -176,7 +176,7 @@ #ifdef __XTENSA_CALL0_ABI__ call0 _sys_k_event_logger_exit_sleep #else - call8 _sys_k_event_logger_exit_sleep + call4 _sys_k_event_logger_exit_sleep #endif #endif #ifdef XT_INTEXC_HOOKS |