fix(esp_system): support rom secure boot fast wake feature for esp32s31

This commit is contained in:
wuzhenghui
2026-07-28 21:32:45 +08:00
parent b6120a46f4
commit f2b2bac778
5 changed files with 59 additions and 3 deletions
@@ -1,10 +1,11 @@
/*
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "string.h"
#include <stdint.h>
#include "sdkconfig.h"
#include "esp_err.h"
#include "esp_log.h"
@@ -277,7 +278,9 @@ rtc_retain_mem_t* bootloader_common_get_rtc_retain_mem(void)
#endif //ESP_ROM_HAS_LP_ROM
#if CONFIG_SECURE_BOOT && ESP_ROM_SUPPORT_SECURE_BOOT_FAST_WAKEUP
static rtc_retain_mem_t *const s_bootloader_retain_mem = (rtc_retain_mem_t *)RTC_RETAIN_MEM_ADDR - ESP_SECURE_BOOT_DIGEST_LEN;
/* ROM stores the verified image digest in the last ESP_SECURE_BOOT_DIGEST_LEN
* bytes of LP/RTC RAM on deep-sleep wake. Keep retain mem below that region. */
static rtc_retain_mem_t *const s_bootloader_retain_mem = (rtc_retain_mem_t *)((uintptr_t)RTC_RETAIN_MEM_ADDR - ESP_SECURE_BOOT_DIGEST_LEN);
#else
static rtc_retain_mem_t *const s_bootloader_retain_mem = (rtc_retain_mem_t *)RTC_RETAIN_MEM_ADDR;
#endif