mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(esp_tee): Support for ESP32-C61 - the rest of the components
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
idf_build_get_property(non_os_build NON_OS_BUILD)
|
||||
|
||||
set(srcs "rtc_clk_init.c"
|
||||
"rtc_clk.c"
|
||||
"pmu_param.c"
|
||||
@@ -8,7 +10,7 @@ set(srcs "rtc_clk_init.c"
|
||||
"ocode_init.c"
|
||||
)
|
||||
|
||||
if(NOT BOOTLOADER_BUILD)
|
||||
if(NOT non_os_build)
|
||||
list(APPEND srcs "sar_periph_ctrl.c")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -123,6 +123,15 @@ void esp_cpu_configure_region_protection(void)
|
||||
// Configure all the invalid address regions using PMA
|
||||
//
|
||||
esp_cpu_configure_invalid_regions();
|
||||
|
||||
/* NOTE: When ESP-TEE is active, only configure invalid memory regions in bootloader
|
||||
* to prevent errors before TEE initialization. TEE will handle all other
|
||||
* memory protection.
|
||||
*/
|
||||
#if CONFIG_SECURE_ENABLE_TEE && BOOTLOADER_BUILD
|
||||
return;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Configure all the valid address regions using PMP
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -15,7 +15,20 @@ void esp_cpu_intr_get_desc(int core_id, int intr_num, esp_cpu_intr_desc_t *intr_
|
||||
* Reserve interrupt line 1 for the Wifi controller.
|
||||
* Reserve interrupt line 6 since it is used for disabling interrupts in the interrupt allocator (INT_MUX_DISABLED_INTNO)
|
||||
*/
|
||||
const uint32_t rsvd_mask = BIT(1) | BIT(6);
|
||||
const uint32_t base_rsvd_mask = BIT(1) | BIT(6);
|
||||
|
||||
/* On the ESP32-C61, interrupt 31 is reserved for ESP-TEE
|
||||
* for operations related to secure peripherals under its control
|
||||
* (e.g. SHA, ECC, APM)
|
||||
*
|
||||
* Interrupt 30 is reserved for handling REE interrupts occurring in TEE.
|
||||
*/
|
||||
#if CONFIG_SECURE_ENABLE_TEE
|
||||
const uint32_t rsvd_mask = base_rsvd_mask | BIT(30) | BIT(31);
|
||||
#else
|
||||
const uint32_t rsvd_mask = base_rsvd_mask;
|
||||
#endif
|
||||
|
||||
intr_desc_ret->priority = 1;
|
||||
intr_desc_ret->type = ESP_CPU_INTR_TYPE_NA;
|
||||
intr_desc_ret->flags = esp_riscv_intr_num_flags(intr_num, rsvd_mask);
|
||||
|
||||
Reference in New Issue
Block a user