Merge branch 'bugfix/psram_enc_workaround' into 'master'

fix(psram): provide boot warning about PSRAM encryption issue on C5/C61

See merge request espressif/esp-idf!40913
This commit is contained in:
Mahavir Jain
2025-08-12 21:05:10 +05:30
4 changed files with 20 additions and 2 deletions

View File

@@ -17,6 +17,7 @@
#include "hal/mmu_types.h"
#if SOC_EFUSE_SUPPORTED
#include "hal/efuse_ll.h"
#include "hal/efuse_hal.h"
#endif
@@ -214,7 +215,10 @@ __attribute__((always_inline)) static inline void mmu_ll_write_entry(uint32_t mm
{
uint32_t mmu_raw_value;
if (mmu_ll_cache_encryption_enabled()) {
mmu_val |= SOC_MMU_SENSITIVE;
// For PSRAM case, avoid encryption due to a bug in the hardware
if (!(target == MMU_TARGET_PSRAM0 && efuse_hal_chip_revision() <= 100)) {
mmu_val |= SOC_MMU_SENSITIVE;
}
}
mmu_val |= (target == MMU_TARGET_FLASH0) ? SOC_MMU_ACCESS_FLASH : SOC_MMU_ACCESS_SPIRAM;