fix(cpu_region_protect): set DROM mask PMP entry to read-only

PMP entry 3 (SOC_DROM_MASK_HIGH, TOR mode) in the memprot path
was incorrectly granted RW permission on esp32h21 and esp32c61.
The mask ROM data region is inherently read-only; remove the W bit.

Also added necessary tests to check voilations and re-enabled
tests for ESP32P4
This commit is contained in:
nilesh.kale
2026-05-11 17:03:13 +05:30
parent b3497c2d89
commit c07e3c5b3a
5 changed files with 75 additions and 2 deletions
@@ -48,6 +48,12 @@ void test_spiram_xip_irom_alignment_reg_execute_violation(void);
void test_spiram_xip_drom_alignment_reg_execute_violation(void);
void test_irom_mask_reg_write_violation(void);
#ifdef SOC_DROM_MASK_HIGH
void test_drom_mask_reg_write_violation(void);
#endif
void test_drom_reg_write_violation(void);
void test_drom_reg_execute_violation(void);