CSR Bit Fields

RISC-V pmpcfg1 CSR Register

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

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

Field Map

Understand pmpcfg1 By Bit Fields

24 key fields
7

pmp4cfg.L

RW

Lock bit for PMP entry 4.

pmp4cfg.L (bit 7) — Lock bit for PMP entry 4.

What This Field Controls

  • - Lock bit for PMP entry 4.

Common Values

pmp4cfg.L
0Unlocked

PMP entry 4 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 pmpaddr4 may still be locked by a later locked TOR entry.

1Locked

PMP entry 4 is locked; writes to pmp4cfg and pmpaddr4 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr3 is also locked.

Open Official Manual
6:5

pmp4cfg.reserved

RO

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

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

What This Field Controls

  • - Reserved bits for PMP entry 4; 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

pmp4cfg.A

RW

Address-matching mode for PMP entry 4.

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

What This Field Controls

  • - Address-matching mode for PMP entry 4.

Common Values

pmp4cfg.A
0OFF

PMP entry 4 is disabled and matches no addresses.

1TOR

PMP entry 4 uses top-of-range matching; the upper bound comes from pmpaddr4, and the lower bound comes from pmpaddr3.

2NA4

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

3NAPOT

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

Open Official Manual
2

pmp4cfg.X

RW

Execute permission for PMP entry 4.

pmp4cfg.X (bit 2) — Execute permission for PMP entry 4.

What This Field Controls

  • - Execute permission for PMP entry 4.

Common Values

pmp4cfg.X
0Execute denied

PMP entry 4 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 4 grants execute permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
1

pmp4cfg.W

RW

Write permission for PMP entry 4.

pmp4cfg.W (bit 1) — Write permission for PMP entry 4.

What This Field Controls

  • - Write permission for PMP entry 4.

Common Values

pmp4cfg.W
0Write denied

PMP entry 4 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 4 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

pmp4cfg.R

RW

Read permission for PMP entry 4.

pmp4cfg.R (bit 0) — Read permission for PMP entry 4.

What This Field Controls

  • - Read permission for PMP entry 4.

Common Values

pmp4cfg.R
0Read denied

PMP entry 4 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 4 grants read permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
15

pmp5cfg.L

RW

Lock bit for PMP entry 5.

pmp5cfg.L (bit 15) — Lock bit for PMP entry 5.

What This Field Controls

  • - Lock bit for PMP entry 5.

Common Values

pmp5cfg.L
0Unlocked

PMP entry 5 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 pmpaddr5 may still be locked by a later locked TOR entry.

1Locked

PMP entry 5 is locked; writes to pmp5cfg and pmpaddr5 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr4 is also locked.

Open Official Manual
14:13

pmp5cfg.reserved

RO

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

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

What This Field Controls

  • - Reserved bits for PMP entry 5; 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

pmp5cfg.A

RW

Address-matching mode for PMP entry 5.

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

What This Field Controls

  • - Address-matching mode for PMP entry 5.

Common Values

pmp5cfg.A
0OFF

PMP entry 5 is disabled and matches no addresses.

1TOR

PMP entry 5 uses top-of-range matching; the upper bound comes from pmpaddr5, and the lower bound comes from pmpaddr4.

2NA4

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

3NAPOT

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

Open Official Manual
10

pmp5cfg.X

RW

Execute permission for PMP entry 5.

pmp5cfg.X (bit 10) — Execute permission for PMP entry 5.

What This Field Controls

  • - Execute permission for PMP entry 5.

Common Values

pmp5cfg.X
0Execute denied

PMP entry 5 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 5 grants execute permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
9

pmp5cfg.W

RW

Write permission for PMP entry 5.

pmp5cfg.W (bit 9) — Write permission for PMP entry 5.

What This Field Controls

  • - Write permission for PMP entry 5.

Common Values

pmp5cfg.W
0Write denied

PMP entry 5 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 5 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

pmp5cfg.R

RW

Read permission for PMP entry 5.

pmp5cfg.R (bit 8) — Read permission for PMP entry 5.

What This Field Controls

  • - Read permission for PMP entry 5.

Common Values

pmp5cfg.R
0Read denied

PMP entry 5 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 5 grants read permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
23

pmp6cfg.L

RW

Lock bit for PMP entry 6.

pmp6cfg.L (bit 23) — Lock bit for PMP entry 6.

What This Field Controls

  • - Lock bit for PMP entry 6.

Common Values

pmp6cfg.L
0Unlocked

PMP entry 6 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 pmpaddr6 may still be locked by a later locked TOR entry.

1Locked

PMP entry 6 is locked; writes to pmp6cfg and pmpaddr6 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr5 is also locked.

Open Official Manual
22:21

pmp6cfg.reserved

RO

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

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

What This Field Controls

  • - Reserved bits for PMP entry 6; 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

pmp6cfg.A

RW

Address-matching mode for PMP entry 6.

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

What This Field Controls

  • - Address-matching mode for PMP entry 6.

Common Values

pmp6cfg.A
0OFF

PMP entry 6 is disabled and matches no addresses.

1TOR

PMP entry 6 uses top-of-range matching; the upper bound comes from pmpaddr6, and the lower bound comes from pmpaddr5.

2NA4

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

3NAPOT

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

Open Official Manual
18

pmp6cfg.X

RW

Execute permission for PMP entry 6.

pmp6cfg.X (bit 18) — Execute permission for PMP entry 6.

What This Field Controls

  • - Execute permission for PMP entry 6.

Common Values

pmp6cfg.X
0Execute denied

PMP entry 6 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 6 grants execute permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
17

pmp6cfg.W

RW

Write permission for PMP entry 6.

pmp6cfg.W (bit 17) — Write permission for PMP entry 6.

What This Field Controls

  • - Write permission for PMP entry 6.

Common Values

pmp6cfg.W
0Write denied

PMP entry 6 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 6 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

pmp6cfg.R

RW

Read permission for PMP entry 6.

pmp6cfg.R (bit 16) — Read permission for PMP entry 6.

What This Field Controls

  • - Read permission for PMP entry 6.

Common Values

pmp6cfg.R
0Read denied

PMP entry 6 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 6 grants read permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
31

pmp7cfg.L

RW

Lock bit for PMP entry 7.

pmp7cfg.L (bit 31) — Lock bit for PMP entry 7.

What This Field Controls

  • - Lock bit for PMP entry 7.

Common Values

pmp7cfg.L
0Unlocked

PMP entry 7 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 pmpaddr7 may still be locked by a later locked TOR entry.

1Locked

PMP entry 7 is locked; writes to pmp7cfg and pmpaddr7 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr6 is also locked.

Open Official Manual
30:29

pmp7cfg.reserved

RO

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

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

What This Field Controls

  • - Reserved bits for PMP entry 7; 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

pmp7cfg.A

RW

Address-matching mode for PMP entry 7.

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

What This Field Controls

  • - Address-matching mode for PMP entry 7.

Common Values

pmp7cfg.A
0OFF

PMP entry 7 is disabled and matches no addresses.

1TOR

PMP entry 7 uses top-of-range matching; the upper bound comes from pmpaddr7, and the lower bound comes from pmpaddr6.

2NA4

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

3NAPOT

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

Open Official Manual
26

pmp7cfg.X

RW

Execute permission for PMP entry 7.

pmp7cfg.X (bit 26) — Execute permission for PMP entry 7.

What This Field Controls

  • - Execute permission for PMP entry 7.

Common Values

pmp7cfg.X
0Execute denied

PMP entry 7 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 7 grants execute permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
25

pmp7cfg.W

RW

Write permission for PMP entry 7.

pmp7cfg.W (bit 25) — Write permission for PMP entry 7.

What This Field Controls

  • - Write permission for PMP entry 7.

Common Values

pmp7cfg.W
0Write denied

PMP entry 7 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 7 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

pmp7cfg.R

RW

Read permission for PMP entry 7.

pmp7cfg.R (bit 24) — Read permission for PMP entry 7.

What This Field Controls

  • - Read permission for PMP entry 7.

Common Values

pmp7cfg.R
0Read denied

PMP entry 7 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 7 grants read permission when this entry matches and other PMP, PMA, and privilege rules also allow the access.

Open Official Manual
Official Basis & Search Notes

pmpcfg1 is a RW CSR in machine physical memory protection csrs at 0x3A1. Check privilege and implemented extensions before interpreting its bit fields.

pmpcfg1 address, lowest access privilege, and access class are checked against the official CSR table: 0x3A1, Machine, RW.
pmpcfg1 belongs to the physical-memory-protection path; read it with adjacent pmpcfg/pmpaddr entries rather than as an isolated field.
Modify only target fields and preserve unchanged bits; interpret WPRI and reserved fields only as the official specification and implementation define them.

What To Check First When Reading This CSR

  • - First confirm that the current hart implements pmpcfg1; unimplemented or insufficiently privileged accesses raise an illegal-instruction exception.
  • - Use address 0x3A1 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 pmpcfg1 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.

FAQ

Can pmpcfg1 be accessed from any privilege level?

Do not decide from the CSR name alone. The official CSR address encoding and tables define the lowest access privilege; this entry records pmpcfg1 as Machine. Access with insufficient privilege or to an unimplemented CSR raises an illegal-instruction exception.

What is easiest to miss when writing pmpcfg1?

Do not overwrite the whole CSR as if it were an ordinary integer. Modify only target fields, preserve unchanged bits, and follow the specification for WARL, WLRL, WPRI, or reserved fields.