Commit Graph

1218 Commits

Author SHA1 Message Date
harshal.patil
6dd847c8dd refactor(esp_system): deduplicate ROM fast wake RTC digest reservation
The digest length and the condition that reserves it at the end of RTC RAM were
duplicated in seven places. Hold the reservation in a hidden Kconfig value that
is zero when the feature does not apply, so every consumer subtracts it
unconditionally, and derive ESP_SECURE_BOOT_DIGEST_LEN from it.
2026-07-31 10:54:32 +08:00
wuzhenghui
f327a4d641 fix(bootloader_support): fix RTC retain mem offset for secure boot fast wakeup
Pointer arithmetic on rtc_retain_mem_t* subtracted ESP_SECURE_BOOT_DIGEST_LEN
in struct units instead of bytes. Cast through uintptr_t so retain mem stays
below the ROM verified-image digest region on deep-sleep wake.

Partial backport of !51265 (bootloader_common_loader.c only).
2026-07-28 21:50:18 +08:00
Jiang Jiang Jian
fa8e43eb72 Merge branch 'fix/bootloader_log_format_drom_vaddr_v6.0' into 'release/v6.0'
fix(bootloader): use correct format specifier for MMU_LL_END_DROM_ENTRY_VADDR (v6.0)

See merge request espressif/esp-idf!51056
2026-07-24 20:07:42 +08:00
Mahavir Jain
c9fc9d6103 Merge branch 'fix/esp_image_format_v6.0' into 'release/v6.0'
fix(esp_image_format): Fix some memory-safety issues (v6.0)

See merge request espressif/esp-idf!50180
2026-07-24 17:16:22 +05:30
Konstantin Kondrashov
62aa8a8393 fix(bootloader): use correct format specifier for MMU_LL_END_DROM_ENTRY_VADDR
MMU_LL_END_DROM_ENTRY_VADDR is an int-typed constant on several targets,
so logging it with PRIx32 (uint32_t) triggered -Werror=format=. Use the
plain %x specifier which matches the int type.

Closes https://github.com/espressif/esp-idf/issues/18857
2026-07-22 09:32:51 +03:00
nilesh.kale
0a3fe51c69 fix(bootloader_support): enable XTS-AES pseudo rounds for ESP32-P4
Burn XTS_DPA_PSEUDO_LEVEL efuse on P4 (rev >= 3.0) as done for other targets.
2026-07-22 14:07:03 +08:00
nilesh.kale
783348ad44 fix(bootloader_support): set SECURE_BOOT_SHA384_EN eFuse on ESP32-P4
Set SECURE_BOOT_SHA384_EN when enabling ECDSA-P384 Secure Boot V2 on
ESP32-P4, as done on C5/H4/S31, so that ROM verifies the bootloader
using the SHA-384 scheme. The eFuse exists only on the rev >= v3.0
eFuse table, so the Kconfig option is gated on rev >= v3.0.
2026-07-22 14:07:03 +08:00
Jiang Jiang Jian
7bcd65c9be Merge branch 'fix/fix_esp_tee_iv_length_check_v6.0' into 'release/v6.0'
feat(esp_tee): ESP-TEE Security Audit fixes (v6.0)

See merge request espressif/esp-idf!50851
2026-07-22 10:37:48 +08:00
Konstantin Kondrashov
decd12a726 fix(esp_image_format): validate MMU page size 2026-07-21 13:35:35 +03:00
Konstantin Kondrashov
747facfa27 fix(esp_image_format): verify length of segment #0 for app description 2026-07-21 13:35:35 +03:00
Konstantin Kondrashov
e8c1dad0c1 fix(esp_image_format): Verify image segment count 2026-07-21 13:35:35 +03:00
Laukik Hase
c0b1a5a71c fix(esp_tee): Miscellaneous optimizations and fixes
Closes https://github.com/espressif/esp-idf/issues/18591
2026-07-17 18:15:37 +05:30
Ashish Sharma
e2537bb5e4 fix(bootloader_support): guard NULL efuse digest slot in secure-boot verify 2026-07-16 18:24:47 +08:00
Song Ruo Jing
b5e03248bb fix(stdio): add console input ability when selects ESP_CONSOLE_UART_CUSTOM_NUM_1 2026-07-09 19:24:07 +08:00
Mahavir Jain
93056b5253 Merge branch 'fix/fix_sbv2_psa_algo_check_v6.0' into 'release/v6.0'
fix(secure_boot_v2): select correct secure boot algorithm based on key

See merge request espressif/esp-idf!49856
2026-06-30 18:17:45 +05:30
nilesh.kale
20289c2f08 fix(secure_boot_v2): select correct secure boot algorithm based on key
(cherry picked from commit e3b1d571d0)
2026-06-29 16:00:13 +08:00
Mahavir Jain
1afc579e07 change(bootloader): honor SECURE_BOOT_ALLOW_UNUSED_DIGEST_SLOTS during first boot
Previously the bootloader unconditionally revoked unused secure boot key
digest slots while permanently enabling secure boot on the first boot,
ignoring CONFIG_SECURE_BOOT_ALLOW_UNUSED_DIGEST_SLOTS. Now the config is
honored on this path too: when set, the unused digest slots are left
un-revoked. This is safe as long as the debug and download interfaces are
disabled.

Update the Kconfig help and the Secure Boot v2 guide (en and zh_CN)
accordingly.
2026-06-16 13:30:03 +05:30
Jiang Jiang Jian
fa801fe002 Merge branch 'contrib/github_pr_18495_v6.0' into 'release/v6.0'
fix(bootloader_support): Fix app verification when split across multiple mmaps (GitHub PR) (v6.0)

See merge request espressif/esp-idf!48271
2026-05-15 14:05:37 +08:00
Nebojša Cvetković
ee127fd4de fix(bootloader_support): Fix app verification when split across multiple mmaps
Merges https://github.com/espressif/esp-idf/pull/18495
2026-05-14 14:43:29 +08:00
Konstantin Kondrashov
9e03819d91 feat(efuse): Update efuse table for ESP32-H4 2026-05-14 14:42:49 +08:00
Ashish Sharma
04ec0ab538 feat(bootloader_support): remove P192 curve support 2026-05-10 19:16:12 +08:00
Alexey Lapshin
7ca5194959 feat(bootloader): split linker scripts into memory and sections
Replaced per-target bootloader.ld.in with bootloader.memory.ld.in and
bootloader.sections.ld.in.

Common code moved to file bootloader.sections.common.ld

Unify ESP32-P4 ECO4- and ECO4+ linker scripts into one shared script
Revision-specific code is selected with CONFIG_ESP32P4_SELECTS_REV_LESS_V3
2026-04-29 18:39:11 +07:00
Frantisek Hrbata
4d85eb5ba7 fix(bootloader_support/cmake): initialize priv_include_dirs variable
For the bootloader build, the `priv_include_dirs` variable is
uninitialized, but it is used in the common call to
`idf_component_register`.

Using uninitialized variables is not allowed in cmakev2 because a
component may be evaluated in the context of another component’s
variable scope.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
morris
ed6a7e267e Merge branch 'fix/32mb_120m_v6.0' into 'release/v6.0'
fix(spi_flash): 1. Fix flash 120m in qio mode failed on esp32p4 (with 32M map enabled) 2. Add C61 32M flash support (backport v6.0)

See merge request espressif/esp-idf!46042
2026-03-23 16:14:19 +08:00
Jiang Jiang Jian
81daeadf9f Merge branch 'esp32h4_debug_asistant_v6.0' into 'release/v6.0'
feat(esp32h4): add assist_debug/bus_monitor support (v6.0)

See merge request espressif/esp-idf!45949
2026-03-23 10:38:51 +08:00
C.S.M
52d5b1a173 fix(spi_flash): Fix esp32p4 120m flash suspend failed 2026-03-20 15:21:22 +08:00
Sudeep Mohanty
801ae3c205 fix(bootloader_support): Require micro-ecc only for BOOTLOADER_BUILD
When CONFIG_APP_BUILD_TYPE_RAM is set (loadable ELF app build),
bootloader_support was adding micro-ecc to priv_requires. The micro-ecc
component lives in the bootloader subproject and is not available in
normal app builds with cmakev2, causing component resolution to fail
when built for a build system v2 project.

micro-ecc is only needed for secure boot sources built under
BOOTLOADER_BUILD (secure_boot_signatures_bootloader.c). For app builds
with CONFIG_APP_BUILD_TYPE_RAM we do not build those sources, so
only add micro-ecc to priv_requires when BOOTLOADER_BUILD is set.
2026-03-20 08:13:26 +01:00
morris
23e199d646 Merge branch 'feature/esp32c61_flash_psram_timing_tuning_v6.0' into 'release/v6.0'
feat(mspi): support 120MHz flash and psram for esp32c61 (v6.0)

See merge request espressif/esp-idf!45886
2026-03-20 13:55:06 +08:00
morris
3ae282f796 Merge branch 'change/deprecate_tcm_and_use_scp_v6.0' into 'release/v6.0'
tcm: deprecated tcm and added scp memory utils (v6.0)

See merge request espressif/esp-idf!46588
2026-03-19 23:34:57 +08:00
Song Ruo Jing
c7ae253b89 feat(mspi): support 120MHz flash and psram for esp32c61 2026-03-19 14:30:46 +00:00
Aditya Patwardhan
c8a92d52c3 Merge branch 'fix/add_ecdsa_curve_validation_during_secure_boot_v6.0' into 'release/v6.0'
fix(bootloader_support): added ecdsa curve validation during secure boot (v6.0)

See merge request espressif/esp-idf!46297
2026-03-19 19:46:00 +05:30
Erhan Kurubas
4a7d67df84 feat(esp32h4): add assist_debug stack monitoring support 2026-03-19 11:40:44 +08:00
armando
45ec3b962b fix(spm): rename scp (scratchpad) to spm (scratchpad memory) 2026-03-18 09:49:59 +08:00
armando
1b85ad5081 change(mem): deprecated tcm and added scp memory utils 2026-03-18 09:49:59 +08:00
Chen Jichang
04df934c05 refactor(flash_enc): move esp_flash_encryption_enabled() to efuse component 2026-03-06 18:14:22 +08:00
nilesh.kale
aad21fec89 fix(bootloader_support): added ecdsa curve validation during secure boot
This commit added ECDSA key curve validation between
curve selected in menuconfig and key provided.
2026-03-05 10:31:06 +05:30
Xiao Xufeng
dd9706564f fix(tee): fix failed to configure flash on C6 v0.1 and above when REV_MIN_0 configured 2026-02-05 01:19:28 +08:00
Jiang Jiang Jian
31056d5db9 Merge branch 'refactor/spi_flash_private_v6.0' into 'release/v6.0'
refactor(spi_flash): reorganize header files, improve encapsulation and simplify ROM implementation (v6.0)

See merge request espressif/esp-idf!45488
2026-02-02 10:57:34 +08:00
Jiang Jiang Jian
025ec41dac Merge branch 'feat/support_esp32p4_rev3.1_lowpower_v6.0' into 'release/v6.0'
feat: esp32p4 eco6 lowpower support and leakage optimization (v6.0)

See merge request espressif/esp-idf!45531
2026-02-01 13:18:22 +08:00
Song Ruo Jing
89da3742b8 refactor(clk): split clock HAL into separate component 2026-01-31 22:32:37 +08:00
wuzhenghui
2d8c6ed6b4 change(esp_hal_rtc_timer): unify lp_timer/rtc_timer naming to RTC_TIMER 2026-01-31 22:31:34 +08:00
Aditya Patwardhan
9dbe3975e4 fix(bootloader_support): Use ROM SHA types to avoid esp_hal_security dependency 2026-01-30 17:12:56 +05:30
Aditya Patwardhan
1146a98c65 fix(bootloader_support): Add esp_hal_security dependency for TEE builds 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
Aditya Patwardhan
6c2716cd27 refactor(hal): Created esp_hal_security for security code 2026-01-30 17:12:49 +05:30
wuzhenghui
0161304269 feat(esp_hw_support): hold MSPI pins in pd_top lightsleep 2026-01-30 15:30:59 +08:00
wuzhenghui
ddec7eae60 fix(bootloader): fix bootloader bad spi pin drv config and clear all wpu/wpd by default 2026-01-30 15:30:59 +08:00
Jiang Jiang Jian
d3e1887bbc Merge branch 'fix/p4_min_rev_usage_v6.0' into 'release/v6.0'
P4: fix wrong rev_min usage in rom and other places (v6.0)

See merge request espressif/esp-idf!45223
2026-01-30 10:50:51 +08:00
nilesh.kale
2ab4d5cf48 feat: enabled ECDSA peripheral support for ESSP32-P4 2026-01-29 11:24:47 +05:30
Xiao Xufeng
3411286544 refactor(spi_flash): reorganize header files and improve API encapsulation
This commit reorganizes SPI flash header files to better reflect their
visibility and intended usage:

1. Rename `esp_flash_port/` to `esp_flash_chips/`:
   - Better reflects that these headers are for chip driver implementations
   - All chip driver headers moved to `esp_flash_chips/` directory
   - Added README.md explaining semi-public nature of these headers

2. Move internal headers to `esp_private/`:
   - `esp_flash_internal.h` -> `esp_private/esp_flash_internal.h`
   - `memspi_host_driver.h` -> `esp_private/memspi_host_driver.h`

3. Move chip driver related headers to `esp_flash_chips/`:
   - `esp_private/esp_flash_types.h` -> `esp_flash_chips/esp_flash_types.h`
   - `spi_flash/spi_flash_defs.h` -> `esp_flash_chips/spi_flash_defs.h`
   - `spi_flash_override.h` -> `esp_flash_chips/spi_flash_override.h`
   - All `spi_flash_chip_*.h` headers moved to `esp_flash_chips/`

4. Code improvements:
   - Remove unused includes (e.g., `spi_flash_override.h` from `cache_utils.c`)
   - Use public API `esp_flash_get_size()` instead of direct member access
   - Add `esp_flash_is_quad_mode` to linker.lf for IRAM placement

5. Documentation updates:
   - Add README.md in `esp_flash_chips/` explaining semi-public headers
   - Update programming guide with warnings about internal headers
   - Update both English and Chinese documentation

6. Update all references across the codebase:
   - Update includes in `spi_flash` component
   - Update `bootloader_support`, `app_update`, `esp_tee`, `espcoredump`
   - Update example projects

Breaking changes:
- Headers moved to new locations require include path updates
- `custom_flash_driver` example temporarily disabled until external
  components are updated
2026-01-29 03:28:30 +08:00