]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
arm64: export new HWCAP features
authorMitchell Horne <mhorne@FreeBSD.org>
Tue, 8 Sep 2020 15:36:38 +0000 (15:36 +0000)
committerMitchell Horne <mhorne@FreeBSD.org>
Tue, 8 Sep 2020 15:36:38 +0000 (15:36 +0000)
commit752eb6a99576f8b450397adb7e437a90799f3775
tree9d78515c166987798e89c88cc20c9f217d5313cf
parentd81d009c6cfc6ff767f185cef129a2537cbbc5c4
arm64: export new HWCAP features

Expose some of the new HWCAP features added in r65304. This includes the
addition of elf_hwcap2 into the sysvec, and a separate function to parse
for those features.

This only exposes features which require no further configuration, e.g.
indicating the presence of certain instructions. Larger features (SVE)
will not be advertised until we actually support them. The exact list of
features/extensions this patch exposes is:
  - ARMv8.0-DGH
  - ARMv8.0-SB
  - ARMv8.2-BF16
  - ARMv8.2-DCCVADP
  - ARMv8.2-I8MM
  - ARMv8.4-LRCPC
  - ARMv8.5-CondM
  - ARMv8.5-FRINT
  - ARMv8.5-RNG
  - PSTATE.SSBS

While here, annotate elf_hwcap and elf_hwcap2 as __read_frequently, and
move the declarations to the machine/md_var.h header.

Submitted by: mikael@ (D22314 portion)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26031
Differential Revision: https://reviews.freebsd.org/D22314
sys/arm64/arm64/elf_machdep.c
sys/arm64/arm64/identcpu.c
sys/arm64/include/md_var.h