Commit Graph

647 Commits

Author SHA1 Message Date
Marius Vikhammer
c90681a167 feat(bootloader): check and update bootloader/bootloader support component for C5 2024-03-08 10:25:21 +08:00
Armando (Dou Yiwen)
7b414002f6 Merge branch 'change/psram_200m_update' into 'master'
change(psram): update voltage configurations

See merge request espressif/esp-idf!28933
2024-03-01 15:17:24 +08:00
Armando
62440e5b12 change(psram): update voltage configurations 2024-02-29 10:42:37 +08:00
Song Ruo Jing
98d9f04b00 feat(gdma): add GDMA support for ESP32C5 2024-02-28 12:38:02 +08:00
Marius Vikhammer
c3ecd6d1f7 Merge branch 'bugfix/reset_reasons' into 'master'
Update reset reasons for C6, H2, P4 and C5

Closes IDF-5719 and IDF-8660

See merge request espressif/esp-idf!28999
2024-02-22 11:02:29 +08:00
Marius Vikhammer
4ce4af61ad fix(system): update reset reasons for P4 and C5 2024-02-21 11:59:28 +08:00
Jiang Jiang Jian
e1a5633e18 Merge branch 'bugfix/bootloader_custom_rtc_data_crc_master' into 'master'
fix(bootloader): add legacy retained memory CRC calculation

Closes IDFGH-11747

See merge request espressif/esp-idf!28934
2024-02-21 10:39:14 +08:00
Mahavir Jain
c33b9e1426
fix(bootloader_support): check the secure version only for app image
Secure version in the image header is only available for the application
image. However, for certain security workflows, bootloader verifies
itself (own image) and hence the secure version check during that must be
avoided.

Regression introduced in recent commit-id: 3305cb4d

Tested that both secure boot and flash-enc workflows work correctly
with the anti-rollback scenario.
2024-02-19 14:54:17 +05:30
Konstantin Kondrashov
9b0eefee73 feat(bootloader_support): Support SB-on app can do OTA on SB-off chip
Closes: https://github.com/espressif/esp-idf/issues/13139
2024-02-12 17:27:50 +02:00
Omar Chebib
75eb489105 fix(bootloader): add legacy retained memory CRC calculation
* Closes https://github.com/espressif/esp-idf/issues/12849

In former versions of ESP-IDF, the user custom memory data in the retained memory
was taken into account during the CRC calculation. This was changed in a later
commit, the custom memory was ignored, therefore this can seen as a breaking change.
This commit gives the possibility to choose between the former (legacy) or
new way of calculating the CRC.
2024-02-09 16:49:56 +08:00
Mahavir Jain
34723ad12c Merge branch 'bugfix/ota_anti_rollback_checks_2' into 'master'
feat(bootloader_support): Read secure_version under sha256 protection

Closes IDF-9013

See merge request espressif/esp-idf!28740
2024-02-08 23:10:08 +08:00
Mahavir Jain
3305cb4d23 fix(ota): additional checks for secure version in anti-rollback case
Some additional checks related to secure version of the application in
anti-rollback case have been added to avoid any attempts to boot lower
security version but valid application (e.g., passive partition image).

- Read secure_version under sha256 protection

- First check has been added in the bootloader to ensure correct secure
  version after application verification and loading stage. This check
  happens before setting up the flash cache mapping and handling over
  the final control to application. This check ensures that application
  was not swapped (e.g., to lower security version but valid image) just
  before the load stage in bootloader.

- Second check has been added in the application startup code to ensure
  that currently booting app has higher security version than the one
  programmed in the eFuse for anti-rollback scenario. This will ensure
  that only the legit application boots-up on the device for
  anti-rollback case.
2024-02-07 22:23:10 +08:00
Song Ruo Jing
95133c179f feat(clk): preliminary clock tree support for ESP32C5 2024-02-07 14:38:15 +08:00
Konstantin Kondrashov
4daaa94593 Merge branch 'feature/cleanup_rom_efuse_header' into 'master'
change(all): Clearing unused efuse rom headers

See merge request espressif/esp-idf!27109
2024-01-26 20:30:44 +08:00
Aditya Patwardhan
4dc2ace0b7
fix(esp_hw_support): Update key manager support
1) Added new Key Manager APIs
    2) Added crypto locking layer for Key Manager
    3) Remove support for deploying known key
    4) Format key manager support
    5) Fix build header error
    6) Updated the key_mgr_types.h file
    7) Added key manager tests
2024-01-23 10:24:39 +05:30
KonstantinKondrashov
b471d9d22c change(all): Clearing unused efuse rom headers 2024-01-22 18:02:55 +02:00
Cao Sen Miao
6768805d20 fix(uart,usj...): Fix wrong serial number that has been parsed to rom functions,
Closes https://github.com/espressif/esp-idf/issues/12958
2024-01-18 10:51:51 +08:00
laokaiyao
d0a8f3e5c4 feat(esp32c5): support esptool on esp32c5 beta3 2024-01-09 13:11:11 +08:00
laokaiyao
3d459e423a feat(esp32c5): support esp32c5 beta3 48M xtal 2024-01-09 13:11:11 +08:00
laokaiyao
11e19f40b9 feat(esp32c5): support to build hello world on esp32c5 beta3 2024-01-09 13:11:11 +08:00
laokaiyao
a48f4760d2 feat(esp32c5): add system related supports 2024-01-02 11:17:11 +08:00
Song Ruo Jing
1dfa4011f0 Merge branch 'feature/esp32p4_clock_support' into 'master'
feat(clk): add basic clock support for esp32p4

Closes IDF-7526 and IDF-7569

See merge request espressif/esp-idf!27950
2023-12-29 12:34:12 +08:00
Song Ruo Jing
7f2b85b82b feat(clk): add basic clock support for esp32p4
- Support CPU frequency 360MHz
- Support SOC ROOT clock source switch
- Support LP SLOW clock source switch
- Support clock calibration
2023-12-29 00:37:26 +08:00
Darian Leung
d74b4f6730 refactor(hal/usb): Rename usb_fsls_phy API to match header/source names
Note: Also fixed some formatting issues in usb_wrap_struct.h
2023-12-28 11:48:54 +08:00
Darian Leung
b26472af29 refactor(hal/usb): Rename usb_phy files to usb_fsls_phy
This commit renames USB PHY related HAL files from "usb_phy_xxx" to
"usb_fsls_phy_xxx" since they are only designed to support Full-Speed/Low-Speed
Serial USB PHYs. This renmaing is done to accommodate future USB PHYs that use
other PHY interfaces (e.g., UTMI, ULPI etc).
2023-12-28 11:48:34 +08:00
harshal.patil
42943845e4
feat(bootloader_support): Encrypt only the app image instead of the whole partition
Currently, when flash encryption is enabled, the whole partition gets encrypted.
This can be optimised by encrypting only the app image instead of encrypting the whole partition.

Closes https://github.com/espressif/esp-idf/issues/12576
2023-12-18 17:10:17 +05:30
harshal.patil
cb169cb02f
fix(bootloader_support): Fix image_length calculation when secure boot v1 is enabled
Fixed the value of the image_length field of the image metadata populated by esp_image_verfiy()
to include the size of the signature sector when Secure Boot V1 is enabled.
2023-12-18 17:08:11 +05:30
harshal.patil
fe293dfd83
feat(bootloader_support): Make esp_secure_boot_verify_sbv2_signature_block() function public
Closes https://github.com/espressif/esp-idf/issues/12717
2023-12-11 18:50:55 +05:30
Mahavir Jain
25c2cc5f03 Merge branch 'feature/esp32p4_enable_flash_encryption' into 'master'
Enable Flash Encryption for ESP32P4

Closes IDF-7545

See merge request espressif/esp-idf!26959
2023-12-05 21:42:18 +08:00
Aditya Patwardhan
a84234c23f
feat(security): Enable Flash encryption for ESP32P4 2023-12-05 13:10:55 +05:30
Darian
cc34c4fc08 Merge branch 'contrib/github_pr_12481' into 'master'
Many places in the ESP_SYSTEM are using CONFIG_FREERTOS_UNICORE instead of CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE (GitHub PR)

Closes IDFGH-11333

See merge request espressif/esp-idf!27435
2023-12-01 19:33:19 +08:00
laokaiyao
7fa0d61c35 refactor(build_test_rules): invert the logic to avoid involving preview target
Only set enable condition for the app will introduce the preview target in README.md
Replace with disable logic instead
2023-11-28 16:14:17 +08:00
fl0wl0w
d149c1b26f Use configuration option instead of in components not related to FreeRTOS
Mergeshttps://github.com/espressif/esp-idf/pull/12481
2023-11-28 07:49:20 +00:00
wuzhenghui
0ab0d2182e fix(esp_hw_support): fix lightsleep current leakage on usb-phy controlled pad 2023-11-11 13:00:55 +08:00
Song Ruo Jing
46d33e46ef fix(console): enable to select UART1 port for console output
This feature was only enabled for esp32, esp32s2, esp32s3 previously.
Now, enabling this feature for all targets.
2023-11-09 22:32:49 +08:00
Xiao Xufeng
28f19cf0e6 fix(ram_app): Fixed issue ram_app can't use the SPI Flash
1st bootloader won't help to initialize the MSPI & cache properly as it
usually do when loading from flash. And the ram app doesn't have valid
headers.

Since there is no enough space in 2nd bootloader, we replace the
`bootloader_init_spi_flash` in the ram_app (!pure_ram_app), with an
customized alternative of it for the ram_app.

This alternative helps to initialize the MSPI & cache properly, without
the help of 1st bootloader or image headers.
2023-11-01 02:01:45 +08:00
Ivan Grokhotkov
cbb6fa0507 Merge branch 'bugfix/esp32s3_usb_otg_console_without_efuse' into 'master'
fix(console): switch USB PHY to OTG when OTG is used for console

Closes IDFGH-11281

See merge request espressif/esp-idf!26653
2023-10-27 20:09:09 +08:00
Ivan Grokhotkov
a8e175364a
fix(console): switch USB PHY to OTG when OTG is used for console
On ESP32-S3 with the default efuse settings, USB PHY is connected to
the USB_SERIAL_JTAG peripheral. If USB OTG peripheral is used for the
console, we need to additionally switch the PHY to USB OTG, otherwise
we won't get any output.

Closes https://github.com/espressif/esp-idf/issues/12437
2023-10-24 13:29:15 +02:00
Erhan Kurubas
6cd8030160 Merge branch 'check_debug_aware_config' into 'master'
fix(esp_hw_support): re-enable CONFIG_ESP_DEBUG_OCDAWARE functionality

Closes IDF-5881

See merge request espressif/esp-idf!26533
2023-10-21 15:20:26 +08:00
Armando
05c147c3e8 fix(rng): only build bootloader_random apis once 2023-10-19 16:15:52 +08:00
Erhan Kurubas
2d55270006 fix(esp_hw_support): re-enable CONFIG_ESP_DEBUG_OCDAWARE functionality 2023-10-18 08:48:45 +02:00
Mahavir Jain
2407813a67 Merge branch 'feature/update_esp32c6-h2_apm_api' into 'master'
apm: updated APM HAL/LL APIs.

See merge request espressif/esp-idf!26368
2023-10-18 12:26:38 +08:00
Sachin Billore
c106f5caf6 apm: updated APM HAL/LL APIs. 2023-10-17 18:20:36 +05:30
Mahavir Jain
eea2536dc4 Merge branch 'feature/conservative_key_revocation_in_secure_boot_v2' into 'master'
feat: Add API to verify the bootloader and application image before revoking...

Closes IDF-7078

See merge request espressif/esp-idf!24572
2023-10-16 12:42:49 +08:00
Harshit Malpani
1df186d4e1
feat: Add API to verify the bootloader and app image
Added an API to verify the bootloader and app image before revoking the key in Secure Boot V2.
This will help in preventing the device to be bricked if the bootloader/application cannot be
verified by any other keys in efuse
2023-10-12 14:53:57 +05:30
harshal.patil
f46a93e565
feat(secure_boot): add secure boot support for esp32p4 2023-10-12 10:12:54 +05:30
gaoxu
4541ad134d feat(uart): add RCC atomic block to uart/lp-uart peripheral 2023-10-08 10:10:02 +08:00
Harshit Malpani
5d9ebd2473 Merge branch 'bugfix/fix_condition_to_verify_when_no_SB' into 'master'
fix(bootloader_support): Fix condition for checking signature in the application

See merge request espressif/esp-idf!26026
2023-09-26 14:38:08 +08:00
Harshit Malpani
c19e1b8f72
fix(bootloader_support): Fix condition for SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
Fix the condition to verify the image when SECURE_SIGNED_APPS_ECDSA_V2_SCHEME and
SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT are selected.
2023-09-25 12:02:58 +05:30
Armando
ec27891af6 change(cache): swap cache hal arg 'type' and 'level' 2023-09-22 14:19:41 +08:00