Loading target/riscv/pmp.c +9 −5 Original line number Diff line number Diff line Loading @@ -233,12 +233,16 @@ bool pmp_hart_has_privs(CPURISCVState *env, target_ulong addr, return true; } if (size == 0) { if (riscv_feature(env, RISCV_FEATURE_MMU)) { /* * if size is unknown (0), assume that all bytes * If size is unknown (0), assume that all bytes * from addr to the end of the page will be accessed. */ if (size == 0) { pmp_size = -(addr | TARGET_PAGE_MASK); } else { pmp_size = sizeof(target_ulong); } } else { pmp_size = size; } Loading Loading
target/riscv/pmp.c +9 −5 Original line number Diff line number Diff line Loading @@ -233,12 +233,16 @@ bool pmp_hart_has_privs(CPURISCVState *env, target_ulong addr, return true; } if (size == 0) { if (riscv_feature(env, RISCV_FEATURE_MMU)) { /* * if size is unknown (0), assume that all bytes * If size is unknown (0), assume that all bytes * from addr to the end of the page will be accessed. */ if (size == 0) { pmp_size = -(addr | TARGET_PAGE_MASK); } else { pmp_size = sizeof(target_ulong); } } else { pmp_size = size; } Loading