pmpaddr8

PMP Address 8

PMP entry address

Attributes

CSR Address

0x3b8

Defining extension

  • Smpmp, version >= 0

Length

64-bit

Privilege Mode

M

Format

pmpaddr8 format
Figure 1. pmpaddr8 format

Field Summary

Name Location Type Reset Value

ADDR

63:0

RW

UNDEFINED_LEGAL

Fields

ADDR

Location

pmpaddr8[63:0]

Description

Bits PHYS_ADDR_WIDTH-1:2 of the address specifier for PMP entry 8 (or, if pmp9cfg.A == TOR, for PMP entry 9).

Type

RW

Read-Write

Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads.

Reset value

UNDEFINED_LEGAL

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 UNDEFINED_LEGAL_DETERMINISTIC;
}

Software read

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

  • Pruned

  • Original

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