fix(pma): fixed pma 15 occupied by rom on c5 issue

This commit is contained in:
Armando 2024-09-08 10:04:31 +08:00
parent 42cf1d8867
commit 17fc026c48
2 changed files with 8 additions and 0 deletions

View File

@ -69,6 +69,8 @@ static void esp_cpu_configure_invalid_regions(void)
// 8. End of address space
PMA_ENTRY_SET_TOR(14, SOC_PERIPHERAL_HIGH, PMA_NONE);
PMA_ENTRY_CFG_RESET(15);
PMA_ENTRY_SET_TOR(15, UINT32_MAX, PMA_TOR | PMA_NONE);
}

View File

@ -136,6 +136,12 @@ extern "C" {
RV_CLEAR_CSR((CSR_PMPCFG0) + (ENTRY)/4, (0xFF) << (ENTRY%4)*8); \
} while(0)
/*Reset all permissions of a particular PMACFG entry*/
#define PMA_ENTRY_CFG_RESET(ENTRY) do {\
RV_WRITE_CSR((CSR_PMACFG0) + (ENTRY) , 0); \
RV_WRITE_CSR((CSR_PMAADDR0) + (ENTRY) , 0); \
} while(0)
/********************************************************
Trigger Module register fields (Debug specification)
********************************************************/