CSR Bit Fields

RISC-V pmpcfg7 CSR Register

Address 0x3A7Privilege MachineAccess RW / RV32 only / 32-bitMachine physical memory protection CSRs

pmpcfg7 is an RV32-only physical memory protection configuration CSR; odd-numbered pmpcfg CSRs are illegal on RV64.

Field Map

Understand pmpcfg7 By Bit Fields

24 key fields
7

pmp28cfg.L

RW

Lock bit for PMP entry 28.

pmp28cfg.L (bit 7) — Lock bit for PMP entry 28.

What This Field Controls

  • - Lock bit for PMP entry 28.

Common Values

pmp28cfg.L
0Unlocked

PMP entry 28 is not locked; this entry's configuration may be modified under WARL rules. M-mode accesses matching this entry succeed, and R/W/X permissions constrain only S/U effective-privilege accesses. Note that pmpaddr28 may still be locked by a later locked TOR entry.

1Locked

PMP entry 28 is locked; writes to pmp28cfg and pmpaddr28 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr27 is also locked.

Open Official Manual
6:5

pmp28cfg.reserved

RO

Reserved bits for PMP entry 28; writes follow WARL/reserved-bit rules.

pmp28cfg.reserved (bits 6:5) — Reserved bits for PMP entry 28; writes follow WARL/reserved-bit rules.

What This Field Controls

  • - Reserved bits for PMP entry 28; writes follow WARL/reserved-bit rules.

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

Open Official Manual
4:3

pmp28cfg.A

RW

Address-matching mode for PMP entry 28.

pmp28cfg.A (bits 4:3) — Address-matching mode for PMP entry 28.

What This Field Controls

  • - Address-matching mode for PMP entry 28.

Common Values

pmp28cfg.A
0OFF

PMP entry 28 is disabled and matches no addresses.

1TOR

PMP entry 28 uses top-of-range matching; the upper bound comes from pmpaddr28, and the lower bound comes from pmpaddr27.

2NA4

PMP entry 28 matches a naturally aligned four-byte region; if the platform PMP grain does not support NA4, this encoding is not selectable.

3NAPOT

PMP entry 28 matches a naturally aligned power-of-two region of at least 8 bytes, with the size encoded in low-order bits of pmpaddr28.

Open Official Manual
2

pmp28cfg.X

RW

Execute permission for PMP entry 28.

pmp28cfg.X (bit 2) — Execute permission for PMP entry 28.

What This Field Controls

  • - Execute permission for PMP entry 28.

Common Values

pmp28cfg.X
0Execute denied

PMP entry 28 does not grant execute permission; matching S/U instruction fetches fail, while M-mode instruction fetches are constrained by this bit only when this entry is locked.

1Execute permitted

PMP entry 28 grants execute permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
1

pmp28cfg.W

RW

Write permission for PMP entry 28.

pmp28cfg.W (bit 1) — Write permission for PMP entry 28.

What This Field Controls

  • - Write permission for PMP entry 28.

Common Values

pmp28cfg.W
0Write denied

PMP entry 28 does not grant write permission; matching S/U store, AMO, and other write-class accesses fail, while M-mode writes are constrained by this bit only when this entry is locked.

1Write permitted (requires R=1)

PMP entry 28 grants write permission only when R=1; the R=0 and W=1 combination is officially reserved and is not a portable configuration.

Open Official Manual
0

pmp28cfg.R

RW

Read permission for PMP entry 28.

pmp28cfg.R (bit 0) — Read permission for PMP entry 28.

What This Field Controls

  • - Read permission for PMP entry 28.

Common Values

pmp28cfg.R
0Read denied

PMP entry 28 does not grant read permission; matching S/U read accesses fail, while M-mode reads are constrained by this bit only when this entry is locked.

1Read permitted

PMP entry 28 grants read permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
15

pmp29cfg.L

RW

Lock bit for PMP entry 29.

pmp29cfg.L (bit 15) — Lock bit for PMP entry 29.

What This Field Controls

  • - Lock bit for PMP entry 29.

Common Values

pmp29cfg.L
0Unlocked

PMP entry 29 is not locked; this entry's configuration may be modified under WARL rules. M-mode accesses matching this entry succeed, and R/W/X permissions constrain only S/U effective-privilege accesses. Note that pmpaddr29 may still be locked by a later locked TOR entry.

1Locked

PMP entry 29 is locked; writes to pmp29cfg and pmpaddr29 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr28 is also locked.

Open Official Manual
14:13

pmp29cfg.reserved

RO

Reserved bits for PMP entry 29; writes follow WARL/reserved-bit rules.

pmp29cfg.reserved (bits 14:13) — Reserved bits for PMP entry 29; writes follow WARL/reserved-bit rules.

What This Field Controls

  • - Reserved bits for PMP entry 29; writes follow WARL/reserved-bit rules.

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

Open Official Manual
12:11

pmp29cfg.A

RW

Address-matching mode for PMP entry 29.

pmp29cfg.A (bits 12:11) — Address-matching mode for PMP entry 29.

What This Field Controls

  • - Address-matching mode for PMP entry 29.

Common Values

pmp29cfg.A
0OFF

PMP entry 29 is disabled and matches no addresses.

1TOR

PMP entry 29 uses top-of-range matching; the upper bound comes from pmpaddr29, and the lower bound comes from pmpaddr28.

2NA4

PMP entry 29 matches a naturally aligned four-byte region; if the platform PMP grain does not support NA4, this encoding is not selectable.

3NAPOT

PMP entry 29 matches a naturally aligned power-of-two region of at least 8 bytes, with the size encoded in low-order bits of pmpaddr29.

Open Official Manual
10

pmp29cfg.X

RW

Execute permission for PMP entry 29.

pmp29cfg.X (bit 10) — Execute permission for PMP entry 29.

What This Field Controls

  • - Execute permission for PMP entry 29.

Common Values

pmp29cfg.X
0Execute denied

PMP entry 29 does not grant execute permission; matching S/U instruction fetches fail, while M-mode instruction fetches are constrained by this bit only when this entry is locked.

1Execute permitted

PMP entry 29 grants execute permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
9

pmp29cfg.W

RW

Write permission for PMP entry 29.

pmp29cfg.W (bit 9) — Write permission for PMP entry 29.

What This Field Controls

  • - Write permission for PMP entry 29.

Common Values

pmp29cfg.W
0Write denied

PMP entry 29 does not grant write permission; matching S/U store, AMO, and other write-class accesses fail, while M-mode writes are constrained by this bit only when this entry is locked.

1Write permitted (requires R=1)

PMP entry 29 grants write permission only when R=1; the R=0 and W=1 combination is officially reserved and is not a portable configuration.

Open Official Manual
8

pmp29cfg.R

RW

Read permission for PMP entry 29.

pmp29cfg.R (bit 8) — Read permission for PMP entry 29.

What This Field Controls

  • - Read permission for PMP entry 29.

Common Values

pmp29cfg.R
0Read denied

PMP entry 29 does not grant read permission; matching S/U read accesses fail, while M-mode reads are constrained by this bit only when this entry is locked.

1Read permitted

PMP entry 29 grants read permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
23

pmp30cfg.L

RW

Lock bit for PMP entry 30.

pmp30cfg.L (bit 23) — Lock bit for PMP entry 30.

What This Field Controls

  • - Lock bit for PMP entry 30.

Common Values

pmp30cfg.L
0Unlocked

PMP entry 30 is not locked; this entry's configuration may be modified under WARL rules. M-mode accesses matching this entry succeed, and R/W/X permissions constrain only S/U effective-privilege accesses. Note that pmpaddr30 may still be locked by a later locked TOR entry.

1Locked

PMP entry 30 is locked; writes to pmp30cfg and pmpaddr30 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr29 is also locked.

Open Official Manual
22:21

pmp30cfg.reserved

RO

Reserved bits for PMP entry 30; writes follow WARL/reserved-bit rules.

pmp30cfg.reserved (bits 22:21) — Reserved bits for PMP entry 30; writes follow WARL/reserved-bit rules.

What This Field Controls

  • - Reserved bits for PMP entry 30; writes follow WARL/reserved-bit rules.

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

Open Official Manual
20:19

pmp30cfg.A

RW

Address-matching mode for PMP entry 30.

pmp30cfg.A (bits 20:19) — Address-matching mode for PMP entry 30.

What This Field Controls

  • - Address-matching mode for PMP entry 30.

Common Values

pmp30cfg.A
0OFF

PMP entry 30 is disabled and matches no addresses.

1TOR

PMP entry 30 uses top-of-range matching; the upper bound comes from pmpaddr30, and the lower bound comes from pmpaddr29.

2NA4

PMP entry 30 matches a naturally aligned four-byte region; if the platform PMP grain does not support NA4, this encoding is not selectable.

3NAPOT

PMP entry 30 matches a naturally aligned power-of-two region of at least 8 bytes, with the size encoded in low-order bits of pmpaddr30.

Open Official Manual
18

pmp30cfg.X

RW

Execute permission for PMP entry 30.

pmp30cfg.X (bit 18) — Execute permission for PMP entry 30.

What This Field Controls

  • - Execute permission for PMP entry 30.

Common Values

pmp30cfg.X
0Execute denied

PMP entry 30 does not grant execute permission; matching S/U instruction fetches fail, while M-mode instruction fetches are constrained by this bit only when this entry is locked.

1Execute permitted

PMP entry 30 grants execute permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
17

pmp30cfg.W

RW

Write permission for PMP entry 30.

pmp30cfg.W (bit 17) — Write permission for PMP entry 30.

What This Field Controls

  • - Write permission for PMP entry 30.

Common Values

pmp30cfg.W
0Write denied

PMP entry 30 does not grant write permission; matching S/U store, AMO, and other write-class accesses fail, while M-mode writes are constrained by this bit only when this entry is locked.

1Write permitted (requires R=1)

PMP entry 30 grants write permission only when R=1; the R=0 and W=1 combination is officially reserved and is not a portable configuration.

Open Official Manual
16

pmp30cfg.R

RW

Read permission for PMP entry 30.

pmp30cfg.R (bit 16) — Read permission for PMP entry 30.

What This Field Controls

  • - Read permission for PMP entry 30.

Common Values

pmp30cfg.R
0Read denied

PMP entry 30 does not grant read permission; matching S/U read accesses fail, while M-mode reads are constrained by this bit only when this entry is locked.

1Read permitted

PMP entry 30 grants read permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
31

pmp31cfg.L

RW

Lock bit for PMP entry 31.

pmp31cfg.L (bit 31) — Lock bit for PMP entry 31.

What This Field Controls

  • - Lock bit for PMP entry 31.

Common Values

pmp31cfg.L
0Unlocked

PMP entry 31 is not locked; this entry's configuration may be modified under WARL rules. M-mode accesses matching this entry succeed, and R/W/X permissions constrain only S/U effective-privilege accesses. Note that pmpaddr31 may still be locked by a later locked TOR entry.

1Locked

PMP entry 31 is locked; writes to pmp31cfg and pmpaddr31 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr30 is also locked.

Open Official Manual
30:29

pmp31cfg.reserved

RO

Reserved bits for PMP entry 31; writes follow WARL/reserved-bit rules.

pmp31cfg.reserved (bits 30:29) — Reserved bits for PMP entry 31; writes follow WARL/reserved-bit rules.

What This Field Controls

  • - Reserved bits for PMP entry 31; writes follow WARL/reserved-bit rules.

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

Open Official Manual
28:27

pmp31cfg.A

RW

Address-matching mode for PMP entry 31.

pmp31cfg.A (bits 28:27) — Address-matching mode for PMP entry 31.

What This Field Controls

  • - Address-matching mode for PMP entry 31.

Common Values

pmp31cfg.A
0OFF

PMP entry 31 is disabled and matches no addresses.

1TOR

PMP entry 31 uses top-of-range matching; the upper bound comes from pmpaddr31, and the lower bound comes from pmpaddr30.

2NA4

PMP entry 31 matches a naturally aligned four-byte region; if the platform PMP grain does not support NA4, this encoding is not selectable.

3NAPOT

PMP entry 31 matches a naturally aligned power-of-two region of at least 8 bytes, with the size encoded in low-order bits of pmpaddr31.

Open Official Manual
26

pmp31cfg.X

RW

Execute permission for PMP entry 31.

pmp31cfg.X (bit 26) — Execute permission for PMP entry 31.

What This Field Controls

  • - Execute permission for PMP entry 31.

Common Values

pmp31cfg.X
0Execute denied

PMP entry 31 does not grant execute permission; matching S/U instruction fetches fail, while M-mode instruction fetches are constrained by this bit only when this entry is locked.

1Execute permitted

PMP entry 31 grants execute permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
25

pmp31cfg.W

RW

Write permission for PMP entry 31.

pmp31cfg.W (bit 25) — Write permission for PMP entry 31.

What This Field Controls

  • - Write permission for PMP entry 31.

Common Values

pmp31cfg.W
0Write denied

PMP entry 31 does not grant write permission; matching S/U store, AMO, and other write-class accesses fail, while M-mode writes are constrained by this bit only when this entry is locked.

1Write permitted (requires R=1)

PMP entry 31 grants write permission only when R=1; the R=0 and W=1 combination is officially reserved and is not a portable configuration.

Open Official Manual
24

pmp31cfg.R

RW

Read permission for PMP entry 31.

pmp31cfg.R (bit 24) — Read permission for PMP entry 31.

What This Field Controls

  • - Read permission for PMP entry 31.

Common Values

pmp31cfg.R
0Read denied

PMP entry 31 does not grant read permission; matching S/U read accesses fail, while M-mode reads are constrained by this bit only when this entry is locked.

1Read permitted

PMP entry 31 grants read permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual

What To Check First When Reading This CSR

  • - First confirm that the current hart implements pmpcfg7; unimplemented or insufficiently privileged accesses raise an illegal-instruction exception.
  • - Use address 0x3A7 and the lowest access privilege (Machine) to decide whether software may read it directly.
  • - Do not assume fixed values for reserved, WARL, or WLRL bits; interpret the value according to the specification and implementation.

Risk Checks Before Writing

  • - Preserve bits that are not being changed so reserved or implementation-defined fields are not written with invalid values.
  • - Prefer CSRRS/CSRRC for local set/clear operations to avoid CSRRW overwriting concurrently updated status bits.

Put It Back Into A Real Flow

1

During initialization or the relevant privileged flow, software reads pmpcfg7 to observe the current state.

2

Modify only the target fields while preserving all other bits.

3

Read back the CSR or validate through later trap, interrupt, or context-switch behavior that the setting took effect.