← Home

pmpaddr12

PMP Address 12

Address: 0x3BC (956) · Privilege: M · Length: MXLEN · Writable · Defined by: Sm and NUM_PMP_ENTRIES > 0

PMP entry address

Fields

RV32

31:2423:1615:87:0
ADDR

RV64

63:5655:4847:4039:3231:2423:1615:87:0
ADDR
BitsFieldAliasDescriptionTypeReset
RV32 [31:0]
RV64 [63:0]
ADDRBits PHYS_ADDR_WIDTH-1:2 of the address specifier for PMP entry 12 (or, if `pmp13cfg.A` == TOR, for PMP entry 13).
if (NUM_USABLE_PMP_ENTRIES > 12) {
  return CsrFieldType::RW;
} else {
  # entry is either not implemented or implemented as read-only zero
  return CsrFieldType::RO;
}
return 0;

Software read

# when the mode is NAPOT and PMP_GRANULARITY >= 4,
# bits (PMP_GRANULARITY-4):0 must read as ones
if (MXLEN == 32) {
  if ((PMP_GRANULARITY >= 4) &&
      (CSR[pmpcfg3].pmp12cfg[4] == 1)) {
    return CSR[pmpaddr12].ADDR | {PMP_GRANULARITY-3{1'b1}};

  # when the mode is OFF or TOR and PMP_GRANULARITY >= 3,
  # bits (PMP_GRANULARITY-3):0 must read as zeros
  } else if ((PMP_GRANULARITY >= 3) &&
              (CSR[pmpcfg3].pmp12cfg[4] == 0)) {
    Bits<PHYS_ADDR_WIDTH-2> mask = {PMP_GRANULARITY-2{1'b1}};
    return CSR[pmpaddr12].ADDR & ~mask;

  # no modifications needed
  } else {
    return CSR[pmpaddr12].ADDR;
  }
} else {
  if ((PMP_GRANULARITY >= 4) &&
      (CSR[pmpcfg2].pmp12cfg[4] == 1)) {
    return CSR[pmpaddr12].ADDR | {PMP_GRANULARITY-3{1'b1}};

  # when the mode is OFF or TOR and PMP_GRANULARITY >= 3,
  # bits (PMP_GRANULARITY-3):0 must read as zeros
  } else if ((PMP_GRANULARITY >= 3) &&
              (CSR[pmpcfg2].pmp12cfg[4] == 0)) {
    Bits<PHYS_ADDR_WIDTH-2> mask = {PMP_GRANULARITY-2{1'b1}};
    return CSR[pmpaddr12].ADDR & ~mask;

  # no modifications needed
  } else {
    return CSR[pmpaddr12].ADDR;
  }
}

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.