fix(esp_tee): Use HAL APIs instead of ROM APIs for SPI flash service calls

Currently, REE SPI flash HAL operations are routed as service calls to TEE,
but the TEE implementation incorrectly uses ROM APIs instead of HAL APIs.
This leads to issues and is not the recommended approach.
This commit is contained in:
Laukik Hase
2025-11-13 15:38:12 +05:30
parent ccc59ed681
commit f20351eb3b
11 changed files with 37 additions and 31 deletions
+4 -13
View File
@@ -152,21 +152,12 @@ if(CONFIG_ESP_ROM_HAS_VERSION)
endif()
if(ESP_TEE_BUILD)
if(CONFIG_IDF_TARGET_ESP32H4 AND NOT CONFIG_ESP32H4_SELECTS_REV_MP) # TODO: ESP32H4 IDF-13835
rom_linker_script("beta5.heap")
rom_linker_script("beta5.spiflash")
if(CONFIG_ESP_ROM_HAS_NEWLIB_NANO_FORMAT)
rom_linker_script("beta5.newlib-nano")
endif()
else()
rom_linker_script("heap")
rom_linker_script("spiflash")
if(CONFIG_ESP_ROM_HAS_NEWLIB_NANO_FORMAT)
rom_linker_script("newlib-nano")
endif()
rom_linker_script("heap")
if(CONFIG_ESP_ROM_HAS_NEWLIB_NANO_FORMAT)
rom_linker_script("newlib-nano")
endif()
rom_linker_script("libc")
if(CONFIG_ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY) # TODO IDF-13852: use optimized memcpy for TEE ?
if(CONFIG_ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY)
rom_linker_script("libc-suboptimal_for_misaligned_mem")
endif()
endif()