@@ -84,6 +84,23 @@ pub const SystemControlBlock = extern struct {
8484 BFAR : u32 ,
8585 /// Auxilary Feature Register.
8686 AFSR : u32 ,
87+ reserved0 : [18 ]u32 ,
88+ CPACR : mmio .Mmio (packed struct (u32 ) {
89+ reserved0 : u20 ,
90+ CP10 : Privilege ,
91+ CP11 : Privilege ,
92+ reserved1 : u8 ,
93+
94+ pub const Privilege = enum (u2 ) {
95+ /// Access denied. Any attempted access generates a NOCP UsageFault.
96+ access_denied = 0b00 ,
97+ /// Privileged access only. An unprivileged access generates a NOCP UsageFault.
98+ priviledged_access_only = 0b01 ,
99+ reserved = 0b10 ,
100+ /// Full access.
101+ full_access = 0b11 ,
102+ };
103+ }),
87104};
88105
89106pub const NestedVectorInterruptController = extern struct {
@@ -187,3 +204,39 @@ pub const MemoryProtectionUnit = extern struct {
187204 reserved2 : u3 = 0 ,
188205 });
189206};
207+
208+ pub const FloatingPointUnit = extern struct {
209+ FPCCR : mmio .Mmio (packed struct (u32 ) {
210+ LSPACT : u1 ,
211+ USER : u1 ,
212+ reserved0 : u1 = 0 ,
213+ THREAD : u1 ,
214+ HFRDY : u1 ,
215+ MMRDY : u1 ,
216+ BFRDY : u1 ,
217+ reserved1 : u1 = 0 ,
218+ MONRDY : u1 ,
219+ reserved2 : u21 = 0 ,
220+ /// Automatic state preservation enable. Enables lazy context save of
221+ /// floating-point state. The possible values of this bit are:
222+ /// 0 = Disable automatic lazy context save.
223+ /// 1 = Enable automatic lazy state preservation for floating-point
224+ /// context.
225+ ///
226+ /// Writes to this bit from Non-secure state are ignored if LSPENS is
227+ /// set to one.
228+ LSPEN : u1 ,
229+ /// Automatic state preservation enable. Enables CONTROL.FPCA setting
230+ /// on execution of a floating-point instruction. This results in
231+ /// automatic hardware state preservation and restoration, for
232+ /// floating-point context, on exception entry and exit. The possible
233+ /// values of this bit are:
234+ /// 1 = Enable CONTROL.FPCA setting on execution of a floating-point
235+ /// instruction.
236+ /// 0 = Disable CONTROL.FPCA setting on execution of a
237+ /// floating-point instruction.
238+ ASPEN : u1 ,
239+ }),
240+ FPCAR : u32 ,
241+ FPDSCR : u32 ,
242+ };
0 commit comments