mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-08 13:57:39 +00:00
ESP8684: update bootloader, bootloader_support, esp_rom
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "bootloader_common.h"
|
||||
#include "esp_rom_sys.h"
|
||||
#include "soc/soc_memory_types.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#include "esp32/rom/secure_boot.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||
@@ -29,6 +30,9 @@
|
||||
#include "esp32c3/rom/secure_boot.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
#include "esp32h2/rom/secure_boot.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP8684
|
||||
#include "esp8684/rom/rtc.h"
|
||||
#include "esp8684/rom/secure_boot.h"
|
||||
#endif
|
||||
|
||||
/* Checking signatures as part of verifying images is necessary:
|
||||
@@ -427,13 +431,22 @@ static bool verify_load_addresses(int segment_index, intptr_t load_addr, intptr_
|
||||
}
|
||||
}
|
||||
/* Sections entirely in RTC memory won't overlap with a vanilla bootloader but are valid load addresses, thus skipping them from the check */
|
||||
} else if (esp_ptr_in_rtc_iram_fast(load_addr_p) && esp_ptr_in_rtc_iram_fast(load_inclusive_end_p)){
|
||||
}
|
||||
#if SOC_RTC_FAST_MEM_SUPPORTED
|
||||
else if (esp_ptr_in_rtc_iram_fast(load_addr_p) && esp_ptr_in_rtc_iram_fast(load_inclusive_end_p)){
|
||||
return true;
|
||||
} else if (esp_ptr_in_rtc_dram_fast(load_addr_p) && esp_ptr_in_rtc_dram_fast(load_inclusive_end_p)){
|
||||
return true;
|
||||
} else if (esp_ptr_in_rtc_slow(load_addr_p) && esp_ptr_in_rtc_slow(load_inclusive_end_p)) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOC_RTC_SLOW_MEM_SUPPORTED
|
||||
else if (esp_ptr_in_rtc_slow(load_addr_p) && esp_ptr_in_rtc_slow(load_inclusive_end_p)) {
|
||||
return true;
|
||||
} else { /* Not a DRAM or an IRAM or RTC Fast IRAM, RTC Fast DRAM or RTC Slow address */
|
||||
}
|
||||
#endif
|
||||
|
||||
else { /* Not a DRAM or an IRAM or RTC Fast IRAM, RTC Fast DRAM or RTC Slow address */
|
||||
reason = "bad load address range";
|
||||
goto invalid;
|
||||
}
|
||||
@@ -696,6 +709,7 @@ static bool should_load(uint32_t load_addr)
|
||||
}
|
||||
|
||||
if (!load_rtc_memory) {
|
||||
#if SOC_RTC_FAST_MEM_SUPPORTED
|
||||
if (load_addr >= SOC_RTC_IRAM_LOW && load_addr < SOC_RTC_IRAM_HIGH) {
|
||||
ESP_LOGD(TAG, "Skipping RTC fast memory segment at 0x%08x", load_addr);
|
||||
return false;
|
||||
@@ -704,10 +718,14 @@ static bool should_load(uint32_t load_addr)
|
||||
ESP_LOGD(TAG, "Skipping RTC fast memory segment at 0x%08x", load_addr);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOC_RTC_SLOW_MEM_SUPPORTED
|
||||
if (load_addr >= SOC_RTC_DATA_LOW && load_addr < SOC_RTC_DATA_HIGH) {
|
||||
ESP_LOGD(TAG, "Skipping RTC slow memory segment at 0x%08x", load_addr);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user