Commit Graph

123 Commits

Author SHA1 Message Date
Mahavir Jain
78464dfab7 Merge branch 'refactor/create_esp_hal_security_v6.0' into 'release/v6.0'
refactor: Created esp_hal_security component (v6.0)

See merge request espressif/esp-idf!45349
2026-01-31 10:28:48 +05:30
Aditya Patwardhan
e26b33cc3a fix(esp_tee): Update linker scripts for apm_hal move to esp_hal_security 2026-01-30 17:12:55 +05:30
Aditya Patwardhan
4d3cfefc2e refactor(esp_hal_security): Updated esp_hal_security build and includes 2026-01-30 17:12:54 +05:30
Laukik Hase
a6d39908f7 fix(esp_tee): Fix TEE attestation stack protection fault with secure boot enabled
- Increased the TEE stack when secure boot is enabled
- Also, generate a build error when the generated TEE binary image size is
  greater than the TEE partition size
2026-01-29 11:49:17 +05:30
Laukik Hase
f18697b544 refactor(esp_tee): Remove support for ECDSA secp192r1 keys in TEE secure storage 2026-01-29 11:49:16 +05:30
Laukik Hase
b470f08c94 refactor(esp_tee): Update TEE attestation tests and examples to use the PSA interface 2026-01-29 11:49:16 +05:30
Laukik Hase
1752290f02 feat(esp_tee): Migrate TEE attestation to the PSA interface 2026-01-29 11:49:15 +05:30
Laukik Hase
d826448fd0 ci(esp_tee): Optimize the TEE pytest script 2026-01-29 11:49:15 +05:30
Laukik Hase
304adb120b refactor(esp_tee): Adopt Picolibc as the default LibC for ESP-TEE build
- Also fixed an issue where NewLib ROM APIs, when called from TEE, were
  using the syscall table located in the REE SRAM. This could be abused
  as an attack vector to invoke illegal functions from the TEE.
  To prevent this, the syscall table is now switched to the TEE-specific
  copy during every M-U mode transition.
2026-01-29 11:49:15 +05:30
Laukik Hase
421246323a feat(esp_tee): Add support for the RISC-V H/W stack guard mechanism 2026-01-29 11:49:14 +05:30
Laukik Hase
39f392f943 feat(esp_tee): Support ECDSA secp384r1 keys in TEE secure storage 2026-01-29 11:49:13 +05:30
Ashish Sharma
b02538834c fix: resolves MR comments 2025-12-20 23:02:25 +08:00
Ashish Sharma
5d5ba9d008 fix: migrate PSA SHA driver to be similar to parallel engine port 2025-12-19 11:06:41 +08:00
Ashish Sharma
76287081ea feat: code cleanup 2025-12-19 07:29:43 +08:00
Ashish Sharma
3dea3aae1d fix: fixes coverity reported warnings 2025-12-19 07:29:43 +08:00
Ashish Sharma
aa88c81dfb fix(wpa_supplicant): revert changes to dpp_crypto 2025-12-19 07:29:08 +08:00
Ashish Sharma
f306dbea84 feat(mbedtls): migrates ESP-TEE with PSA APIs 2025-12-19 07:28:33 +08:00
Ashish Sharma
a088d2ccdc feat(mbedtls): fix build errors with PSA migration 2025-12-18 21:18:58 +08:00
Alexey Lapshin
068fefad68 fix(esp_tee): build esp_tee only with CONFIG_LIBC_NEWLIB to reduce size 2025-12-06 00:08:35 +07:00
Jiang Jiang Jian
ee4be1af57 Merge branch 'feat/flash_enc_using_key_manager_v6.0' into 'release/v6.0'
Support Flash Encryption using Key Manager (v6.0)

See merge request espressif/esp-idf!43459
2025-11-24 10:35:48 +08:00
harshal.patil
792c93c597 change(mbedtls): Generalize key source union for the hardware ECDSA context 2025-11-20 11:37:07 +05:30
Laukik Hase
01f5050f6f ci(esp_tee): Enable the TEE examples for ESP32-C61 2025-11-20 11:01:29 +05:30
Laukik Hase
46de215007 ci(esp_tee): Enable the TEE test-apps for ESP32-C61 2025-11-19 10:57:43 +05:30
Laukik Hase
65436262d5 feat(esp_tee): Add support for TEE secure storage encryption for ESP32-C61 2025-11-19 10:57:43 +05:30
Laukik Hase
2394e9451d feat(esp_tee): Support for ESP32-C61 - the esp_tee component 2025-11-19 10:57:42 +05:30
Laukik Hase
f307e80fe2 feat(esp_tee): Enable MSPI tuning for Flash and PSRAM 2025-11-13 15:38:13 +05:30
Laukik Hase
f20351eb3b 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.
2025-11-13 15:38:12 +05:30
Mahavir Jain
5ddfb043b9 Merge branch 'fix/add_bootloader_and_partition_table_as_encrypted_flash_targets_v6.0' into 'release/v6.0'
Add Bootloader, Partition Table and ESP-TEE as dependencies for encrypted-flash (v6.0)

See merge request espressif/esp-idf!43033
2025-11-13 09:37:57 +05:30
Laukik Hase
73b6e718f2 ci(esp_tee): Remove incorrect error checks for TEE flash protection tests
- Also fixed coverity issue from TEE secure storage
2025-11-06 17:19:56 +05:30
harshal.patil
7338c5179b fix(build_system): Add Bootloader and Partition Table as dependencies for encrypted-flash
- If ESP-TEE is enabled, also add it as the dependency for the encrypted-flash target
2025-11-03 11:15:25 +05:30
Mahavir Jain
e351376dcf Merge branch 'fix/esp_tee_int_wdt' into 'master'
fix(esp_tee): Sync M-U interrupt thresholds during service calls from critical sections

See merge request espressif/esp-idf!42365
2025-10-17 17:40:53 +05:30
Marius Vikhammer
19e0997436 Merge branch 'feature/esp_stdio' into 'master'
feat(stdio): added new esp_stdio component

Closes IDF-13799

See merge request espressif/esp-idf!41625
2025-10-17 16:11:16 +08:00
Marius Vikhammer
a257812e14 feat(stdio): added esp_stdio component
esp_stdio contains everything the old esp_vfs_console contained (the vfs stdio glue layer)
as well as other functionality related to stdio (previously referred to as console)
2025-10-16 10:01:59 +08:00
Laukik Hase
9de1d631b4 feat(esp_tee): Reclaim unused TEE IRAM memory as heap
- Changed the default TEE code placement to use the flash
  text section instead of IRAM text, making it consistent
  with the default data placement.
2025-10-15 18:22:44 +05:30
Laukik Hase
20344640e3 fix(esp_tee): Split TEE SRAM as I/DRAM for ESP32-C5 with PMA 2025-10-15 18:22:43 +05:30
Laukik Hase
8770ae9db4 fix(esp_tee): Sync TEE-REE intr thresholds during service calls from critical sections
- Previously, only the U-mode interrupt threshold was raised in REE critical sections,
  leaving M-mode at the lowest level.
- As a result, when a service call transitioned to M-mode, all interrupts were still
  allowed to fire, including those that should have been masked.
2025-10-15 12:33:31 +05:30
morris
e8de5b5a95 refactor(gptimer): clean up SOC capabilities for GPTIMER and Timer Group
- Remove GPTIMER and TIMG related definitions from soc_caps_full.h files
- Move timer peripheral definitions to appropriate HAL layer files
- Update references across components to use proper HAL abstractions
- Consolidate timer group and GPTIMER capabilities organization
- Ensure consistent timer configuration across all ESP32 variants

This refactoring improves the separation of concerns between SOC
capabilities and HAL implementations for timer-related functionality.
2025-10-14 11:44:38 +08:00
morris
56c3dc4755 feat(wdt): graduate watch dog hal driver into a new component: esp_hal_wdt 2025-10-14 11:44:32 +08:00
Laukik Hase
6e51fac96e Merge branch 'fix/esp_tee_flash_op_bound_checks' into 'master'
fix(esp_tee): Correct flash operation bound checks to handle all overlap cases

Closes IDF-14129

See merge request espressif/esp-idf!41946
2025-10-13 13:31:03 +05:30
Mahavir Jain
439b1d6d08 cleanup: move cJSON to component manager 2025-10-06 14:08:06 +05:30
Peter Dragun
e3198fff3c feat: Update esptool to v5 2025-09-30 15:28:55 +02:00
Laukik Hase
466c1d66b6 refactor(esp_tee): Remove the spi_flash_erase_chip service call
- Also fix coverity bug from TEE HMAC-PBKDF2 routine
2025-09-30 12:22:26 +05:30
Laukik Hase
8b92f3603f fix(esp_tee): Correct flash operation bound checks to handle all overlap cases
- Ensure bound checks correctly handle all scenarios, including
  when a requested operation's (SPI0/1) range fully contains the
  TEE-protected region.
- Disable delegation of INTWDT timeout and Cache error interrupts as they reset
  the device after the panic handler
2025-09-30 12:22:25 +05:30
morris
71cb24caab feat(timg): graduate the hal driver into a single component 2025-09-27 17:33:10 +08:00
Alexey Lapshin
dfac1a162c change(esp_tee): disable zcmp extension for esp_tee builds 2025-09-24 21:32:02 +07:00
Laukik Hase
649741fa9d Merge branch 'feat/nvs_flash_deregister_sec_scheme' into 'master'
feat(nvs_flash): Added an API to deregister the NVS security scheme context

Closes IDF-12456 and IDFGH-16210

See merge request espressif/esp-idf!41073
2025-09-22 11:11:34 +05:30
Laukik Hase
c152663408 feat(esp_tee): Added support for PBKDF2-based (HMAC) ECDSA signing 2025-09-19 12:06:02 +05:30
Laukik Hase
1ea0fc261d change(nvs_sec_provider): Make the HMAC-based NVS security scheme default for supported SoCs
- When NVS encryption is enabled on SoCs with the HMAC peripheral that have flash encryption
  enabled, the HMAC-based NVS encryption scheme is now selected as default instead of the
  flash encryption-based scheme.
- If your application previously used the flash encryption-based scheme, you need to manually
  configure the NVS encryption scheme to flash encryption from HMAC through ``menuconfig``
  or your project's ``sdkconfig`` (i.e., setting ``CONFIG_NVS_SEC_KEY_PROTECT_USING_FLASH_ENC=y``).
2025-09-19 10:38:38 +05:30
Laukik Hase
57432bb336 fix(esp_tee): Skip taking the service call mutex when in critical sections
- Fixes INT_WDT timeouts with mmap operations
- Add test-case for verifying parallel service calls
2025-09-16 14:57:27 +05:30
Laukik Hase
d8edbc8acf feat(esp_tee): ASM routine fixes and improvements
- Fix incorrect setting in the edge interrupt acknowledgement API
- Avoid executing the service call dispatcher in the U-mode ecall,
  rather execute `mret` to jump it
- Avoid `t1` register corruption when processing `ecall`
- Switch back to the bootloader stack from TEE stack after the
  execution of the entire TEE initialization routine
2025-09-16 14:57:10 +05:30