esp-idf/components/bootloader/subproject
Jakob Hasse a37c20b417 [system]: Made longjmp save for context switch
* Patched longjmp to be context-switch safe
  longjmp modifies the windowbase and windowstart
  registers, which isn't safe if a context switch
  occurs during the modification. After a context
  switch, windowstart and windowbase will be
  different, leading to a wrongly set windowstart
  bit due to longjmp writing it based on the
  windowbase before the context switch. This
  corrupts the registers at the next window
  overflow reaching that wrongly set bit.

  The solution is to disable interrupts during
  this code. It is only 6 instructions long,
  the impact shouldn't be significant.

  The fix is implemented as a wrapper which
  replaces the original first instructions of
  longjmp which are buggy. Then, it jumps back
  to execute the rest of the original longjmp
  function.

  Added a comparably reliable test to the
  test apps.
2021-05-11 12:04:27 +08:00
..
components/micro-ecc global: fix sign-compare warnings 2021-01-12 14:05:08 +08:00
main soc: add dummy bytes to ensure instr prefetch always valid 2021-04-01 10:23:44 +08:00
.gitignore build system: Use component.mk for all components, refactor bootloader build 2017-07-19 09:10:48 +10:00
CMakeLists.txt bootloader: Suppress a Cmake warning - variables were not used by the project 2021-04-22 07:27:08 +00:00
Makefile [system]: Made longjmp save for context switch 2021-05-11 12:04:27 +08:00