> On 15 May 2026, at 9:29 PM, Eric Auger <[email protected]> wrote: > > when you say "arch defined named values", if we take for instance SHA2 > field of ID_AA64ISAR0 > > +IDREG_FIELD_START(ID_AA64ISAR0, SHA2, 12, 4, LOWER, 0) > +IDREG_FIELD_ARCH_VAL(0b0000, "off") > +IDREG_FIELD_ARCH_VAL(0b0001, "sha256") > +IDREG_FIELD_ARCH_VAL(0b0010, "sha512") > +IDREG_FIELD_END(ID_AA64ISAR0, SHA2) > > > I don't see such string value in the ARM ARM: > > 0b0000 No SHA2 instructions implemented. > 0b0001 Implements instructions: SHA256H, SHA256H2, SHA256SU0, and SHA256SU1. > 0b0010 Implements instructions: • SHA256H, SHA256H2, SHA256SU0, and > SHA256SU1. • SHA512H, SHA512H2, SHA512SU0, and SHA512SU1. > > Where did you get those arch defined strings? The only source I can see > is linux sysreg and I am not sure this can be used as a reference. > > Looking at target/arm/cpu-idregs.h.inc > > +IDREG_FIELD_START(ID_AA64ISAR0, TLB, 56, 4, LOWER, 0) > +IDREG_FIELD_ARCH_VAL(0b0000, "off") > +IDREG_FIELD_ARCH_VAL(0b0001, "os") > +IDREG_FIELD_ARCH_VAL(0b0010, "range") > +IDREG_FIELD_END(ID_AA64ISAR0, TLB) > > it looks not straightforward to link with ARM ARM > > TLB, bits [59:56] Indicates support for Outer Shareable and TLB range > maintenance instructions. The value of this field is an IMPLEMENTATION > DEFINED choice of: 0b0000 Outer Shareable and TLB range maintenance > instructions are not implemented. 0b0001 Outer Shareable TLB maintenance > instructions are implemented. 0b0010 Outer Shareable and TLB range > maintenance instructions are implemented. All other values are reserved. > FEAT_TLBIOS implements the functionality identified by the values 0b0001 > and 0b0010. FEAT_TLBIRANGE implements the functionality identified by > the value 0b0010. From Armv8.4, the only permitted value is 0b0010. > Access to this field is RO > > > Thanks > > Eric
You are correct, I should say: arched defined values with names. For many field, there are no names for the values. But, we can iterate over the names till they make sense. Like maybe: +IDREG_FIELD_START(ID_AA64ISAR0, TLB, 56, 4, LOWER, 0) +IDREG_FIELD_ARCH_VAL(0b0000, "off") +IDREG_FIELD_ARCH_VAL(0b0001, "os") +IDREG_FIELD_ARCH_VAL(0b0010, “os_range") +IDREG_FIELD_END(ID_AA64ISAR0, TLB) Warm Regards, Khushit
