@@ -3233,47 +3233,49 @@ R/W/X permissions apply only to S and U modes.
3233
3233
3234
3234
===== Priority and Matching Logic
3235
3235
3236
+ On some implementations, misaligned loads, stores, and instruction
3237
+ fetches may be decomposed into multiple memory operations, some of which may
3238
+ succeed before an access-fault exception occurs, as described in the RVWMO
3239
+ specification. PMP checking is performed on each memory operation independently.
3240
+ In particular, a portion of a misaligned store that passes
3241
+ the PMP check may become visible, even if another portion fails the PMP check.
3242
+ The same behavior may manifest for stores wider than XLEN bits (e.g., the
3243
+ FSD instruction in RV32D), even when the store address is naturally aligned.
3244
+
3236
3245
PMP entries are statically prioritized. The lowest-numbered PMP entry
3237
- that matches any byte of an access determines whether that access
3238
- succeeds or fails. The matching PMP entry must match all bytes of an
3239
- access , or the access fails, irrespective of the L, R, W, and X bits.
3246
+ that matches any byte of a memory operation determines whether that operation
3247
+ succeeds or fails. The matching PMP entry must match all bytes of a memory
3248
+ operation , or the operation fails, irrespective of the L, R, W, and X bits.
3240
3249
For example, if a PMP entry is configured to match the four-byte range
3241
3250
`0xC`–`0xF`, then an 8-byte access to the range `0x8`–`0xF` will fail,
3242
3251
assuming that PMP entry is the highest-priority entry that matches those
3243
3252
addresses.
3244
3253
3245
- If a PMP entry matches all bytes of an access , then the L, R, W, and X
3246
- bits determine whether the access succeeds or fails. If the L bit is
3247
- clear and the privilege mode of the access is M, the access succeeds.
3254
+ If a PMP entry matches all bytes of a memory operation , then the L, R, W, and X
3255
+ bits determine whether the operation succeeds or fails. If the L bit is
3256
+ clear and the privilege mode of the access is M, the operation succeeds.
3248
3257
Otherwise, if the L bit is set or the privilege mode of the access is S
3249
- or U, then the access succeeds only if the R, W, or X bit corresponding
3258
+ or U, then the operation succeeds only if the R, W, or X bit corresponding
3250
3259
to the access type is set.
3251
3260
3252
- If no PMP entry matches an M-mode access , the access succeeds. If no PMP
3253
- entry matches an S-mode or U-mode access , but at least one PMP entry is
3254
- implemented, the access fails.
3261
+ If no PMP entry matches an M-mode memory operation , the operation succeeds.
3262
+ If no PMP entry matches an S-mode or U-mode memory operation , but at least
3263
+ one PMP entry is implemented, the operation fails.
3255
3264
3256
3265
[NOTE]
3257
3266
====
3258
3267
If at least one PMP entry is implemented, but all PMP entries’ A fields
3259
3268
are set to OFF, then all S-mode and U-mode memory accesses will fail.
3260
3269
====
3261
3270
3262
- Failed accesses generate an instruction, load, or store access-fault
3271
+ Failed memory operations generate an instruction, load, or store access-fault
3263
3272
exception. Note that a single instruction may generate multiple
3264
- accesses , which may not be mutually atomic. An access-fault exception is
3265
- generated if at least one access generated by an instruction fails,
3266
- though other accesses generated by that instruction may succeed with
3273
+ memory operations , which may not be mutually atomic. An access-fault exception
3274
+ is generated if at least one memory operation generated by an instruction fails,
3275
+ though other memory operations generated by that instruction may succeed with
3267
3276
visible side effects. Notably, instructions that reference virtual
3268
- memory are decomposed into multiple accesses .
3277
+ memory are decomposed into multiple memory operations .
3269
3278
3270
- On some implementations, misaligned loads, stores, and instruction
3271
- fetches may also be decomposed into multiple accesses, some of which may
3272
- succeed before an access-fault exception occurs. In particular, a
3273
- portion of a misaligned store that passes the PMP check may become
3274
- visible, even if another portion fails the PMP check. The same behavior
3275
- may manifest for stores wider than XLEN bits (e.g., the FSD instruction
3276
- in RV32D), even when the store address is naturally aligned.
3277
3279
3278
3280
[[pmp-vmem]]
3279
3281
==== Physical Memory Protection and Paging
0 commit comments