1 /** 2 * D header file for GNU/Linux. 3 * 4 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 5 * Authors: Kai Nacke 6 */ 7 module core.sys.linux.sys.auxv; 8 9 import core.stdc.config; 10 11 version (linux): 12 extern (C): 13 14 version (MIPS32) version = MIPS_Any; 15 version (MIPS64) version = MIPS_Any; 16 version (PPC) version = PPC_Any; 17 version (PPC64) version = PPC_Any; 18 version (S390) version = IBMZ_Any; 19 version (SPARC) version = SPARC_Any; 20 version (SPARC64) version = SPARC_Any; 21 version (SystemZ) version = IBMZ_Any; 22 23 c_ulong getauxval(c_ulong type) nothrow pure @nogc @system; 24 25 version (ARM) 26 { 27 // See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/arm/bits/hwcap.h 28 29 enum HWCAP_ARM_SWP = 1; 30 enum HWCAP_ARM_HALF = 2; 31 enum HWCAP_ARM_THUMB = 4; 32 enum HWCAP_ARM_26BIT = 8; 33 enum HWCAP_ARM_FAST_MULT = 16; 34 enum HWCAP_ARM_FPA = 32; 35 enum HWCAP_ARM_VFP = 64; 36 enum HWCAP_ARM_EDSP = 128; 37 enum HWCAP_ARM_JAVA = 256; 38 enum HWCAP_ARM_IWMMXT = 512; 39 enum HWCAP_ARM_CRUNCH = 1024; 40 enum HWCAP_ARM_THUMBEE = 2048; 41 enum HWCAP_ARM_NEON = 4096; 42 enum HWCAP_ARM_VFPv3 = 8192; 43 enum HWCAP_ARM_VFPv3D16 = 16384; 44 enum HWCAP_ARM_TLS = 32768; 45 enum HWCAP_ARM_VFPv4 = 65536; 46 enum HWCAP_ARM_IDIVA = 131072; 47 enum HWCAP_ARM_IDIVT = 262144; 48 enum HWCAP_ARM_VFPD32 = 524288; 49 enum HWCAP_ARM_LPAE = 1048576; 50 enum HWCAP_ARM_EVTSTRM = 2097152; 51 } 52 else version (AArch64) 53 { 54 // See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h 55 56 enum HWCAP_FP = 1; 57 enum HWCAP_ASIMD = 2; 58 enum HWCAP_EVTSTRM = 4; 59 enum HWCAP_AES = 8; 60 enum HWCAP_PMULL = 16; 61 enum HWCAP_SHA1 = 32; 62 enum HWCAP_SHA2 = 64; 63 enum HWCAP_CRC32 = 128; 64 enum HWCAP_ATOMICS = 256; 65 enum HWCAP_FPHP = 512; 66 enum HWCAP_ASIMDHP = 1024; 67 } 68 else version (PPC_Any) 69 { 70 // See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/bits/hwcap.h 71 72 enum PPC_FEATURE_32 = 0x80000000; 73 enum PPC_FEATURE_64 = 0x40000000; 74 enum PPC_FEATURE_601_INSTR = 0x20000000; 75 enum PPC_FEATURE_HAS_ALTIVEC = 0x10000000; 76 enum PPC_FEATURE_HAS_FPU = 0x08000000; 77 enum PPC_FEATURE_HAS_MMU = 0x04000000; 78 enum PPC_FEATURE_HAS_4xxMAC = 0x02000000; 79 enum PPC_FEATURE_UNIFIED_CACHE = 0x01000000; 80 enum PPC_FEATURE_HAS_SPE = 0x00800000; 81 enum PPC_FEATURE_HAS_EFP_SINGLE = 0x00400000; 82 enum PPC_FEATURE_HAS_EFP_DOUBLE = 0x00200000; 83 enum PPC_FEATURE_NO_TB = 0x00100000; 84 enum PPC_FEATURE_POWER4 = 0x00080000; 85 enum PPC_FEATURE_POWER5 = 0x00040000; 86 enum PPC_FEATURE_POWER5_PLUS = 0x00020000; 87 enum PPC_FEATURE_CELL_BE = 0x00010000; 88 enum PPC_FEATURE_BOOKE = 0x00008000; 89 enum PPC_FEATURE_SMT = 0x00004000; 90 91 enum PPC_FEATURE_ICACHE_SNOOP = 0x00002000; 92 enum PPC_FEATURE_ARCH_2_05 = 0x00001000; 93 enum PPC_FEATURE_PA6T = 0x00000800; 94 enum PPC_FEATURE_HAS_DFP = 0x00000400; 95 enum PPC_FEATURE_POWER6_EXT = 0x00000200; 96 enum PPC_FEATURE_ARCH_2_06 = 0x00000100; 97 enum PPC_FEATURE_HAS_VSX = 0x00000080; 98 enum PPC_FEATURE_PSERIES_PERFMON_COMPAT = 0x00000040; 99 enum PPC_FEATURE_TRUE_LE = 0x00000002; 100 enum PPC_FEATURE_PPC_LE = 0x00000001; 101 102 enum PPC_FEATURE2_ARCH_2_07 = 0x80000000; 103 enum PPC_FEATURE2_HAS_HTM = 0x40000000; 104 enum PPC_FEATURE2_HAS_DSCR = 0x20000000; 105 enum PPC_FEATURE2_HAS_EBB = 0x10000000; 106 enum PPC_FEATURE2_HAS_ISEL = 0x08000000; 107 enum PPC_FEATURE2_HAS_TAR = 0x04000000; 108 enum PPC_FEATURE2_HAS_VEC_CRYPTO = 0x02000000; 109 } 110 else version (SPARC_Any) 111 { 112 // See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/sparc/bits/hwcap.h 113 114 enum HWCAP_SPARC_FLUSH = 0x00000001; 115 enum HWCAP_SPARC_STBAR = 0x00000002; 116 enum HWCAP_SPARC_SWAP = 0x00000004; 117 enum HWCAP_SPARC_MULDIV = 0x00000008; 118 enum HWCAP_SPARC_V9 = 0x00000010; 119 enum HWCAP_SPARC_ULTRA3 = 0x00000020; 120 enum HWCAP_SPARC_BLKINIT = 0x00000040; 121 enum HWCAP_SPARC_N2 = 0x00000080; 122 enum HWCAP_SPARC_MUL32 = 0x00000100; 123 enum HWCAP_SPARC_DIV32 = 0x00000200; 124 enum HWCAP_SPARC_FSMULD = 0x00000400; 125 enum HWCAP_SPARC_V8PLUS = 0x00000800; 126 enum HWCAP_SPARC_POPC = 0x00001000; 127 enum HWCAP_SPARC_VIS = 0x00002000; 128 enum HWCAP_SPARC_VIS2 = 0x00004000; 129 enum HWCAP_SPARC_ASI_BLK_INIT = 0x00008000; 130 enum HWCAP_SPARC_FMAF = 0x00010000; 131 enum HWCAP_SPARC_VIS3 = 0x00020000; 132 enum HWCAP_SPARC_HPC = 0x00040000; 133 enum HWCAP_SPARC_RANDOM = 0x00080000; 134 enum HWCAP_SPARC_TRANS = 0x00100000; 135 enum HWCAP_SPARC_FJFMAU = 0x00200000; 136 enum HWCAP_SPARC_IMA = 0x00400000; 137 enum HWCAP_SPARC_ASI_CACHE_SPARING = 0x00800000; 138 enum HWCAP_SPARC_PAUSE = 0x01000000; 139 enum HWCAP_SPARC_CBCOND = 0x02000000; 140 enum HWCAP_SPARC_CRYPTO = 0x04000000; 141 } 142 else version (IBMZ_Any) 143 { 144 // See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/s390/bits/hwcap.h 145 146 enum HWCAP_S390_ESAN3 = 1; 147 enum HWCAP_S390_ZARCH = 2; 148 enum HWCAP_S390_STFLE = 4; 149 enum HWCAP_S390_MSA = 8; 150 enum HWCAP_S390_LDISP = 16; 151 enum HWCAP_S390_EIMM = 32; 152 enum HWCAP_S390_DFP = 64; 153 enum HWCAP_S390_HPAGE = 128; 154 enum HWCAP_S390_ETF3EH = 256; 155 enum HWCAP_S390_HIGH_GPRS = 512; 156 enum HWCAP_S390_TE = 1024; 157 enum HWCAP_S390_VX = 2048; 158 }