pmpaddr53

PMP Address 53

PMP entry address

Attributes

CSR Address

0x3e5

Defining extension

  • Smpmp, version >= 0

Length

64-bit

Privilege Mode

M

Format

pmpaddr53 format
Figure 1. pmpaddr53 format

Field Summary

Name Location Type Reset Value

ADDR

63:0

RO

0

Fields

ADDR

Location

pmpaddr53[63:0]

Description

Bits PHYS_ADDR_WIDTH-1:2 of the address specifier for PMP entry 53 (or, if pmp54cfg.A == TOR, for PMP entry 54).

Type

RO

Read-Only

Field has a hardwired value that does not change. Writes to an RO field are ignored.

Reset value

0

Software write

This field has special behavior when written by software (e.g., through csrrw).

When software tries to write csr_value, the field will be written with the return value of the function below.

if (csr_value.ADDR >= (14)) {
  return UNDEFINED_LEGAL_DETERMINISTIC;
} else {
  return csr_value.ADDR;
}

Software read

This CSR may return a value that is different from what is stored in hardware.

  • Pruned

  • Original

Bits<PHYS_ADDR_WIDTH - 2> mask = {10{1'b1}};
return 0;
if (XLEN == 32) {
  if ((PMP_GRANULARITY >= 16) && (CSR[pmpcfg13].pmp53cfg[4] == 1)) {
    return CSR[pmpaddr53].ADDR | {PMP_GRANULARITY - 3{1'b1}};
  } else if ((PMP_GRANULARITY >= 8) && (CSR[pmpcfg13].pmp53cfg[4] == 0)) {
    Bits<PHYS_ADDR_WIDTH - 2> mask = {PMP_GRANULARITY - 2{1'b1}};
    return CSR[pmpaddr53].ADDR & ~mask;
  } else {
    return CSR[pmpaddr53].ADDR;
  }
} else {
  if ((PMP_GRANULARITY >= 16) && (CSR[pmpcfg12].pmp53cfg[4] == 1)) {
    return CSR[pmpaddr53].ADDR | {PMP_GRANULARITY - 3{1'b1}};
  } else if ((PMP_GRANULARITY >= 8) && (CSR[pmpcfg12].pmp53cfg[4] == 0)) {
    Bits<PHYS_ADDR_WIDTH - 2> mask = {PMP_GRANULARITY - 2{1'b1}};
    return CSR[pmpaddr53].ADDR & ~mask;
  } else {
    return CSR[pmpaddr53].ADDR;
  }
}