Commit Graph

1697 Commits

Author SHA1 Message Date
Marius Vikhammer 298da837fd feat(system): updated reset reasons for H21 2025-04-27 16:11:24 +08:00
Konstantin Kondrashov 33cab69f30 Merge branch 'feature/binary_logging' into 'master'
feat(log): Add binary logging support

Closes IDF-6634

See merge request espressif/esp-idf!36595
2025-04-23 19:55:45 +08:00
Sudeep Mohanty b9d055dfda Merge branch 'fix/multi_core_race_cond_in_panic_handler' into 'master'
fix(panic_handler): Prevent race condition in panic handler

Closes IDFCI-2802, IDFCI-2867, and IDFCI-2869

See merge request espressif/esp-idf!37958
2025-04-23 18:52:16 +08:00
Konstantin Kondrashov 204046e799 feat(log): Add binary logging support 2025-04-23 15:46:34 +08:00
Li Shuai 77a1e2931d change: fix build clang test apps job error 2025-04-17 22:01:10 +08:00
Mahavir Jain e37c47f6e7 Merge branch 'bugfix/crypto_reset_on_exit' into 'master'
fix(esp_system): reset crypto peripherals before device restart

See merge request espressif/esp-idf!38399
2025-04-17 21:24:25 +08:00
Sudeep Mohanty edf4234da9 fix(panic_handler): Prevent race condition in panic handler
This commit updates all RTC WDT contexts to be local instead of global
to avoid race conditions when both cores enter the panic handler
simultaneously.
2025-04-17 13:56:25 +02:00
Laukik Hase 4a4d63d36e feat(esp_tee): Protect the ECC peripheral from REE access 2025-04-16 19:19:04 +05:30
Laukik Hase fc4802c0d6 feat(esp_tee): Protect the HMAC and DS peripherals from REE access 2025-04-16 19:19:04 +05:30
laokaiyao 0abc755342 feat(rom): update rom for c5 eco2
Breaking: Starting from this commit, ESP-IDF can only support ESP32-C5 v1.0 (ECO2)
2025-04-16 11:01:36 +08:00
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
armando 1abe57c987 test(system): increased 200B memory leak thresh due to mmu mmap mutex
200B to extend the thresh, real increase to the memory usage will be smaller
2025-04-14 10:45:40 +08:00
wuzhenghui b3911c7c89 fix(esp_hw_support): fix unused OSC source deinit breaks XTAL32K configuration 2025-04-10 20:56:53 +08:00
Wu Zheng Hui 38fcc41ff2 Merge branch 'feat/enable_esp32p4_auto_clock_gate' into 'master'
feat(esp_hw_support): enable auto clock gating for multi peripherals

See merge request espressif/esp-idf!37986
2025-04-09 21:42:04 +08:00
wuzhenghui 6ca0614e89 feat(esp_hw_support): enable auto clock gating for multi peripherals 2025-04-09 17:07:49 +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
Jiang Jiang Jian 7daa7c8e0e Merge branch 'feat/esp32h21_system_sleep_cpu' into 'master'
Stage 4: Support esp32h21 CPU domain power down and retention

Closes PM-351

See merge request espressif/esp-idf!37510
2025-04-08 13:55:29 +08:00
Chen Jichang 2cbc297969 refactor(gptimer): use group_id in clock ctrl functions 2025-04-08 10:20:48 +08:00
Chen Jichang faacaaaf8f feat(gptimer): support gptimer on esp32h4 2025-04-08 09:55:42 +08:00
wanckl 51873d46aa feat(driver_spi): add h21 spi drivers supports 2025-04-03 11:27:29 +08:00
Chen Jichang c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
Li Shuai 689924724f change(esp_hw_support): cpu domain and retention support for esp32h21 2025-03-24 15:50:20 +08:00
Armando (Dou Yiwen) ee5042095b Merge branch 'refactor/psram_structure_refactor' into 'master'
refactor(psram): cleanup psram component code structure

See merge request espressif/esp-idf!37870
2025-03-21 00:52:03 +08:00
armando ac8cfadab0 refactor(psram): cleanup psram component code structure 2025-03-20 15:17:01 +08:00
Chen Jichang 44117b623d refactor(esp_rom): remove specific chip name when including rom header 2025-03-17 18:53:26 +08:00
Li Shuai 350e3c3d06 fix(esp_system): update clk code for esp32h21 2025-03-17 11:24:39 +08:00
Li Shuai ac5c5de378 change(esp_system): change for light sleep example build pass 2025-03-17 11:24:39 +08:00
Li Shuai 8103ea67c7 change(esp_hw_support): pmu driver, hal and ll layer support for esp32h21 2025-03-17 11:24:39 +08:00
morris b622aa382f Merge branch 'feat/h4_introduce_step6_esp_system' into 'master'
feat(esp32h4): support esp_system, esp_timer and freertos (stage6)

Closes IDF-12565

See merge request espressif/esp-idf!37269
2025-03-12 14:10:23 +08:00
Marius Vikhammer afedcb7c9b Merge branch 'bugfix/fix_secondary_console_no_vfs' into 'master'
fix(console): fixed secondary console not working on all chips without VFS

Closes IDF-12577

See merge request espressif/esp-idf!37464
2025-03-12 13:51:37 +08:00
Chen Jichang 8670800827 refactor(esp32h4): refactor memory.ld and section.ld 2025-03-11 16:48:21 +08:00
Chen Jichang 69d2e7facb refactor(cpu): move some chip-specific operations to the ll 2025-03-11 16:48:21 +08:00
Chen Jichang 8e8c0573b4 feat(esp32h4): support esp_system, esp_timer and freertos (stage6) 2025-03-11 16:48:21 +08:00
Ondrej Kosta ae10c1333d fix(esp_system): removed L2MEM buffer enable for P4 2025-03-11 14:53:29 +08:00
Jiang Jiang Jian aa2f638e06 Merge branch 'fix/fix_esp32s3_reboot_cache_failure' into 'master'
fix(esp_system): fix esp32s3  possible cache_error triggered by another core accessing flash in esp_restart

See merge request espressif/esp-idf!37554
2025-03-07 20:26:19 +08:00
Marius Vikhammer 12e9d6514a fix(console): fixed secondary console not working on all chips without VFS 2025-03-07 14:41:19 +08:00
Armando d64ca3a5d1 fix(mspi): fixed cpu and mspi freq mismatch issue when in dfs/sleep on p4 2025-03-07 12:27:16 +08:00
wuzhenghui d418cb4a40 fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart 2025-03-06 21:21:54 +08:00
Roland Dobai 7317d96bc3 Merge branch 'fix/remove-unnecessary-select' into 'master'
fix(esp_system): Remove unnecessary select from esp_system/Kconfig

Closes IDF-12540

See merge request espressif/esp-idf!37232
2025-03-05 21:47:57 +08:00
igor.udot daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Jan Beran 0ef626c3cb fix(esp_system): Remove unnecessary select from esp_system/Kconfig 2025-03-03 09:19:07 +01:00
morris 2cd87223a8 feat(l2mem): enable buffer mode for ahb burst access 2025-03-03 14:38:24 +08:00
Laukik Hase 26fa7109f3 fix(esp_tee): Protect the AES/SHA clock registers from REE access 2025-02-25 16:49:08 +05:30
Wan Lei 73eb376eb1 Merge branch 'feat/h21_gptimer_support' into 'master'
feat(driver_gptimer): esp32h21 add basic gptimer support

Closes IDF-11594

See merge request espressif/esp-idf!37028
2025-02-24 19:32:11 +08:00
wanckl cfe4bf339f feat(driver_gptimer): esp32h21 add basic gptimer support 2025-02-21 20:22:41 +08:00
Sudeep Mohanty b562afa08e fix(panic_handler): Updated panic handler to use RTC WDT
This commit updates the following:
- Updates the panic handler to use only the RTC WDT to reset the system.
- Refactors some of the panic handler code.
- Updates Bluetooth files where in they now feed the WDTs instead of
  reconfiguring them.
- Removes some unnecessary configuration of WDTs from various files.
- Added a unit test to verify that the system does not lock up when the
  panic handler is stuck.
- Updates the memprot unit tests to work with the refactored panic
  handler.

Closes https://github.com/espressif/esp-idf/issues/15166
Closes https://github.com/espressif/esp-idf/issues/15018
Closes https://github.com/espressif/esp-idf/issues/10110
2025-02-18 15:40:54 +01:00
Wu Zheng Hui e95103aa56 Merge branch 'fix/add_sleep_duration_check_for_timer_wakeup' into 'master'
fix(esp_hw_support): add timer wakeup sleep duration check

Closes IDFGH-14485

See merge request espressif/esp-idf!36793
2025-02-13 10:42:58 +08:00
Chen Ji Chang 9342b3fba1 Merge branch 'feat/h4_introduce_step1_add_target' into 'master'
feat(esp32h4): introduce target esp32h4(stage 1)

See merge request espressif/esp-idf!36780
2025-02-11 18:11:08 +08:00
Jiang Jiang Jian 44a27d3113 Merge branch 'fix/disable_wfe_feature_for_e906_chips' into 'master'
change(esp_hw_support): disable CPU wait-for-event mode on cpu start

See merge request espressif/esp-idf!36388
2025-02-11 11:30:29 +08:00
Chen Jichang 6f83f39dce feat(esp32h4): introduce target esp32h4(stage 1) 2025-02-08 17:07:44 +08:00