walnux/arch/xtensa
Tiago Medicci Serrano 60ca804b56 esp32s3: Fix bug related to the PSRAM-allocated task stack
If both SPI Flash support (`CONFIG_ESP32S3_SPIFLASH`) and PSRAM
(`CONFIG_ESP32S3_SPIRAM`) are enabled, the PSRAM can only be
assigned to the user's heap (`CONFIG_ESP32S3_SPIRAM_USER_HEAP`).
Additionaly, `CONFIG_ESP32S3_SPI_FLASH_SUPPORT_PSRAM_STACK` must be
set because the system will end up allocating tasks' stacks from
the external PSRAM. This has an impact when dealing with SPI flash
operations because the cache must be disabled and the running task
should not rely on any data from the PSRAM. To accomplish that, It
offloads the SPI flash operation to a work queue (which, by
definition, allocates its heap from the kernel heap).

The same (assigning the PSRAM to the user's heap) is valid when the
Wi-Fi is enabled because the lower-half driver requires data being
allocated from the internal memory (which can only be achieved by
allocating from the kernel heap when both the kernel and user heaps
exists).

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2025-08-20 02:23:03 +08:00
..
include xtensa/isa: fix build break if compiler without ISA - XCHAL_HAVE_THREADPTR support 2025-07-21 12:56:31 +02:00
src esp32s3: Fix bug related to the PSRAM-allocated task stack 2025-08-20 02:23:03 +08:00
CMakeLists.txt cmake:implement CMake build of xtensa arch 2024-11-02 18:08:38 +08:00
Kconfig style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00