Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit 6985423

Browse files
crzwdjkandre-richter
authored andcommitted
Add more fields to SCTLR_EL1
1 parent 91949e7 commit 6985423

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed

src/registers/sctlr_el1.rs

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,168 @@ use tock_registers::{
1616

1717
register_bitfields! {u64,
1818
pub SCTLR_EL1 [
19+
/// Traps EL0 execution of cache maintenance instructions to EL1, from AArch64 state only.
20+
///
21+
/// 0 Any attempt to execute a DC CVAU, DC CIVAC, DC CVAC, DC CVAP, or IC IVAU
22+
/// instruction at EL0 using AArch64 is trapped to EL1.
23+
/// 1 This control does not cause any instructions to be trapped.
24+
///
25+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
26+
/// has no effect on execution at EL0.
27+
///
28+
/// If the Point of Coherency is before any level of data cache, it is IMPLEMENTATION DEFINED whether
29+
/// the execution of any data or unified cache clean, or clean and invalidate instruction that operates by
30+
/// VA to the point of coherency can be trapped when the value of this control is 1.
31+
///
32+
/// If the Point of Unification is before any level of data cache, it is IMPLEMENTATION DEFINED whether
33+
/// the execution of any data or unified cache clean by VA to the point of unification instruction can be
34+
/// trapped when the value of this control is 1.
35+
///
36+
/// If the Point of Unification is before any level of instruction cache, it is IMPLEMENTATION DEFINED
37+
/// whether the execution of any instruction cache invalidate by VA to the point of unification
38+
/// instruction can be trapped when the value of this control is 1.
39+
UCI OFFSET(26) NUMBITS(1) [
40+
Trap = 0,
41+
DontTrap = 1,
42+
],
43+
44+
/// Endianness of data accesses at EL1, and stage 1 translation table walks in the EL1&0 translation regime.
45+
///
46+
/// 0 Explicit data accesses at EL1, and stage 1 translation table walks in the EL1&0
47+
/// translation regime are little-endian.
48+
/// 1 Explicit data accesses at EL1, and stage 1 translation table walks in the EL1&0
49+
/// translation regime are big-endian.
50+
///
51+
/// If an implementation does not provide Big-endian support at Exception Levels higher than EL0, this
52+
/// bit is RES 0.
53+
///
54+
/// If an implementation does not provide Little-endian support at Exception Levels higher than EL0,
55+
/// this bit is RES 1.
56+
///
57+
/// The EE bit is permitted to be cached in a TLB.
58+
///
59+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
60+
/// has no effect on the PE.
61+
EE OFFSET(25) NUMBITS(1) [
62+
LittleEndian = 0,
63+
BigEndian = 1,
64+
],
65+
66+
/// Endianness of data accesses at EL0.
67+
///
68+
/// 0 Explicit data accesses at EL0 are little-endian.
69+
///
70+
/// 1 Explicit data accesses at EL0 are big-endian.
71+
///
72+
/// If an implementation only supports Little-endian accesses at EL0 then this bit is RES 0. This option
73+
/// is not permitted when SCTLR_EL1.EE is RES 1.
74+
///
75+
/// If an implementation only supports Big-endian accesses at EL0 then this bit is RES 1. This option is
76+
/// not permitted when SCTLR_EL1.EE is RES 0.
77+
///
78+
/// This bit has no effect on the endianness of LDTR , LDTRH , LDTRSH , LDTRSW , STTR , and STTRH instructions
79+
/// executed at EL1.
80+
///
81+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
82+
/// has no effect on execution at EL0.
83+
E0E OFFSET(24) NUMBITS(1) [
84+
LittleEndian = 0,
85+
BigEndian = 1,
86+
],
87+
88+
/// Write permission implies XN (Execute-never). For the EL1&0 translation regime, this bit can force
89+
/// all memory regions that are writable to be treated as XN.
90+
///
91+
/// 0 This control has no effect on memory access permissions.
92+
///
93+
/// 1 Any region that is writable in the EL1&0 translation regime is forced to XN for accesses
94+
/// from software executing at EL1 or EL0.
95+
///
96+
/// The WXN bit is permitted to be cached in a TLB.
97+
///
98+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
99+
/// has no effect on the PE.
100+
WXN OFFSET(19) NUMBITS(1) [
101+
Disable = 0,
102+
Enable = 1,
103+
],
104+
105+
/// Traps EL0 execution of WFE instructions to EL1, from both Execution states.
106+
///
107+
/// 0 Any attempt to execute a WFE instruction at EL0 is trapped to EL1, if the instruction
108+
/// would otherwise have caused the PE to enter a low-power state.
109+
///
110+
/// 1 This control does not cause any instructions to be trapped.
111+
///
112+
/// In AArch32 state, the attempted execution of a conditional WFE instruction is only trapped if the
113+
/// instruction passes its condition code check.
114+
///
115+
/// **Note:**
116+
///
117+
/// Since a WFE or WFI can complete at any time, even without a Wakeup event, the traps on WFE of
118+
/// WFI are not guaranteed to be taken, even if the WFE or WFI is executed when there is no Wakeup
119+
/// event. The only guarantee is that if the instruction does not complete in finite time in the
120+
/// absence of a Wakeup event, the trap will be taken.
121+
///
122+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
123+
/// has no effect on execution at EL0.
124+
NTWE OFFSET(18) NUMBITS(1) [
125+
Trap = 0,
126+
DontTrap = 1,
127+
],
128+
129+
/// Traps EL0 executions of WFI instructions to EL1, from both execution states:
130+
///
131+
/// 0 Any attempt to execute a WFI instruction at EL0 is trapped EL1, if the instruction would
132+
/// otherwise have caused the PE to enter a low-power state.
133+
///
134+
/// 1 This control does not cause any instructions to be trapped.
135+
///
136+
/// In AArch32 state, the attempted execution of a conditional WFI instruction is only trapped if the
137+
/// instruction passes its condition code check.
138+
///
139+
/// **Note:**
140+
///
141+
/// Since a WFE or WFI can complete at any time, even without a Wakeup event, the traps on WFE of
142+
/// WFI are not guaranteed to be taken, even if the WFE or WFI is executed when there is no Wakeup
143+
/// event. The only guarantee is that if the instruction does not complete in finite time in the
144+
/// absence of a Wakeup event, the trap will be taken.
145+
///
146+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
147+
/// has no effect on execution at EL0.
148+
NTWI OFFSET(16) NUMBITS(1) [
149+
Trap = 0,
150+
DontTrap = 1,
151+
],
152+
153+
/// Traps EL0 accesses to the CTR_EL0 to EL1, from AArch64 state only.
154+
///
155+
/// 0 Accesses to the CTR_EL0 from EL0 using AArch64 are trapped to EL1.
156+
///
157+
/// 1 This control does not cause any instructions to be trapped.
158+
///
159+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
160+
/// has no effect on execution at EL0.
161+
UCT OFFSET(15) NUMBITS(1) [
162+
Trap = 0,
163+
DontTrap = 1,
164+
],
165+
166+
/// Traps EL0 execution of DC ZVA instructions to EL1, from AArch64 state only.
167+
///
168+
/// 0 Any attempt to execute a DC ZVA instruction at EL0 using AArch64 is trapped to EL1.
169+
/// Reading DCZID_EL0.DZP from EL0 returns 1, indicating that DC ZVA instructions
170+
/// are not supported.
171+
///
172+
/// 1 This control does not cause any instructions to be trapped.
173+
///
174+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
175+
/// has no effect on execution at EL0.
176+
DZE OFFSET(14) NUMBITS(1) [
177+
Trap = 0,
178+
DontTrap = 1,
179+
],
180+
19181
/// Instruction access Cacheability control, for accesses at EL0 and
20182
/// EL1:
21183
///
@@ -45,6 +207,21 @@ register_bitfields! {u64,
45207
Cacheable = 1
46208
],
47209

210+
/// User Mask Access. Traps EL0 execution of MSR and MRS instructions that access the
211+
/// PSTATE.{D, A, I, F} masks to EL1, from AArch64 state only.
212+
///
213+
/// 0 Any attempt at EL0 using AArch64 to execute an MRS , MSR(register) , or MSR(immediate)
214+
/// instruction that accesses the [`DAIF`](module@super::super::DAIF) is trapped to EL1.
215+
///
216+
/// 1 This control does not cause any instructions to be trapped.
217+
///
218+
/// When ARMv8.1-VHE is implemented, and the value of HCR_EL2.{E2H, TGE} is {1, 1}, this bit
219+
/// has no effect on execution at EL0.
220+
UMA OFFSET(9) NUMBITS(1) [
221+
Trap = 0,
222+
DontTrap = 1,
223+
],
224+
48225
/// Non-aligned access. This bit controls generation of Alignment faults at EL1 and EL0 under certain conditions.
49226
///
50227
/// LDAPR, LDAPRH, LDAPUR, LDAPURH, LDAPURSH, LDAPURSW, LDAR, LDARH, LDLAR, LDLARH,

0 commit comments

Comments
 (0)