hwcap_arm64.go raw

   1  // Copyright 2024 The gVisor Authors.
   2  //
   3  // Licensed under the Apache License, Version 2.0 (the "License");
   4  // you may not use this file except in compliance with the License.
   5  // You may obtain a copy of the License at
   6  //
   7  //     http://www.apache.org/licenses/LICENSE-2.0
   8  //
   9  // Unless required by applicable law or agreed to in writing, software
  10  // distributed under the License is distributed on an "AS IS" BASIS,
  11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12  // See the License for the specific language governing permissions and
  13  // limitations under the License.
  14  
  15  //go:build arm64
  16  // +build arm64
  17  
  18  package cpuid
  19  
  20  // See arch/arm64/include/uapi/asm/hwcap.h
  21  const (
  22  	// HWCAP flags for AT_HWCAP.
  23  	HWCAP_FP       = 1 << 0
  24  	HWCAP_ASIMD    = 1 << 1
  25  	HWCAP_EVTSTRM  = 1 << 2
  26  	HWCAP_AES      = 1 << 3
  27  	HWCAP_PMULL    = 1 << 4
  28  	HWCAP_SHA1     = 1 << 5
  29  	HWCAP_SHA2     = 1 << 6
  30  	HWCAP_CRC32    = 1 << 7
  31  	HWCAP_ATOMICS  = 1 << 8
  32  	HWCAP_FPHP     = 1 << 9
  33  	HWCAP_ASIMDHP  = 1 << 10
  34  	HWCAP_CPUID    = 1 << 11
  35  	HWCAP_ASIMDRDM = 1 << 12
  36  	HWCAP_JSCVT    = 1 << 13
  37  	HWCAP_FCMA     = 1 << 14
  38  	HWCAP_LRCPC    = 1 << 15
  39  	HWCAP_DCPOP    = 1 << 16
  40  	HWCAP_SHA3     = 1 << 17
  41  	HWCAP_SM3      = 1 << 18
  42  	HWCAP_SM4      = 1 << 19
  43  	HWCAP_ASIMDDP  = 1 << 20
  44  	HWCAP_SHA512   = 1 << 21
  45  	HWCAP_SVE      = 1 << 22
  46  	HWCAP_ASIMDFHM = 1 << 23
  47  	HWCAP_DIT      = 1 << 24
  48  	HWCAP_USCAT    = 1 << 25
  49  	HWCAP_ILRCPC   = 1 << 26
  50  	HWCAP_FLAGM    = 1 << 27
  51  	HWCAP_SSBS     = 1 << 28
  52  	HWCAP_SB       = 1 << 29
  53  	HWCAP_PACA     = 1 << 30
  54  	HWCAP_PACG     = 1 << 31
  55  
  56  	// HWCAP2 flags for AT_HWCAP2.
  57  	HWCAP2_DCPODP     = 1 << 0
  58  	HWCAP2_SVE2       = 1 << 1
  59  	HWCAP2_SVEAES     = 1 << 2
  60  	HWCAP2_SVEPMULL   = 1 << 3
  61  	HWCAP2_SVEBITPERM = 1 << 4
  62  	HWCAP2_SVESHA3    = 1 << 5
  63  	HWCAP2_SVESM4     = 1 << 6
  64  	HWCAP2_FLAGM2     = 1 << 7
  65  	HWCAP2_FRINT      = 1 << 8
  66  	HWCAP2_SVEI8MM    = 1 << 9
  67  	HWCAP2_SVEF32MM   = 1 << 10
  68  	HWCAP2_SVEF64MM   = 1 << 11
  69  	HWCAP2_SVEBF16    = 1 << 12
  70  	HWCAP2_I8MM       = 1 << 13
  71  	HWCAP2_BF16       = 1 << 14
  72  	HWCAP2_DGH        = 1 << 15
  73  	HWCAP2_RNG        = 1 << 16
  74  	HWCAP2_BTI        = 1 << 17
  75  	HWCAP2_MTE        = 1 << 18
  76  	HWCAP2_ECV        = 1 << 19
  77  	HWCAP2_AFP        = 1 << 20
  78  	HWCAP2_RPRES      = 1 << 21
  79  )
  80