Page MenuHomeFreeBSD

arm64: make SPE regs use ALT_NAME macro
ClosedPublic

Authored by zachary.leaf_arm.com on May 13 2024, 9:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 12:22 PM
Unknown Object (File)
Oct 18 2024, 8:37 AM
Unknown Object (File)
Oct 17 2024, 8:27 AM
Unknown Object (File)
Oct 17 2024, 6:17 AM
Unknown Object (File)
Oct 16 2024, 10:00 PM
Unknown Object (File)
Oct 16 2024, 5:02 AM
Unknown Object (File)
Oct 15 2024, 2:19 AM
Unknown Object (File)
Oct 14 2024, 10:50 PM
Subscribers

Details

Summary

When the register is not defined in Armv8.0 i.e. added in a later
extension, like SPE added in v8.2, the alternative name format of:

S<op0>_<op1>_C<crn>_C<crm>_<op2>

should be used; otherwise, calls to {READ,WRITE}_SPECIALREG() will
fail.

Use the MRS_REG_ALT_NAME() macro for SPE changing hex to decimal as
required by the macro.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/arm64/include/armreg.h
1638

As with D45173 keep the existing MRS_REG macro and add a _REG one with MRS_REG_ALT_NAME

sys/arm64/include/armreg.h
1638

Would the non-_REG one ever actually be usable or useful in any way? Trying to understand the logic of keeping the existing ones. MRS_REG produces a 24 bit value e.g. 0x189ae0, the _ALT_NAME one S3_0_C9_C10_7.

sys/arm64/include/armreg.h
1638

They are used in identcpu.c when we need to provide a common value across all CPUs. In this case they are unlikely to be used, but I'd prefer to keep the macro names consistent.

This revision is now accepted and ready to land.May 14 2024, 10:00 AM
This revision was automatically updated to reflect the committed changes.