mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(esp_tee): Support for ESP32-C61 - the rest of the components
This commit is contained in:
@@ -15,7 +15,13 @@
|
||||
#include "sdkconfig.h"
|
||||
#include "ld.common"
|
||||
|
||||
#define SRAM_SEG_START 0x40800000
|
||||
#if !CONFIG_SECURE_ENABLE_TEE
|
||||
#define SRAM_SEG_START (0x40800000)
|
||||
#else
|
||||
#define SRAM_SEG_START (0x40800000 + CONFIG_SECURE_TEE_IRAM_SIZE + CONFIG_SECURE_TEE_DRAM_SIZE)
|
||||
#define FLASH_SEG_OFFSET (CONFIG_SECURE_TEE_IROM_SIZE + CONFIG_SECURE_TEE_DROM_SIZE)
|
||||
#endif // CONFIG_SECURE_ENABLE_TEE
|
||||
|
||||
#define SRAM_SEG_END 0x4083ea70 /* 2nd stage bootloader iram_loader_seg start address */
|
||||
#define SRAM_SEG_SIZE SRAM_SEG_END - SRAM_SEG_START
|
||||
|
||||
@@ -33,8 +39,14 @@ MEMORY
|
||||
*/
|
||||
|
||||
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
#if CONFIG_SECURE_ENABLE_TEE
|
||||
/* Flash mapped instruction data */
|
||||
irom_seg (RX) : org = 0x42000020 + FLASH_SEG_OFFSET,
|
||||
len = IDRAM0_2_SEG_SIZE - FLASH_SEG_OFFSET - 0x20
|
||||
#else
|
||||
/* Flash mapped instruction data */
|
||||
irom_seg (RX) : org = 0x42000020, len = IDRAM0_2_SEG_SIZE - 0x20
|
||||
#endif
|
||||
|
||||
/**
|
||||
* (0x20 offset above is a convenience for the app binary image generation.
|
||||
@@ -52,8 +64,14 @@ MEMORY
|
||||
sram_seg (RWX) : org = SRAM_SEG_START, len = SRAM_SEG_SIZE
|
||||
|
||||
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
#if CONFIG_SECURE_ENABLE_TEE
|
||||
/* Flash mapped constant data */
|
||||
drom_seg (R) : org = 0x42000020 + FLASH_SEG_OFFSET,
|
||||
len = IDRAM0_2_SEG_SIZE - FLASH_SEG_OFFSET - 0x20
|
||||
#else
|
||||
/* Flash mapped instruction data */
|
||||
drom_seg (R) : org = 0x42000020, len = IDRAM0_2_SEG_SIZE - 0x20
|
||||
#endif
|
||||
|
||||
/* (See irom_seg for meaning of 0x20 offset in the above.) */
|
||||
#endif // CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
|
||||
@@ -16,9 +16,22 @@ SECTIONS
|
||||
_iram_start = ABSOLUTE(.);
|
||||
/* Vectors go to start of IRAM */
|
||||
ASSERT(ABSOLUTE(.) % 0x100 == 0, "vector address must be 256 byte aligned");
|
||||
_vector_table_start = ABSOLUTE(.);
|
||||
KEEP(*(.exception_vectors_table.text));
|
||||
KEEP(*(.exception_vectors.text));
|
||||
|
||||
ALIGNED_SYMBOL(4, _invalid_pc_placeholder)
|
||||
|
||||
/* esp_tee_config_t structure: used to share information between the TEE and REE
|
||||
* (e.g. interrupt handler addresses, REE flash text-rodata boundaries, etc.)
|
||||
* This symbol is expected by the TEE at an offset of 0x2b0 from the vector table start.
|
||||
*/
|
||||
#if CONFIG_SECURE_ENABLE_TEE
|
||||
ALIGNED_SYMBOL(0x10, _esp_tee_app_cfg)
|
||||
ASSERT(ABSOLUTE(.) == _vector_table_start + 0x2b0, "esp_tee_app_cfg must be at an offset 0x2b0 from the vector table start");
|
||||
*libesp_tee.a:(.esp_tee_app_cfg);
|
||||
#endif
|
||||
|
||||
/* Code marked as running out of IRAM */
|
||||
_iram_text_start = ABSOLUTE(.);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user