1 /* 2 * Copyright (c) 2007 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 #ifndef _ARM_CPU_CAPABILITIES_PUBLIC_H 30 #define _ARM_CPU_CAPABILITIES_PUBLIC_H 31 32 33 34 /* 35 * In order to reduce the number of sysctls require for a process to get 36 * the full list of supported processor capabilities extensions, the 37 * hw.optional.arm.caps sysctl generates a bit buffer with each bit representing 38 * the presence (1) or absence (0) of a given FEAT extension. 39 */ 40 41 #define HW_OPTIONAL_ARM_CAPS 42 43 /* 44 * Clang needs those bits to remain constant. 45 * Existing entries should never be updated as they are ABI. 46 * Adding new entries to the end and bumping CAP_BIT_NB is okay. 47 */ 48 49 #define CAP_BIT_FEAT_FlagM 0 50 #define CAP_BIT_FEAT_FlagM2 1 51 #define CAP_BIT_FEAT_FHM 2 52 #define CAP_BIT_FEAT_DotProd 3 53 #define CAP_BIT_FEAT_SHA3 4 54 #define CAP_BIT_FEAT_RDM 5 55 #define CAP_BIT_FEAT_LSE 6 56 #define CAP_BIT_FEAT_SHA256 7 57 #define CAP_BIT_FEAT_SHA512 8 58 #define CAP_BIT_FEAT_SHA1 9 59 #define CAP_BIT_FEAT_AES 10 60 #define CAP_BIT_FEAT_PMULL 11 61 #define CAP_BIT_FEAT_SPECRES 12 62 #define CAP_BIT_FEAT_SB 13 63 #define CAP_BIT_FEAT_FRINTTS 14 64 #define CAP_BIT_FEAT_LRCPC 15 65 #define CAP_BIT_FEAT_LRCPC2 16 66 #define CAP_BIT_FEAT_FCMA 17 67 #define CAP_BIT_FEAT_JSCVT 18 68 #define CAP_BIT_FEAT_PAuth 19 69 #define CAP_BIT_FEAT_PAuth2 20 70 #define CAP_BIT_FEAT_FPAC 21 71 #define CAP_BIT_FEAT_DPB 22 72 #define CAP_BIT_FEAT_DPB2 23 73 #define CAP_BIT_FEAT_BF16 24 74 #define CAP_BIT_FEAT_I8MM 25 75 #define CAP_BIT_FEAT_WFxT 26 76 #define CAP_BIT_FEAT_RPRES 27 77 #define CAP_BIT_FEAT_ECV 28 78 #define CAP_BIT_FEAT_AFP 29 79 #define CAP_BIT_FEAT_LSE2 30 80 #define CAP_BIT_FEAT_CSV2 31 81 #define CAP_BIT_FEAT_CSV3 32 82 #define CAP_BIT_FEAT_DIT 33 83 #define CAP_BIT_FEAT_FP16 34 84 #define CAP_BIT_FEAT_SSBS 35 85 #define CAP_BIT_FEAT_BTI 36 86 87 88 /* SME */ 89 #define CAP_BIT_FEAT_SME 40 90 #define CAP_BIT_FEAT_SME2 41 91 #define CAP_BIT_FEAT_SME_F64F64 42 92 #define CAP_BIT_FEAT_SME_I16I64 43 93 /* 5 bits left after SME. */ 94 95 #define CAP_BIT_AdvSIMD 49 96 #define CAP_BIT_AdvSIMD_HPFPCvt 50 97 #define CAP_BIT_CRC32 51 98 99 #define CAP_BIT_SME_F32F32 52 100 #define CAP_BIT_SME_BI32I32 53 101 #define CAP_BIT_SME_B16F32 54 102 #define CAP_BIT_SME_F16F32 55 103 #define CAP_BIT_SME_I8I32 56 104 #define CAP_BIT_SME_I16I32 57 105 106 107 108 /* Total number of FEAT bits. */ 109 #define CAP_BIT_NB 64 110 111 #endif /* _ARM_CPU_CAPABILITIES_PUBLIC_H */ 112