Commit Graph

1364 Commits

Author SHA1 Message Date
yanzihan@espressif.com
34b8f67a89 feat(esp_hw_support): use pvt to auto control digital ldo and rtc ldo for esp32p4 2025-06-25 18:22:02 +08:00
wanckl
ea03622621 ci(esp32c61): remove c61 support from readme on 5.4 2025-06-17 15:09:40 +08:00
Omar Chebib
fd7cfe0b04 fix(esp_system): fix RTC reserved area alignment in the linker script
Make sure the size of the RTC reserved area complies with the alignment requirement.

Closes https://github.com/espressif/esp-idf/issues/13082
2025-05-27 11:20:07 +08:00
Jiang Jiang Jian
fc5b878c65 Merge branch 'fix/remove-unnecessary-select_v5.4' into 'release/v5.4'
fix(esp_system): Remove unnecessary select from esp_system/Kconfig (v5.4)

See merge request espressif/esp-idf!37520
2025-05-26 19:52:26 +08:00
Jiang Jiang Jian
ee04629723 Merge branch 'feat/some_xip_psram_related_optimisations_and_fixes_v5.4' into 'release/v5.4'
feat(esp_psram): Add some wasted XIP PSRAM memory in heap and PSRAM protection (v5.4)

See merge request espressif/esp-idf!38872
2025-05-26 19:46:08 +08:00
Jan Beran
fdca2c76f3 fix(esp_system): Remove unnecessary select from esp_system/Kconfig 2025-05-12 09:51:04 +02:00
Alexey Lapshin
c06fb3b759 fix(system): linker script: free unused .rtc.text memory for esp32c3/esp32s2/esp32s3 2025-05-09 11:39:24 +08:00
harshal.patil
26586deb7d fix(esp_psram): Add XIP PSRAM alignment gaps in heap only if PSRAM protection is enabled 2025-05-05 11:52:15 +05:30
harshal.patil
9406fde68d feat(cpu_region_protect): Enable basic memory protection for SPIRAM 2025-05-05 11:52:04 +05:30
Sudeep Mohanty
f56cf54183 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-25 09:10:58 +02:00
Mahavir Jain
5cdc53df23 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-23 17:53:09 +08:00
Jiang Jiang Jian
9f8548bb2d Merge branch 'feat/enable_esp32p4_auto_clock_gate_v5.4' into 'release/v5.4'
feat(esp_hw_support): enable auto clock gating for multi peripherals (v5.4)

See merge request espressif/esp-idf!38443
2025-04-17 17:13:40 +08:00
morris
0be344409b Merge branch 'fix/fix_mmu_map_concurrent_issue_v5.4' into 'release/v5.4'
mmu: fix mmu map concurrent issue (v5.4)

See merge request espressif/esp-idf!38411
2025-04-17 15:59:06 +08:00
wuzhenghui
7643f77225 feat(esp_hw_support): enable auto clock gating for multi peripherals 2025-04-16 15:08:51 +08:00
wuzhenghui
ba88b91e28 fix(esp_hw_support): fix unused OSC source deinit breaks XTAL32K configuration 2025-04-16 14:56:49 +08:00
wuzhenghui
54c4606111 fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists 2025-04-16 14:56:12 +08:00
armando
873cde487c 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:22:48 +08:00
Martin Vychodil
9df731bf36 Merge branch 'fix/incorrect_console_open_and_close_behaviour_v5.4' into 'release/v5.4'
fix(storage/vfs_console): stop new console opens from overwriting existing fds (v5.4)

See merge request espressif/esp-idf!35267
2025-04-03 17:01:57 +08:00
Wang Meng Yang
0cecb7bcf3 Merge branch 'bug/xtensa_cpu1_sys_lockup_v5.4' into 'release/v5.4'
fix(panic_handler): Updated panic handler to use RTC WDT (v5.4)

See merge request espressif/esp-idf!37112
2025-04-01 14:51:18 +08:00
Tomáš Rohlínek
8e0239f04b fix(storage/console): fix test configuration 2025-03-12 20:06:31 +08:00
Tomáš Rohlínek
c6d24bddf7 fix(storage/vfs_console): stop new console opens from overwriting existing fds 2025-03-12 20:06:31 +08:00
wuzhenghui
6de3fde3c2 fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart 2025-03-10 11:40:10 +08:00
Armando
419e8b2e20 fix(mspi): fixed cpu and mspi freq mismatch issue when in dfs/sleep on p4 2025-03-08 14:06:09 +08:00
Sudeep Mohanty
cd887ef59a 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:17:26 +01:00
Jiang Jiang Jian
da3f2ea5ce Merge branch 'fix/add_sleep_duration_check_for_timer_wakeup_v5.4' into 'release/v5.4'
fix(esp_hw_support): add timer wakeup sleep duration check (v5.4)

See merge request espressif/esp-idf!37010
2025-02-19 13:48:17 +08:00
wuzhenghui
95fb085fe3 fix(esp_hw_support): add timer wakeup sleep duration check
Closes https://github.com/espressif/esp-idf/issues/15255
2025-02-18 19:21:57 +08:00
wuzhenghui
1e11f287e1 change(esp_hw_support): disable CPU wait-for-event mode on cpu start 2025-02-18 19:21:09 +08:00
Marius Vikhammer
36ae237691 Merge branch 'fix/usb-cdc-non-blocking-read_v5.4' into 'release/v5.4'
fix(esp_vfs_console): USB CDC read when non blocking (backport v5.4)

See merge request espressif/esp-idf!36750
2025-02-18 12:17:08 +08:00
Omar Chebib
d3a9545e95 fix(esp_system): add missing arrays attribute in the ESP32-P4 linker script 2025-02-14 10:58:12 +08:00
Jiang Jiang Jian
97404fa883 Merge branch 'fix/fix_branch_predictor_access_flash_after_cache_diabled_v5.4' into 'release/v5.4'
fix(esp_hw_support): fix branch predictor access flash after cache disabled (v5.4)

See merge request espressif/esp-idf!36558
2025-02-12 17:59:36 +08:00
Guillaume Souchere
4b5e246b5b 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 09:01:30 +01:00
Li Shuai
c74a5e3e8e change(esp_hw_support): fix wifi mac rx buffer link exception caused by pll clock 2025-01-26 14:54:33 +08:00
wuzhenghui
cfcd8990f6 fix(esp_hw_support): fix branch predictor access flash after cache disabled 2025-01-22 19:24:48 +08:00
laokaiyao
889537960e refactor(lpperi): improve compatibility solution 2025-01-16 10:21:17 +08:00
Roland Dobai
a84b03dd41 Merge branch 'fix/remove_duplicates_from_sdkconfig_renames_v5.4' into 'release/v5.4'
fix: remove duplicit lines from sdkconfig.rename files (v5.4)

See merge request espressif/esp-idf!36346
2025-01-15 17:58:26 +08:00
morris
1cb5c64fc0 Merge branch 'refactor/update_lpperi_regs_for_h2_eco5_v5.4' into 'release/v5.4'
refactor(lpperi): compatible refactor for H2 ECO5 (v5.4)

See merge request espressif/esp-idf!36335
2025-01-15 16:09:59 +08:00
Jan Beran
350d38f989 fix: remove duplicit lines from sdkconfig.rename files 2025-01-13 09:07:21 +01:00
morris
cf1692c96c Merge branch 'bugfix/reset_axi_gdma_gracefully_v5.4' into 'release/v5.4'
fix(gdma): stop the axi gdma gracefully on CPU SW reset (v5.4)

See merge request espressif/esp-idf!36283
2025-01-13 15:12:26 +08:00
laokaiyao
25f64d9cbd refactor(lpperi): compatible refactor for H2 ECO5 2025-01-13 14:36:00 +08:00
Marek Fiala
b37383f75b feat(tools): Enforce utf-8 encoding with open() function 2025-01-10 13:52:58 +08:00
morris
605fb6e894 fix(dma): abort the axi dma gracefully on CPU SW reset 2025-01-10 10:14:36 +08:00
morris
ac6e1341c4 Merge branch 'fix/flash_noos_issues_v5.4' into 'release/v5.4'
flash: fixed some no_os API issues (v5.4)

See merge request espressif/esp-idf!35791
2025-01-08 22:12:16 +08:00
Armando
4a9fb951cf fix(cache): fixed cache hal ctx not initialised in app issue 2025-01-07 20:08:02 +08:00
Erhan Kurubas
954132b68a fix(system): avoid unexcpected hp_sys_wdt reset 2025-01-07 20:07:17 +08:00
Marius Vikhammer
012de83f3c Merge branch 'fix/coredump-gcc-analyzer-warnings_v5.4' into 'release/v5.4'
fix(system): fix GCC-14 analyzer warnings for coredump (v5.4)

See merge request espressif/esp-idf!35521
2025-01-06 14:38:23 +08:00
Song Ruo Jing
77e88f98cd fix(esp_system): still gate hp periph clk on core/system reset for power saving
Leaving only hp periph clk source should not be gated on core/system reset
2024-12-12 21:03:37 +08:00
Song Ruo Jing
192f01c65f fix(esp_system): hp periph clk should not be gated on core/system reset 2024-12-12 21:03:37 +08:00
Erhan Kurubas
190f021ba8 fix(espcoredump): prevent null pointer dereference in panic reason handling 2024-12-09 14:48:39 +01:00
Alexey Lapshin
3375c87e55 fix(espcoredump): fix GCC-14 analyzer warnings for coredump 2024-12-09 14:48:39 +01:00
Song Ruo Jing
623351e791 fix(clk): add an inevitable kconfig option to be selected to use rc32k 2024-12-02 11:15:17 +08:00