Merge branch 'change/mmu_psram_anti_fi_bootloader_size_v6.0' into 'release/v6.0'

change(hal): exclude PSRAM anti-FI check from bootloader build (v6.0)

See merge request espressif/esp-idf!51609
This commit is contained in:
Mahavir Jain
2026-09-03 17:57:04 +05:30
3 changed files with 6 additions and 2 deletions
@@ -227,6 +227,7 @@ __attribute__((always_inline)) static inline void mmu_ll_write_entry(uint32_t mm
REG_WRITE(SPI_MEM_MMU_ITEM_INDEX_REG(0), entry_id);
REG_WRITE(SPI_MEM_MMU_ITEM_CONTENT_REG(0), mmu_raw_value);
#if !BOOTLOADER_BUILD && !ESP_TEE_BUILD
// Anti-FI check to confirm the encryption status for PSRAM entry.
// This avoids a potential FI attacks to keep PSRAM unencrypted and
// hence read out plaintext in execute from PSRAM model.
@@ -235,6 +236,7 @@ __attribute__((always_inline)) static inline void mmu_ll_write_entry(uint32_t mm
} else {
ESP_FAULT_ASSERT(!(mmu_ll_cache_encryption_enabled() && target == MMU_TARGET_PSRAM0 && efuse_hal_chip_revision() > 100));
}
#endif // !BOOTLOADER_BUILD && !ESP_TEE_BUILD
}
#if SOC_PSRAM_ENCRYPTION_PAGE_CONFIGURABLE
+2 -1
View File
@@ -229,7 +229,7 @@ __attribute__((always_inline)) static inline void mmu_ll_write_entry(uint32_t mm
mmu_raw_value = mmu_val | SOC_MMU_VALID;
REG_WRITE(SPI_MEM_MMU_ITEM_INDEX_REG(0), entry_id);
REG_WRITE(SPI_MEM_MMU_ITEM_CONTENT_REG(0), mmu_raw_value);
#if !BOOTLOADER_BUILD && !ESP_TEE_BUILD
// Anti-FI check to confirm the encryption status for PSRAM entry.
// This avoids a potential FI attacks to keep PSRAM unencrypted and
// hence read out plaintext in execute from PSRAM model.
@@ -238,6 +238,7 @@ __attribute__((always_inline)) static inline void mmu_ll_write_entry(uint32_t mm
} else {
ESP_FAULT_ASSERT(!(mmu_ll_cache_encryption_enabled() && target == MMU_TARGET_PSRAM0 && efuse_hal_chip_revision() > 100));
}
#endif // !BOOTLOADER_BUILD && !ESP_TEE_BUILD
}
#if SOC_PSRAM_ENCRYPTION_PAGE_CONFIGURABLE
+2 -1
View File
@@ -291,7 +291,7 @@ __attribute__((always_inline)) static inline void mmu_ll_write_entry(uint32_t mm
REG_WRITE(index_reg, entry_id);
REG_WRITE(content_reg, mmu_val);
#if !BOOTLOADER_BUILD
// Anti-FI check to confirm the encryption status for PSRAM entry.
// This avoids a potential FI attacks to keep PSRAM unencrypted and
// hence read out plaintext in execute from PSRAM model.
@@ -300,6 +300,7 @@ __attribute__((always_inline)) static inline void mmu_ll_write_entry(uint32_t mm
} else {
ESP_FAULT_ASSERT(!(mmu_ll_cache_encryption_enabled() && target == MMU_TARGET_PSRAM0));
}
#endif // !BOOTLOADER_BUILD
}
#if SOC_PSRAM_ENCRYPTION_PAGE_CONFIGURABLE