Skip to content

Commit 9baa687

Browse files
authored
Merge branch 'espressif:release/v5.5' into release/v5.5
2 parents 24a872e + f1a1df9 commit 9baa687

File tree

372 files changed

+12738
-14419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

372 files changed

+12738
-14419
lines changed

.gitlab/ci/build.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,11 @@ build_docker:
245245
stage: host_test
246246
needs: []
247247
image: espressif/docker-builder:1
248-
tags:
249-
- build_docker_amd64_brno
248+
tags: [shiny, dind]
250249
variables:
251250
DOCKER_TMP_IMAGE_NAME: "idf_tmp_image"
252251
script:
253-
- export LOCAL_CI_REPOSITORY_URL=$CI_REPOSITORY_URL
254-
- if [ -n "$LOCAL_GITLAB_HTTPS_HOST" ]; then export LOCAL_CI_REPOSITORY_URL="https://gitlab-ci-token:${CI_JOB_TOKEN}@${LOCAL_GITLAB_HTTPS_HOST}/${CI_PROJECT_PATH}"; fi
255-
- if [ -n "$LOCAL_GIT_MIRROR" ]; then export LOCAL_CI_REPOSITORY_URL="${LOCAL_GIT_MIRROR}/${CI_PROJECT_PATH}"; fi
256-
- echo "Using repository at $LOCAL_CI_REPOSITORY_URL"
257-
- export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${LOCAL_CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$PIPELINE_COMMIT_SHA}"
258-
# Build
252+
- export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$CI_COMMIT_SHA} --build-arg IDF_CLONE_SHALLOW=1 --build-arg IDF_GITHUB_ASSETS=${INTERNAL_GITHUB_ASSETS}"
259253
- docker build --tag ${DOCKER_TMP_IMAGE_NAME} ${DOCKER_BUILD_ARGS} tools/docker/
260254
# We can't mount $PWD/examples/get-started/blink into the container, see https://gitlab.com/gitlab-org/gitlab-ce/issues/41227.
261255
# The workaround mentioned there works, but leaves around directories which need to be cleaned up manually.

.gitlab/ci/test-win.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
- job: upload-submodules-cache
1515
optional: true
1616
artifacts: false
17-
before_script: []
17+
variables:
18+
GIT_STRATEGY: fetch # use brew local mirror first
19+
before_script:
20+
- if ($env:IDF_DONT_USE_MIRRORS) {
21+
$env:IDF_MIRROR_PREFIX_MAP = ""
22+
}
1823
after_script: []
1924

2025
test_cli_installer_win:

components/bootloader/Kconfig.projbuild

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,24 @@ menu "Security features"
965965
so that the bootloader would not need to enable secure boot and thus you could avoid its revocation
966966
strategy.
967967

968+
config SECURE_BOOT_SKIP_WRITE_PROTECTION_SCA
969+
bool "Skip write-protection of SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH"
970+
default y if SECURE_FLASH_PSEUDO_ROUND_FUNC
971+
default n
972+
depends on SOC_ECDSA_SUPPORT_CURVE_P384 && SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
973+
help
974+
If not set (default, recommended), on the first boot when Secure Boot is enabled for
975+
targets that support Secure Boot using ECDSA-P384, the bootloader will burn the write-protection bit of
976+
of SECURE_BOOT_SHA384_EN that could be shared by multiple other efuse bits like
977+
SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH / XTS_DPA_PSEUDO_LEVEL.
978+
979+
Once this efuse bit is write-protected you cannot update the values of the shared efuses, for example,
980+
the security strength value of XTS_DPA_PSEUDO_LEVEL or setting ECC_FORCE_CONST_TIME.
981+
982+
List of eFuses with the same write protection bit:
983+
984+
ESP32-C5: XTS_DPA_PSEUDO_LEVEL and ECC_FORCE_CONST_TIME
985+
968986
config SECURE_FLASH_UART_BOOTLOADER_ALLOW_ENC
969987
bool "Leave UART bootloader encryption enabled"
970988
depends on SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
@@ -1048,6 +1066,7 @@ menu "Security features"
10481066
ESP32-S3: DIS_ICACHE, DIS_DCACHE, DIS_DOWNLOAD_ICACHE, DIS_DOWNLOAD_DCACHE,
10491067
DIS_FORCE_DOWNLOAD, DIS_USB_OTG, DIS_TWAI, DIS_APP_CPU, DIS_PAD_JTAG,
10501068
DIS_DOWNLOAD_MANUAL_ENCRYPT, DIS_USB_JTAG, DIS_USB_SERIAL_JTAG, STRAP_JTAG_SEL, USB_PHY_SEL.
1069+
10511070
endmenu # Potentially Insecure
10521071

10531072
config SECURE_FLASH_ENCRYPT_ONLY_IMAGE_LEN_IN_APP_PART
@@ -1080,8 +1099,9 @@ menu "Security features"
10801099

10811100
config SECURE_FLASH_PSEUDO_ROUND_FUNC
10821101
bool "Permanently enable XTS-AES's pseudo rounds function"
1083-
default y
1084-
depends on SECURE_FLASH_ENCRYPTION_MODE_RELEASE && SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
1102+
default y if SECURE_FLASH_ENCRYPTION_MODE_RELEASE
1103+
default n
1104+
depends on SECURE_FLASH_ENC_ENABLED && SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
10851105
help
10861106
If set (default), the bootloader will permanently enable the XTS-AES peripheral's pseudo rounds function.
10871107
Note: Enabling this config would burn an efuse.
@@ -1094,6 +1114,12 @@ menu "Security features"
10941114
The strength of the pseudo rounds functions can be configured to low, medium and high,
10951115
each denoting the values that would be stored in the efuses field.
10961116
By default the value to set to low.
1117+
1118+
It is recommended that the required strength of the pseudo rounds function should be set during the
1119+
first boot itself. If your workflow needs to update the function's strength after the first boot,
1120+
you should enable CONFIG_SECURE_BOOT_SKIP_WRITE_PROTECTION_SCA to avoid write protecting this
1121+
bit during the boot up for targets that support Secure Boot using ECDSA-P384.
1122+
10971123
You can configure the strength of the pseudo rounds functions according to your use cases,
10981124
for example, increasing the strength would provide higher security but would slow down the
10991125
flash encryption/decryption operations.

components/bootloader/subproject/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,13 @@ idf_build_set_property(__COMPONENT_REQUIRES_COMMON "${common_req}")
6767
idf_build_set_property(__OUTPUT_SDKCONFIG 0)
6868
# Define a property for the default linker script
6969
set(LD_DEFAULT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/main/ld/${IDF_TARGET}")
70-
idf_build_set_property(BOOTLOADER_LINKER_SCRIPT "${LD_DEFAULT_PATH}/bootloader.ld" APPEND)
7170
idf_build_set_property(BOOTLOADER_LINKER_SCRIPT "${LD_DEFAULT_PATH}/bootloader.rom.ld" APPEND)
7271
project(bootloader)
72+
if(CONFIG_ESP32P4_REV_MIN_300)
73+
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.rev3.ld")
74+
else()
75+
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.ld")
76+
endif()
7377

7478
idf_build_set_property(COMPILE_DEFINITIONS "BOOTLOADER_BUILD=1" APPEND)
7579
idf_build_set_property(COMPILE_DEFINITIONS "NON_OS_BUILD=1" APPEND)

0 commit comments

Comments
 (0)