Commit 83b681d
armv8: Fix declaration of bit 20 for sctrl_el1
ARM DDI 0487 L.a reports that, in AArch64, bit 20 of sctrl_el1 is
RES1 only when FEAT_CSV2_2 and FEAT_CSV2_1p2 are not implemented.
Otherwise, the bit 20 is TSCXT that, when set, disables EL0 access
to SCXTNUM_EL0.
In AArch32, the bits sctrl_el1[31:0] are mapped to sctrl[31:0] and
the bit 20 gets mapper to UWXN which, when set, causes all memory
regions that are writable at PL0 to be treated as XN for accesses
from software executing at PL1.
The current code considers this bit as always RES1, thus sets it
in the macro 'armv8_switch_to_el1_m'.
Move bit 20 outside the macro SCTLR_EL1_RES1 and list it as one of
the bits of sctrl_el1, reporting its behavior for both AArch64 and
AArch32.
Please note that other bits in sctrl_el1 have been assigned to new
functionalities in ARM DDI 0487 L.a, but not addressed here.
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
Change-Id: I12e0b10e059c172dc25b414f41c23370c436d8ee
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/565213
ACI: CIBUILD <MDG-smet-aci-builds@list.st.com>
Domain-Review: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>1 parent c3b06f2 commit 83b681d
2 files changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
0 commit comments