esp-idf/components/freertos
Ivan Grokhotkov 04b95f3567 freertos: don't clobber a4 while spilling register windows
Commit 891eb3b0 was fixing an issue with PS and EPC1 not being
preserved after the window spill procedure. It did so by saving PS in
a2 and EPC1 in a4. However the a4 register may be a live register of
another window in the call stack, and if it is overwritten and then
spilled to the stack, then the corresponding register value will end
up being corrupted. In practice the problem would show up as an
IllegalInstruction exception, when trying to return from a function
when a0 value was 0x40020.
Fix by using a0 register instead of a4 as scratch. Also fix a comment
about xthal_save_extra_nw, as this function in fact doesn't clobber
a4 or a5 because XCHAL_NCP_NUM_ATMPS is defined as 1.

Closes https://github.com/espressif/esp-idf/issues/5758
2020-09-02 15:40:41 +02:00
..
include/freertos Revert "Merge branch 'feature/gdb_stub_task_state' into 'master'" 2020-07-09 17:16:47 +02:00
test freertos: don't clobber a4 while spilling register windows 2020-09-02 15:40:41 +02:00
xtensa freertos: don't clobber a4 while spilling register windows 2020-09-02 15:40:41 +02:00
CMakeLists.txt esp_system: introduce intermediary function to call after system init 2020-06-19 18:40:10 +10:00
component.mk Exception handlers for LoadStoreError and LoadStoreAlignmentError 2020-02-26 20:21:59 +08:00
croutine.c Add UNTESTED_FUNCTION() call to untested functions, make Kconfig option to enable that to map to assert() 2016-09-27 11:36:30 +08:00
event_groups.c freertos: removed likely macros from non-port specifics parts of freertos 2020-01-03 14:42:57 -03:00
FreeRTOS-openocd.c freertos: fix defining uxTopUsedPriority for esp32s2beta 2019-10-29 16:38:48 +01:00
Kconfig freertos: ensure the interrupt stack is aligned 2020-08-05 12:51:41 +02:00
license.txt Initial public version 2016-08-17 23:08:22 +08:00
linker.lf freertos: place xQueueGenericCreateStatic into flash 2020-04-22 16:06:13 +08:00
list.c freertos: removed likely macros from non-port specifics parts of freertos 2020-01-03 14:42:57 -03:00
queue.c freertos: removed likely macros from non-port specifics parts of freertos 2020-01-03 14:42:57 -03:00
sdkconfig.rename Rename Kconfig options (components/freertos) 2019-05-21 09:09:01 +02:00
stdint.readme Initial public version 2016-08-17 23:08:22 +08:00
tasks.c freertos: fix compilation warning at -O2 level 2020-07-15 12:50:51 +00:00
timers.c freertos: removed likely macros from non-port specifics parts of freertos 2020-01-03 14:42:57 -03:00