diff --git a/arch/risc-v/src/common/riscv_pmp.c b/arch/risc-v/src/common/riscv_pmp.c index 97b39b8fe8c0a..718cb4e693dd8 100644 --- a/arch/risc-v/src/common/riscv_pmp.c +++ b/arch/risc-v/src/common/riscv_pmp.c @@ -134,6 +134,13 @@ static bool pmp_check_region_attrs(uintptr_t base, uintptr_t size, case PMPCFG_A_NAPOT: { + /* Special range for the whole range */ + + if (base == 0 && size == 0) + { + return true; + } + /* For NAPOT, Naturally aligned power-of-two region, >= 8 bytes */ if ((base & 0x07) != 0 || size < 8 || (size & (size - 1)) != 0)