Commit Graph

33 Commits

Author SHA1 Message Date
wuzhenghui
5436d1f0c4 fix(esp_system): force enable uart0 sclk in esp_restart 2025-06-27 20:04:13 +08:00
Konstantin Kondrashov
ff0408c087 feat(esp_system): Adds Kconfigs to place code in IRAM 2025-06-23 13:23:33 +03:00
Wu Zheng Hui
8ab969db1c Merge branch 'bugfix/esp32c6_src_clk_label' into 'master'
clk: esp32c6: rename modem clock source selection

See merge request espressif/esp-idf!39756
2025-06-17 22:01:33 +08:00
Sylvio Alves
044de64f5b fix(esp_system): rename modem clock source selection
Make sure to use proper label for modem source selection.
This does not fix any issue.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-10 20:03:06 +08:00
wuzhenghui
34f249a28b feat(esp_hw_support): support esp_perip_clk_init for esp32c5 2025-05-27 19:55:22 +08:00
harshal.patil
e08189f37b fix(system_internal): Avoid the sec clock reset caused due to resetting all crypto peripherals 2025-05-22 16:01:02 +05:30
Mahavir Jain
55a2ad3df3 fix(esp_system): reset crypto peripherals before device restart
This change addresses a rare but critical issue observed on certain
ESP32-C3 and ESP32-S3 devices, where secure boot verification
intermittently fails due to improper cleanup of crypto peripherals
during a restart.

Background – Restart Behavior in IDF
------------------------------------
In ESP-IDF, when the device restarts (via `esp_restart()` or due to a
panic/exception), a partial peripheral reset is performed followed by a
CPU reset. However, until now, crypto-related peripherals were not
included in this selective reset sequence.

Problem Scenario
----------------
If a restart occurs while the application is in the middle of a bignum
operation (i.e., using the MPI/Bignum peripheral), the ROM code may
encounter an inconsistent peripheral state during the subsequent boot.
This leads to transient RSA-PSS secure boot verification failures.

Following such a failure, the ROM typically triggers a full-chip reset
via the watchdog timer (WDT). This full reset clears the crypto
peripheral state, allowing secure boot verification to succeed on the
next boot.

Risk with Aggressive Revocation
-------------------------------
If secure boot aggressive revocation is enabled (disabled by default in
IDF), this transient verification failure could mistakenly lead to
revocation of the secure boot digest.

If your product configuration has aggressive revocation enabled,
applying this fix is strongly recommended.

Frequency of Occurrence
-----------------------
The issue is rare and only occurs in corner cases involving
simultaneous use of the MPI peripheral and an immediate CPU reset.

Fix
---
This fix ensures that all crypto peripherals are explicitly reset prior
to any software-triggered restart (including panic scenarios),
guaranteeing a clean peripheral state for the next boot and preventing
incorrect secure boot behavior.
2025-04-15 19:06:26 +05:30
wuzhenghui
b3911c7c89 fix(esp_hw_support): fix unused OSC source deinit breaks XTAL32K configuration 2025-04-10 20:56:53 +08:00
wuzhenghui
c84757d35e fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists 2025-04-08 20:07:47 +08:00
Chen Jichang
44117b623d refactor(esp_rom): remove specific chip name when including rom header 2025-03-17 18:53:26 +08:00
C.S.M
5e4fd8ee52 refactor(bod): Move brownout handling file from esp_system to esp_hw_support 2025-01-08 14:41:37 +08:00
Alexey Lapshin
10115792ac fix(espcoredump): fix GCC-14 analyzer warnings for coredump 2024-12-04 18:43:30 +08:00
wuzhenghui
c067e406ce fix(esp_system): deselect all modem modules clk source selection before clk init 2024-11-15 11:00:16 +08:00
Marius Vikhammer
9c5dde5536 refactor(panic): refactor and unify cache panic errors 2024-11-07 11:39:40 +08:00
wuzhenghui
7fdfa6c227 fix(esp_hw_support): disable unused clock sources after rtc clock switching complete 2024-10-28 15:57:26 +08:00
Omar Chebib
22436dae10 fix(soc): add missing reset reasons for the ESP32-C61 2024-09-24 13:25:21 +08:00
C.S.M
8078ad7840 feat(brownout): Add brownout detector support on esp32c61 2024-08-22 11:26:30 +08:00
Mahavir Jain
79f9c7d157 feat(esp_security): Move DS, HMAC, DPA and crypto lock implementation 2024-08-20 12:35:22 +08:00
Jiang Jiang Jian
87eaf18eb6 Merge branch 'feature/esp32c61_light_sleep_support_stage_1' into 'master'
feat(esp_hw_support): esp32c61 sleep support (Stage 1: support modem clock)

Closes IDF-9513

See merge request espressif/esp-idf!32518
2024-08-19 10:38:57 +08:00
Lou Tianhao
6274040f38 feat(pm): support modem clock for esp32c61 2024-08-13 11:03:21 +08:00
Armando
e58d608034 fix(cache): fixed cache panic init flow on psram board 2024-08-13 09:30:46 +08:00
Mahavir Jain
f477682938 Merge branch 'feature/remove_aes_rsa_ds_hmac_spport_for_c61' into 'master'
feat: remove suppport for AES, RSA, DS and HMAC in esp32c61

Closes IDF-9326, IDF-9328, IDF-9323, and IDF-9325

See merge request espressif/esp-idf!31798
2024-08-08 17:15:06 +08:00
Armando
7231a6388b feat(cache): supported cache panic on c61 2024-08-08 10:38:02 +08:00
nilesh.kale
e74dcb1fab feat: remove support for aes and rsa peripherals in esp32c61 2024-08-06 15:06:16 +05:30
Armando (Dou Yiwen)
0dd91afb09 Merge branch 'feat/c61_cache' into 'master'
cache: supported cache on c61

Closes IDF-9253 and DOC-8436

See merge request espressif/esp-idf!32407
2024-08-02 03:37:43 +08:00
Armando
67b8dbb5e5 feat(cache): supported cache on c61 2024-08-01 09:34:18 +08:00
Song Ruo Jing
6db52ffe12 remove(clk): rc32k is removed as a clk source option for lp_slow_clk on C5/C61 2024-07-31 22:41:23 +08:00
Song Ruo Jing
335d39b869 feat(clk): Add basic clock support for esp32c61
- Support SOC ROOT clock source switch
- Support CPU frequency change
- Support RTC SLOW clock source switch
- Support RTC SLOW clock + RC FAST calibration
- Remove FPGA build
2024-07-31 22:41:22 +08:00
Xiao Xufeng
5b71b949be fix(startup): move rtc initialization before MSPI timing tuning to improve stability 2024-06-18 01:16:24 +08:00
wanglei
2e27c22afd fix(esp_system): remove sdio core rst for esp32c61 2024-05-11 14:46:09 +08:00
Lou Tianhao
3fb4909483 feat(example): support esp32c5 timer/gpio/uart wakeup 2024-04-10 11:45:04 +08:00
wanlei
a611e91b2f feat(esp32c61): new chip add system and esp_timer support 2024-03-21 11:31:15 +08:00
wanlei
ee02b71f1c feat(esp32c61): introduce target esp32c61 2024-03-01 21:12:25 +08:00