esp-idf/components/freertos
Ivan Grokhotkov f4ab2beaa8 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-25 16:29:58 +00:00
..
include/freertos Revert "Merge branch 'feature/gdb_stub_task_state' into 'master'" 2020-09-17 17:04:48 +00:00
test freertos: don't clobber a4 while spilling register windows 2020-09-25 16:29:58 +00:00
xtensa freertos: don't clobber a4 while spilling register windows 2020-09-25 16:29:58 +00:00
CMakeLists.txt Exception handlers for LoadStoreError and LoadStoreAlignmentError 2020-02-26 20:21:59 +08: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 coredump: Increases FreeRTOS ISR stack for ELF data format 2020-05-06 20:07:30 +03: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 Merge branch 'bugfix/spinlock_coredump_regressions_v4.2' into 'release/v4.2' 2020-09-25 07:33:05 +08:00
timers.c freertos: removed likely macros from non-port specifics parts of freertos 2020-01-03 14:42:57 -03:00