Page MenuHomeFreeBSD

arm64: make SPE regs use ALT_NAME macro
ClosedPublic

Authored by zachary.leaf_arm.com on Mon, May 13, 9:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 17, 7:22 PM
Unknown Object (File)
Fri, May 17, 3:12 PM
Unknown Object (File)
Wed, May 15, 5:22 PM
Unknown Object (File)
Tue, May 14, 4:29 AM
Unknown Object (File)
Mon, May 13, 7:36 PM
Unknown Object (File)
Mon, May 13, 7:36 PM
Unknown Object (File)
Mon, May 13, 7:25 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.Tue, May 14, 10:00 AM
This revision was automatically updated to reflect the committed changes.