Commit Graph

1040 Commits

Author SHA1 Message Date
sibeibei 79a7e3ceda fix(wifi): clear regdma status when restart 2026-03-12 15:21:12 +08:00
Xiao Xufeng 07bd3a910f dma: fixed issue that DMA are not reset when CPU reset
When DMA keep writing the memory, some data may be corrupted after reset. For example, the stack of bootloader may be overwritten and failed to boot until a higher scope of reset (Core).
2026-01-22 02:58:20 +08:00
wuzhenghui 34efa0f834 fix(esp_system): fix rom secure boot fast wake feature for c5/c6/h2/h21 2026-01-12 19:52:17 +08:00
wuzhenghui 4a0aac02a4 fix(esp_system): fix XTAL32K power breaks ADC function on 32k XTAL clock pin 2025-11-17 10:57:02 +08:00
Omar Chebib 1da0562506 fix(esp_system): prevent .eh_frame-based unwinding from looping indefinitely 2025-11-06 14:17:12 +08:00
wuzhenghui 3c48d5af38 fix(esp_system): fix ext 32k io revoking breaks sleep io holding 2025-10-10 20:28:53 +08:00
Jiang Jiang Jian e1cd87c9cd Merge branch 'fix/eh_frame_parser_warnings_v5.2' into 'release/v5.2'
fix(esp_system): fix potential warnings related to array size in .eh_frame parser (backport v5.2)

See merge request espressif/esp-idf!41986
2025-10-09 10:50:41 +08:00
harshal.patil 56718b31dc fix(bootloader_support): Reorder write disabling ECDSA_CURVE_MODE 2025-09-30 15:02:31 +05:30
harshal.patil 7d702f1c40 fix(bootloader_support): Reorder write protection bits of some shared security efuses 2025-09-30 14:44:09 +05:30
Omar Chebib 849695ad57 fix(esp_system): fix potential warnings related to array size in .eh_frame parser 2025-09-18 10:36:40 +08:00
Alexey Lapshin 80efa2f96e feat(cxx): get rid of _Unwind_SetEnableExceptionFdeSorting 2025-08-14 18:14:52 +07:00
nilesh.kale 623bf9b602 feat: enabled ECDSA-P192 support for ESP32H2 2025-07-22 11:26:25 +05:30
Jiang Jiang Jian a488c9f9eb Merge branch 'bugfix/crypto_reset_on_exit_v5.2' into 'release/v5.2'
fix(esp_system): reset crypto peripherals before device restart (v5.2)

See merge request espressif/esp-idf!38477
2025-04-27 14:17:35 +08:00
Sudeep Mohanty d1e238a85c 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-23 12:54:04 +02:00
morris 34a92965d0 Merge branch 'fix/fix_mmu_map_concurrent_issue_v5.2' into 'release/v5.2'
mmu: fix mmu map concurrent issue (v5.2)

See merge request espressif/esp-idf!38408
2025-04-17 21:29:25 +08:00
Mahavir Jain 70b1496d9f 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-16 20:40:09 +08:00
wuzhenghui deffa33d5f fix(esp_hw_support): fix unused OSC source deinit breaks XTAL32K configuration 2025-04-16 15:03:11 +08:00
wuzhenghui b4c907e36d fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists 2025-04-16 15:02:35 +08:00
armando b3e085cc91 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-15 14:26:19 +08:00
Jiang Jiang Jian 1512f758ce Merge branch 'fix/fix_esp32s3_reboot_cache_failure_v5.2' into 'release/v5.2'
fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart (v5.2)

See merge request espressif/esp-idf!37587
2025-04-03 10:27:54 +08:00
Marius Vikhammer a0ba8c9e1d Merge branch 'bug/xtensa_cpu1_sys_lockup_v5.2' into 'release/v5.2'
fix(panic_handler): Updated panic handler to use RTC WDT (v5.2)

See merge request espressif/esp-idf!37121
2025-03-12 09:58:59 +08:00
wuzhenghui 73d9cb3517 fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart 2025-03-07 20:27:17 +08:00
Sudeep Mohanty ed720503fb 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-03-06 09:06:53 +01:00
Jan Beran e12ecc375c fix(esp_system): Remove unnecessary select from esp_system/Kconfig 2025-03-05 15:09:36 +01:00
Jiang Jiang Jian 2bde2d8e30 Merge branch 'fix/usb-cdc-non-blocking-read_v5.2' into 'release/v5.2'
fix(esp_vfs_console): USB CDC read when non blocking (backport v5.2)

See merge request espressif/esp-idf!36748
2025-03-04 11:01:27 +08:00
Mahavir Jain 1beb0bcd79 Merge branch 'fix/fetch_image_hdr_v5.2' into 'release/v5.2'
fix(esp_system): Correct address used to fetch application image header (v5.2)

See merge request espressif/esp-idf!34629
2025-02-28 21:34:33 +08:00
wuzhenghui 5e81eb6cf7 fix(esp_hw_support): add timer wakeup sleep duration check
Closes https://github.com/espressif/esp-idf/issues/15255
2025-02-17 19:57:11 +08:00
Laukik Hase b216535f73 fix(esp_system): Correct address used to fetch application image header 2025-02-14 16:38:56 +05:30
Aditya Patwardhan 1c9146f0c2 fix(hal): Make the ECDSA countermeasure dynamically applicable
This commit makes the ECDSA countermeasure dynamically applicable
    across different revisions of the ESP32H2 SoC.
2025-02-10 21:24:58 +05:30
Guillaume Souchere 567469dd27 fix(esp_vfs_console): USB CDC read when non blocking
In non blocking mode, the read function is expected
to return weather data is available for reading or not.

In case data are available but the size does not match
the expected size, the function read should return whatever
data is available.

Previously, the function was returning -1 with errno set
to EWOULDBLOCK even if the size of data in the buffer was
less than the requested size. It would only return the
available data if the size in the buffer was greater or equal
to the requested size.

The implementation of cdcacm_read is modified to return the avilable
data from the buffer even is the size is lesser than the requested
size.
2025-02-06 08:57:38 +01:00
Mahavir Jain 84d2a8818c feat(ecc): enable ECC constant time mode for ESP32-H2 ECO5 2025-02-06 08:14:50 +05:30
Marius Vikhammer 0fc594154a Merge branch 'feature/efuse_update_for_esp32h2_eco5_v5.2' into 'release/v5.2'
feat(efuse): Adds efuses for esp32h2 eco5 (v5.2)

See merge request espressif/esp-idf!36246
2025-01-16 17:50:54 +08:00
laokaiyao 43ad52ee95 refactor(lpperi): improve compatibility solution 2025-01-15 20:42:44 +08:00
laokaiyao be89694353 refactor(lpperi): compatible refactor for H2 ECO5 2025-01-15 20:42:44 +08:00
Jiang Jiang Jian fe262a71f0 Merge branch 'change/change_pm_slp_iram_opt_dependence_v5.2' into 'release/v5.2'
change(esp_pm): change pm_slp_iram_opt dependence(backport v5.2)

See merge request espressif/esp-idf!33869
2025-01-09 11:43:40 +08:00
Konstantin Kondrashov c827c83fee feat(espefuse): Adds efuses for esp32h2 eco5
- Support efuses that are not present in the main efuse table
2025-01-08 12:18:34 +02:00
Michael (XIAO Xufeng) b3b14bdf43 Merge branch 'bugfix/warn_rc32k_use_in_kconfig_v5.2' into 'release/v5.2'
fix(clk): add an inevitable kconfig option to be selected to use rc32k (v5.2)

See merge request espressif/esp-idf!35966
2025-01-07 15:49:51 +08:00
Marek Fiala 3cca3da1d5 feat(tools): Enforce utf-8 encoding with open() function 2025-01-02 16:12:47 +01:00
Song Ruo Jing 47c9382cc2 fix(clk): add an inevitable kconfig option to be selected to use rc32k 2024-12-25 20:07:26 +08:00
Armando 80abc301bd fix(cache): fixed cache hal ctx not initialised in app issue 2024-12-19 15:16:05 +08:00
Lou Tianhao 7a750a55f8 change(esp_pm): change pm_slp_iram_opt dependence 2024-12-11 10:15:56 +08:00
Erhan Kurubas 1011ab5f6d fix(espcoredump): prevent null pointer dereference in panic reason handling 2024-12-09 15:19:43 +01:00
wuzhenghui 6e1c4f8971 fix(esp_system): deselect all modem modules clk source selection before clk init 2024-11-15 13:46:28 +08:00
wuzhenghui b8e796cb67 fix(esp_hw_support): disable unused clock sources after rtc clock switching complete 2024-10-28 19:57:56 +08:00
Jiang Jiang Jian ad32630480 Merge branch 'fix/keep-got-sections-for-riscv_v5.2' into 'release/v5.2'
feat(esp_system): drop .got* sections and add hint (v5.2)

See merge request espressif/esp-idf!33371
2024-10-17 10:46:49 +08:00
Jiang Jiang Jian 35d88960c0 Merge branch 'bugfix/riscv_task_wdt_cleanup_v5.2' into 'release/v5.2'
fix(wdt): changed register dump on task WDT to be more descriptive (v5.2)

See merge request espressif/esp-idf!33106
2024-10-17 10:44:23 +08:00
Marius Vikhammer a6cce532f5 fix(wdt): changed register dump on non panic task WDT to be more descriptive
Closes https://github.com/espressif/esp-idf/issues/14400
2024-09-14 10:11:10 +08:00
Alexey Lapshin b746f6d6ef feat(esp_system): drop .got* sections and add hint
Closes https://github.com/espressif/esp-idf/issues/14296
2024-09-06 18:48:39 +07:00
Chen Jichang 3efad30654 feat(psram): add psram noinit segment support on S2/S3/P4/C5
Closes https://github.com/espressif/esp-idf/issues/14253
2024-09-03 17:42:09 +08:00
Jakob Hasse 3b330b4f2f fix(esp_system): properly exclude XTAL32K WDT from other chips
Closes https://github.com/espressif/esp-idf/issues/13955
2024-08-28 10:40:39 +08:00