arm64
HWCAP
User application can query CPU features available to it through the HWCAP mechanism.
See documentation at kernel.org (available since v4.15-rc1) for usage example as well as a complete list of supported flags: Documentation/arm64/elf_hwcaps.txt
This interface has been available in arm64 port of Linux since v3.7:
commit f668cd1673aa2e645ae98b65c4ffb9dae2c9ac17
Author: Catalin Marinas <[email protected]>
Date: Mon Mar 5 11:49:30 2012 +0000
arm64: ELF definitions
This patch adds definitions for the ELF format, including personality
personality setting and EXEC_PAGESIZE. The are only two hwcap
definitions for 64-bit applications - HWCAP_FP and HWCAP_ASIMD.
An example application hwcap
is provided in this repository.
CPUID
AArch64 defines CPU ID registers that can be queried by kernel (EL1). Thanks to MRS emulation support in kernel, a subset of these registers can be accessed by user application (EL0) as well.
See documentation at kernel.org for detailed description of this feature as well as usage example: Documentation/arm64/cpu-feature-registers.txt
This feature is available in arm64 port of Linux since v4.11:
commit 77c97b4ee21290f5f083173d957843b615abbff2
Author: Suzuki K Poulose <[email protected]>
Date: Mon Jan 9 17:28:31 2017 +0000
arm64: cpufeature: Expose CPUID registers by emulation
This patch adds the hook for emulating MRS instruction to
export the 'user visible' value of supported system registers.
We emulate only the following id space for system registers:
Op0=3, Op1=0, CRn=0, CRm=[0, 4-7]
The rest will fall back to SIGILL. This capability is also
advertised via a new HWCAP_CPUID.