On Tue, Feb 20, 2024 at 10:09:13AM +0000, James Clark wrote: > Add separate definitions for ELx and EL2 as TRFCR_EL1 doesn't have CX. > This also mirrors the previous definition so no code change is required. This is also converting to automatic generation in the process. > +SysregFields TRFCR_EL2 > +Res0 63:7 > +UnsignedEnum 6:5 TS > + 0b0000 USE_TRFCR_EL1_TS > + 0b0001 VIRTUAL > + 0b0010 GUEST_PHYSICAL > + 0b0011 PHYSICAL > +EndEnum > +Res0 4 > +Field 3 CX > +Res0 2 > +Field 1 E2TRE > +Field 0 E0HTRE > +EndSysregFields This has exactly one user and I'd not expect more so why have a separate SysregFields? > +# TRFCR_EL1 doesn't have the CX bit so redefine it without CX instead of > +# using a shared definition between TRFCR_EL2 and TRFCR_EL1 This comment is reflecting the default state? > +Sysreg TRFCR_EL1 3 0 1 2 1 > +Fields TRFCR_ELx > +EndSysreg > + > +Sysreg TRFCR_EL2 3 4 1 2 1 > +Fields TRFCR_EL2 > +EndSysreg > + > +Sysreg TRFCR_EL12 3 5 1 2 1 > +Fields TRFCR_ELx > +EndSysreg These are generally sorted by encoding (simiarly to how sysreg.h was sorted historically).