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>
This commit is contained in:
parent
2bbaa13533
commit
51eb081311
1 changed files with 2 additions and 2 deletions
|
@ -164,7 +164,7 @@
|
||||||
#ifdef __XTENSA_CALL0_ABI__
|
#ifdef __XTENSA_CALL0_ABI__
|
||||||
call0 _sys_k_event_logger_interrupt
|
call0 _sys_k_event_logger_interrupt
|
||||||
#else
|
#else
|
||||||
call8 _sys_k_event_logger_interrupt
|
call4 _sys_k_event_logger_interrupt
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
#ifdef __XTENSA_CALL0_ABI__
|
#ifdef __XTENSA_CALL0_ABI__
|
||||||
call0 _sys_k_event_logger_exit_sleep
|
call0 _sys_k_event_logger_exit_sleep
|
||||||
#else
|
#else
|
||||||
call8 _sys_k_event_logger_exit_sleep
|
call4 _sys_k_event_logger_exit_sleep
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef XT_INTEXC_HOOKS
|
#ifdef XT_INTEXC_HOOKS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue