xref: /xnu-12377.1.9/osfmk/arm/arm_features.inc (revision f6217f891ac0bb64f3d375211650a4c1ff8ca1ea)
1/*
2 * Copyright (c) 2024 Apple Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29/**
30 * Enumerated ARM optional features to be exported to userspace. These are to be
31 * enumerated using the official feature name from the ARM ARM. They are grouped
32 * below based on the MSR that will be used to populate the data.
33 */
34
35
36/* Features from: ID_AA64ISAR0_EL1 */
37ARM_FEATURE_FLAG(FEAT_CRC32);
38ARM_FEATURE_FLAG(FEAT_FlagM);
39ARM_FEATURE_FLAG(FEAT_FlagM2);
40ARM_FEATURE_FLAG(FEAT_FHM);
41ARM_FEATURE_FLAG(FEAT_DotProd);
42ARM_FEATURE_FLAG(FEAT_SHA3);
43ARM_FEATURE_FLAG(FEAT_RDM);
44ARM_FEATURE_FLAG(FEAT_LSE);
45ARM_FEATURE_FLAG(FEAT_SHA256);
46ARM_FEATURE_FLAG(FEAT_SHA512);
47ARM_FEATURE_FLAG(FEAT_SHA1);
48ARM_FEATURE_FLAG(FEAT_AES);
49ARM_FEATURE_FLAG(FEAT_PMULL);
50
51/* Features from: ID_AA64ISAR1_EL1 */
52ARM_FEATURE_FLAG(FEAT_SPECRES);
53ARM_FEATURE_FLAG(FEAT_SPECRES2);
54ARM_FEATURE_FLAG(FEAT_SB);
55ARM_FEATURE_FLAG(FEAT_FRINTTS);
56ARM_FEATURE_FLAG(FEAT_PACIMP);
57ARM_FEATURE_FLAG(FEAT_LRCPC);
58ARM_FEATURE_FLAG(FEAT_LRCPC2);
59ARM_FEATURE_FLAG(FEAT_FCMA);
60ARM_FEATURE_FLAG(FEAT_JSCVT);
61ARM_FEATURE_FLAG(FEAT_PAuth);
62ARM_FEATURE_FLAG(FEAT_PAuth2);
63ARM_FEATURE_FLAG(FEAT_FPAC);
64ARM_FEATURE_FLAG(FEAT_FPACCOMBINE);
65ARM_FEATURE_FLAG(FEAT_DPB);
66ARM_FEATURE_FLAG(FEAT_DPB2);
67ARM_FEATURE_FLAG(FEAT_BF16);
68ARM_FEATURE_FLAG(FEAT_EBF16);
69ARM_FEATURE_FLAG(FEAT_I8MM);
70
71/* Features from: ID_AA64ISAR2_EL1 */
72ARM_FEATURE_FLAG(FEAT_WFxT);
73ARM_FEATURE_FLAG(FEAT_RPRES);
74ARM_FEATURE_FLAG(FEAT_CSSC);
75ARM_FEATURE_FLAG(FEAT_HBC);
76
77
78/* Features from: ID_AA64MMFR0_EL1 */
79ARM_FEATURE_FLAG(FEAT_ECV);
80
81/* Features from: ID_AA64MMFR1_EL1 */
82ARM_FEATURE_FLAG(FEAT_AFP);
83
84/* Features from: ID_AA64MMFR2_EL1 */
85ARM_FEATURE_FLAG(FEAT_LSE2);
86
87/* Features from: ID_AA64PFR0_EL1 */
88ARM_FEATURE_FLAG(FEAT_CSV2);
89ARM_FEATURE_FLAG(FEAT_CSV3);
90ARM_FEATURE_FLAG(FEAT_DIT);
91ARM_FEATURE_FLAG(AdvSIMD);
92ARM_FEATURE_FLAG(AdvSIMD_HPFPCvt);
93ARM_FEATURE_FLAG(FEAT_FP16);
94
95/* Features from: ID_AA64PFR1_EL1 */
96ARM_FEATURE_FLAG(FEAT_SSBS);
97ARM_FEATURE_FLAG(FEAT_BTI);
98ARM_FEATURE_FLAG(FEAT_SME);
99ARM_FEATURE_FLAG(FEAT_SME2);
100
101/* Features from: ID_AA64PFR2_EL1 */
102
103/* Features from: ID_AA64SMFR0_EL1 */
104ARM_FEATURE_FLAG(SME_F32F32);
105ARM_FEATURE_FLAG(SME_BI32I32);
106ARM_FEATURE_FLAG(SME_B16F32);
107ARM_FEATURE_FLAG(SME_F16F32);
108ARM_FEATURE_FLAG(SME_I8I32);
109ARM_FEATURE_FLAG(SME_I16I32);
110ARM_FEATURE_FLAG(FEAT_SME_F64F64);
111ARM_FEATURE_FLAG(FEAT_SME_I16I64);
112
113/* Features from: FPCR */
114ARM_FEATURE_FLAG(FP_SyncExceptions);
115
116/* Features derived from other feature flags */
117