Commit Graph

863 Commits

Author SHA1 Message Date
Konstantin Kondrashov
777c72a01e fix(esp_image_format): validate MMU page size 2026-08-28 17:15:49 +03:00
Konstantin Kondrashov
85d56ea446 fix(esp_image_format): verify length of segment #0 for app description 2026-08-28 17:15:49 +03:00
Konstantin Kondrashov
95c4491fba fix(esp_image_format): Verify image segment count 2026-08-28 17:15:49 +03:00
Ashish Sharma
899aeadd7c fix(bootloader_support): guard NULL efuse digest slot in secure-boot verify 2026-08-25 12:02:05 +08:00
Marius Vikhammer
b0386e4144 change(bootloader): optimize bootloader size
Trim bootloader size by moving some logs to DEBUG. Allows
compiling bootloader on P4 with CONFIG_ESPTOOLPY_FLASHMODE_QIO
without changing partition table offset
2026-08-21 10:13:45 +08:00
Jiang Jiang Jian
cd9cc0a8b8 Merge branch 'fix/bootloader_log_format_drom_vaddr_v5.5' into 'release/v5.5'
fix(bootloader): use correct format specifier for MMU_LL_END_DROM_ENTRY_VADDR (v5.5)

See merge request espressif/esp-idf!51057
2026-08-06 12:25:39 +08:00
harshal.patil
159d222973 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:57:02 +08:00
wuzhenghui
f8ce91665e 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:40 +08:00
Mahavir Jain
6204c6dfff Merge branch 'fix/esp32p4_secure_boot_sig_block_v5.5' into 'release/v5.5'
fix(esp32p4): secure boot (ECDSA-P384) and flash encryption eFuse fixes (v5.5)

See merge request espressif/esp-idf!50900
2026-07-26 16:21:57 +05:30
Konstantin Kondrashov
918cac578b 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:33:19 +03:00
nilesh.kale
154f61ab9d 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-17 15:20:09 +05:30
nilesh.kale
1b11c82b1a 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-17 15:20:09 +05:30
Song Ruo Jing
b4b2d2d4d4 fix(stdio): add console input ability when selects ESP_CONSOLE_UART_CUSTOM_NUM_1 2026-07-09 20:32:24 +08:00
Nebojša Cvetković
4412b59933 fix(bootloader_support): Fix app verification when split across multiple mmaps
Merges https://github.com/espressif/esp-idf/pull/18495
2026-06-17 15:05:56 +03:00
Mahavir Jain
7d0545db69 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:35:23 +05:30
harshal.patil
8b2e942e4e change(esp_key_mgr): Store key_len field in the key_info
- Update the Key Manager key types to be generic
- Define a new enum to determine the length of the keys
- Refactor the Key Manager driver support generic key types and key lengths
- Also store key deployment mode in the key recovery info
2026-05-15 00:13:34 +05:30
harshal.patil
6e74698920 feat(flash_encryption): Remove mspi reset when switching the XTS-AES key source 2026-05-15 00:13:33 +05:30
gaoxu
dfa50ddeb4 fix(tsens): fix temp_sensor affect by adc reset 2026-04-16 19:23:17 +08:00
armando
0cb42beabf fix(spm): rename scp (scratchpad) to spm (scratchpad memory) 2026-03-31 09:24:53 +08:00
armando
55c462ccab change(mem): deprecated tcm and added scp memory utils 2026-03-31 09:22:11 +08:00
nilesh.kale
7ff9f65a24 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:22 +05:30
nilesh.kale
6584b5adad feat: enabled ECDSA peripheral support for ESSP32-P4 2026-02-09 20:05:46 +08:00
Xiao Xufeng
85f30c2665 fix: fix DCDC patch on P4 rev3.1 2026-01-19 22:34:23 +08:00
Xiao Xufeng
bb79e6f246 fix(esp32p4): fix efuse, encryption and other rev_min usage 2026-01-19 17:53:51 +08:00
Jiang Jiang Jian
781963c538 Merge branch 'fix/fix_c5_rng_to_lp_peri_dependency_v5.5' into 'release/v5.5'
fix(esp_hw_support): new solution to fix RNG to LP Peri domain dependency on C5 (v5.5)

See merge request espressif/esp-idf!44953
2026-01-18 23:05:33 +08:00
Mahavir Jain
79048b8aac Merge branch 'feat/enable_pseudo_round_support_for_xts_aes_esp32p4_eco5_v5.5' into 'release/v5.5'
feat: added support for pseudo round xts aes in esp32p4 eco5 (v5.5)

See merge request espressif/esp-idf!45172
2026-01-18 18:17:41 +05:30
nilesh.kale
d8885101cd feat: added support for pseudo round xts aes in esp32p4 eco5 2026-01-16 11:18:38 +05:30
wuzhenghui
67a62f45ce fix(esp_system): fix rom secure boot fast wake feature for c5/c6/h2/h21 2026-01-12 18:11:59 +08:00
wuzhenghui
670029c4da fix(esp_hw_support): fix RNG to LP peri domain dependency on C5 2026-01-09 15:05:55 +08:00
Mahavir Jain
f8fe1ce0ea Merge branch 'fix/secure_boot_verify_app_api_support_ecdsa_p384_v5.5' into 'release/v5.5'
Application's Secure Boot verify API support ECDSA-P384 (v5.5)

See merge request espressif/esp-idf!44181
2025-12-29 13:53:00 +05:30
Mahavir Jain
0f474752c7 Merge branch 'fix/fix_bootloader_skip_validate_in_deep_sleep_v5.5' into 'release/v5.5'
fix(bootloader): fix signature verification skip in deep sleep scenarios (v5.5)

See merge request espressif/esp-idf!43696
2025-12-26 09:53:51 +05:30
harshal.patil
cb9acbdd21 fix(secure_boot): Application's Secure Boot verify API support ECDSA-P384 2025-12-24 10:42:15 +05:30
Jiang Jiang Jian
ddb9f5d9dc Merge branch 'fix/fix_mspi_write_stuck_after_reset_v5.5' into 'release/v5.5'
fix(esp_system): fix mspi write stuck after cpu/digital reset on c5/c61 (v5.5)

See merge request espressif/esp-idf!43732
2025-12-04 10:34:56 +08:00
wuzhenghui
104145de7f fix(esp_system): fix mspi write stuck after cpu/digital reset on c5/c61 2025-12-02 13:34:17 +08:00
gaoxu
dfef29c007 feat(rng): support P4 ECO5 TRNG 2025-12-01 15:31:44 +08:00
gaoxu
94679d0b0e refactor(rng): refactor to use hal/ll apis for P4 2025-12-01 15:31:44 +08:00
Mahavir Jain
ac8b73bda1 fix(bootloader): fix signature verification skip in deep sleep scenario
For CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP enabled and exit from
deep sleep case the secure boot signature verification must be skipped
to improve the wakeup performance.

Closes https://github.com/espressif/esp-idf/issues/15590
2025-11-25 10:11:58 +05:30
Song Ruo Jing
fb20e147d5 fix(console): release default console UART pins if console is switched in bootloader
Also print out console UART pin number in app cpu_startup stage

Closes https://github.com/espressif/esp-idf/issues/16764
Closes https://github.com/espressif/esp-idf/issues/17459
2025-11-21 22:11:25 +08:00
wuzhenghui
3ee348fe52 fix(esp_hw_support): add p4 rev3.0 MSPI workaround for deepsleep 2025-10-30 19:09:44 +08:00
Mahavir Jain
042f29dd66 Merge branch 'fix/change_write_protection_bit_of_shared_security_efuses_v5.5' into 'release/v5.5'
Reorder write protection bits of some shared security efuses (v5.5)

See merge request espressif/esp-idf!42033
2025-10-15 09:38:59 +05:30
armando
e6d4eec507 feat(p4): p4 rev3 real chip support 2025-10-13 15:25:23 +08:00
harshal.patil
175a6510f5 fix(bootloader_support): Allow pre-programmed XTS-AES psuedo round level efuses
- The API esp_flash_encryption_set_release_mode() by defualt programs
the XTS-AES pseudo round level efuse to level low but did not considered
any existing value that would have been programmed in the efuse bit.
2025-10-13 10:40:16 +05:30
harshal.patil
70a8b4d842 fix(bootloader_support): Reorder write disabling ECDSA_CURVE_MODE 2025-10-13 10:40:16 +05:30
harshal.patil
d902072d80 fix(bootloader_support): Reorder write protection bits of some shared security efuses 2025-10-13 10:40:16 +05:30
Mahavir Jain
b0713ffe08 fix(bootloader): correct encryption length for secure update without secure boot
For secure update without secure boot case, the encryption length for
app image must consider signature block length as well. This was
correctly handled for secure boot case but not for secure update without
secure boot.
2025-09-16 10:16:37 +05:30
harshal.patil
476f8f6f51 feat(bootloader_support): Support Secure Boot using ECDSA-P384 curve 2025-07-25 14:25:31 +05:30
harshal.patil
55f693d4dd change(bootloader_support/secure_boot): Allow NULL as verified_digest for app build
The esp_secure_boot_verify_sbv2_signature_block() and esp_secure_boot_verify_rsa_signature_block()
APIs need and use the verified_digest argument only for BOOTLOADER_BUILD, but the argument is
not used in the application code, and the value present in verified_digest is considered invalid.
Thus, allow passing NULL as the verified_digest parameter to help some save space.
2025-07-25 14:23:02 +05:30
harshal.patil
1b3eb8f93e fix(bootloader_support/secure_boot): Fix incorrect usage of ESP_SECURE_BOOT_KEY_DIGEST_LEN 2025-07-25 14:23:02 +05:30
Aditya Patwardhan
a002a04332 feat(soc): Added soc capabilities related to RNG 2025-07-23 18:24:46 +05:30
Jiang Jiang Jian
3c39b32195 Chip/support esp32c61 v5.5 2025-07-22 12:21:36 +08:00