Skip to content

Commit 0a36d5f

Browse files
authored
Fix a typo and edit for clarity. (riscv#1914)
. Conversions narrowing to BF16 end up at BF16, not the target precision (which is the origin of the conversion). . Capitalize an 'i' at sentence start. . Remove repetition of C bit in *stateen0 not being custom state. . Remove a misplaced 'of'.
1 parent fe7bd31 commit 0a36d5f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/bfloat16.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ converting to FP32 and then converting from FP32 to the target
345345
precision.
346346
Conversions narrowing to BF16 can be synthesized by first
347347
converting to FP32 through a series of halving steps and then
348-
converting from FP32 to the target precision.
348+
converting from FP32 to BF16.
349349
As with the fused multiply-addition instruction described above,
350350
this method of converting values to BF16 can be off by 1-ulp
351351
on some inputs for the RNE and RMM rounding modes.

src/smepmp.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Terms:
2222

2323
==== Threat model
2424

25-
However, there are no such mechanisms available on Machine mode in the current (v1.11) Privileged Spec. It is not possible for a PMP rule to be *enforced* only on non-Machine modes and *denied* on Machine mode, to only allow access to a memory region by less-privileged modes. it is only possible to have a *locked* rule that will be *enforced* on all modes, or a rule that will be *enforced* on non-Machine modes and be *ignored* by Machine mode. So for any physical memory region which is not protected with a Locked rule, Machine mode has unlimited access, including the ability to execute it.
25+
However, there are no such mechanisms available on Machine mode in the current (v1.11) Privileged Spec. It is not possible for a PMP rule to be *enforced* only on non-Machine modes and *denied* on Machine mode, to only allow access to a memory region by less-privileged modes. It is only possible to have a *locked* rule that will be *enforced* on all modes, or a rule that will be *enforced* on non-Machine modes and be *ignored* by Machine mode. So for any physical memory region which is not protected with a Locked rule, Machine mode has unlimited access, including the ability to execute it.
2626

2727
Without being able to protect less-privileged modes from Machine mode, it is not possible to prevent the mentioned attack vector. This becomes even more important for RISC-V than on other architectures, since implementations are allowed where a hart only has Machine and User modes available, so the whole OS will run on Machine mode instead of the non-existent Supervisor mode. In such implementations the attack surface is greatly increased, and the same kind of attacks performed on Supervisor mode and mitigated through SMAP/SMEP, can be performed on Machine mode without any available mitigations. Even on implementations with Supervisor mode present attacks are still possible against the Firmware and/or the Secure Monitor running on Machine mode.
2828

src/smstateen.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ read-only).
227227
], config:{bits: 32, lanes: 2, hspace:1024}}
228228
....
229229

230-
The C bit controls access to any and all custom state. This bit is not custom
231-
state itself. The C bit of these registers is not custom state itself; it is a
230+
The C bit controls access to any and all custom state.
231+
The C bit of these registers is not custom state itself; it is a
232232
standard field of a standard CSR, either `mstateen0`, `hstateen0`, or
233233
`sstateen0`.
234234

src/zfinx.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ floating-point precisions.
1313
====
1414
The F extension uses separate `f` registers for floating-point
1515
computation, to reduce register pressure and simplify the provision of
16-
register-file ports for wide superscalars. However, the additional of
16+
register-file ports for wide superscalars. However, the additional
1717
architectural state increases the minimal implementation cost. By
1818
eliminating the `f` registers, the Zfinx extension substantially reduces
1919
the cost of simple RISC-V implementations with floating-point

0 commit comments

Comments
 (0)