CSR Bit Fields

RISC-V pmpcfg3 CSR Register

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

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

Field Map

Understand pmpcfg3 By Bit Fields

24 key fields
7

pmp12cfg.L

RW

Lock bit for PMP entry 12.

pmp12cfg.L (bit 7) — Lock bit for PMP entry 12.

What This Field Controls

  • - Lock bit for PMP entry 12.

Common Values

pmp12cfg.L
0Unlocked

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

1Locked

PMP entry 12 is locked; writes to pmp12cfg and pmpaddr12 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr11 is also locked.

Open Official Manual
6:5

pmp12cfg.reserved

RO

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

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

What This Field Controls

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

pmp12cfg.A

RW

Address-matching mode for PMP entry 12.

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

What This Field Controls

  • - Address-matching mode for PMP entry 12.

Common Values

pmp12cfg.A
0OFF

PMP entry 12 is disabled and matches no addresses.

1TOR

PMP entry 12 uses top-of-range matching; the upper bound comes from pmpaddr12, and the lower bound comes from pmpaddr11.

2NA4

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

3NAPOT

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

Open Official Manual
2

pmp12cfg.X

RW

Execute permission for PMP entry 12.

pmp12cfg.X (bit 2) — Execute permission for PMP entry 12.

What This Field Controls

  • - Execute permission for PMP entry 12.

Common Values

pmp12cfg.X
0Execute denied

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

Open Official Manual
1

pmp12cfg.W

RW

Write permission for PMP entry 12.

pmp12cfg.W (bit 1) — Write permission for PMP entry 12.

What This Field Controls

  • - Write permission for PMP entry 12.

Common Values

pmp12cfg.W
0Write denied

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

pmp12cfg.R

RW

Read permission for PMP entry 12.

pmp12cfg.R (bit 0) — Read permission for PMP entry 12.

What This Field Controls

  • - Read permission for PMP entry 12.

Common Values

pmp12cfg.R
0Read denied

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

Open Official Manual
15

pmp13cfg.L

RW

Lock bit for PMP entry 13.

pmp13cfg.L (bit 15) — Lock bit for PMP entry 13.

What This Field Controls

  • - Lock bit for PMP entry 13.

Common Values

pmp13cfg.L
0Unlocked

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

1Locked

PMP entry 13 is locked; writes to pmp13cfg and pmpaddr13 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr12 is also locked.

Open Official Manual
14:13

pmp13cfg.reserved

RO

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

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

What This Field Controls

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

pmp13cfg.A

RW

Address-matching mode for PMP entry 13.

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

What This Field Controls

  • - Address-matching mode for PMP entry 13.

Common Values

pmp13cfg.A
0OFF

PMP entry 13 is disabled and matches no addresses.

1TOR

PMP entry 13 uses top-of-range matching; the upper bound comes from pmpaddr13, and the lower bound comes from pmpaddr12.

2NA4

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

3NAPOT

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

Open Official Manual
10

pmp13cfg.X

RW

Execute permission for PMP entry 13.

pmp13cfg.X (bit 10) — Execute permission for PMP entry 13.

What This Field Controls

  • - Execute permission for PMP entry 13.

Common Values

pmp13cfg.X
0Execute denied

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

Open Official Manual
9

pmp13cfg.W

RW

Write permission for PMP entry 13.

pmp13cfg.W (bit 9) — Write permission for PMP entry 13.

What This Field Controls

  • - Write permission for PMP entry 13.

Common Values

pmp13cfg.W
0Write denied

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

pmp13cfg.R

RW

Read permission for PMP entry 13.

pmp13cfg.R (bit 8) — Read permission for PMP entry 13.

What This Field Controls

  • - Read permission for PMP entry 13.

Common Values

pmp13cfg.R
0Read denied

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

Open Official Manual
23

pmp14cfg.L

RW

Lock bit for PMP entry 14.

pmp14cfg.L (bit 23) — Lock bit for PMP entry 14.

What This Field Controls

  • - Lock bit for PMP entry 14.

Common Values

pmp14cfg.L
0Unlocked

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

1Locked

PMP entry 14 is locked; writes to pmp14cfg and pmpaddr14 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr13 is also locked.

Open Official Manual
22:21

pmp14cfg.reserved

RO

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

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

What This Field Controls

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

pmp14cfg.A

RW

Address-matching mode for PMP entry 14.

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

What This Field Controls

  • - Address-matching mode for PMP entry 14.

Common Values

pmp14cfg.A
0OFF

PMP entry 14 is disabled and matches no addresses.

1TOR

PMP entry 14 uses top-of-range matching; the upper bound comes from pmpaddr14, and the lower bound comes from pmpaddr13.

2NA4

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

3NAPOT

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

Open Official Manual
18

pmp14cfg.X

RW

Execute permission for PMP entry 14.

pmp14cfg.X (bit 18) — Execute permission for PMP entry 14.

What This Field Controls

  • - Execute permission for PMP entry 14.

Common Values

pmp14cfg.X
0Execute denied

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

Open Official Manual
17

pmp14cfg.W

RW

Write permission for PMP entry 14.

pmp14cfg.W (bit 17) — Write permission for PMP entry 14.

What This Field Controls

  • - Write permission for PMP entry 14.

Common Values

pmp14cfg.W
0Write denied

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

pmp14cfg.R

RW

Read permission for PMP entry 14.

pmp14cfg.R (bit 16) — Read permission for PMP entry 14.

What This Field Controls

  • - Read permission for PMP entry 14.

Common Values

pmp14cfg.R
0Read denied

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

Open Official Manual
31

pmp15cfg.L

RW

Lock bit for PMP entry 15.

pmp15cfg.L (bit 31) — Lock bit for PMP entry 15.

What This Field Controls

  • - Lock bit for PMP entry 15.

Common Values

pmp15cfg.L
0Unlocked

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

1Locked

PMP entry 15 is locked; writes to pmp15cfg and pmpaddr15 are ignored until hart reset, and R/W/X permissions apply to all privilege modes. If A=TOR, pmpaddr14 is also locked.

Open Official Manual
30:29

pmp15cfg.reserved

RO

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

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

What This Field Controls

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

pmp15cfg.A

RW

Address-matching mode for PMP entry 15.

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

What This Field Controls

  • - Address-matching mode for PMP entry 15.

Common Values

pmp15cfg.A
0OFF

PMP entry 15 is disabled and matches no addresses.

1TOR

PMP entry 15 uses top-of-range matching; the upper bound comes from pmpaddr15, and the lower bound comes from pmpaddr14.

2NA4

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

3NAPOT

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

Open Official Manual
26

pmp15cfg.X

RW

Execute permission for PMP entry 15.

pmp15cfg.X (bit 26) — Execute permission for PMP entry 15.

What This Field Controls

  • - Execute permission for PMP entry 15.

Common Values

pmp15cfg.X
0Execute denied

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

Open Official Manual
25

pmp15cfg.W

RW

Write permission for PMP entry 15.

pmp15cfg.W (bit 25) — Write permission for PMP entry 15.

What This Field Controls

  • - Write permission for PMP entry 15.

Common Values

pmp15cfg.W
0Write denied

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

pmp15cfg.R

RW

Read permission for PMP entry 15.

pmp15cfg.R (bit 24) — Read permission for PMP entry 15.

What This Field Controls

  • - Read permission for PMP entry 15.

Common Values

pmp15cfg.R
0Read denied

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

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

pmpcfg3 address, lowest access privilege, and access class are checked against the official CSR table: 0x3A3, Machine, RW.
pmpcfg3 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 pmpcfg3; unimplemented or insufficiently privileged accesses raise an illegal-instruction exception.
  • - Use address 0x3A3 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 pmpcfg3 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 pmpcfg3 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 pmpcfg3 as Machine. Access with insufficient privilege or to an unimplemented CSR raises an illegal-instruction exception.

What is easiest to miss when writing pmpcfg3?

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.