Hi Everyone,
It appears defines like HWCAP_CRC32 fall under the purview of the
kernel. Confer, http://www.google.com/search?q="HWCAP_CRC32" (my
apologies if this is not the case).
We use getauxval(AT_HWCAP) and HWCAP_CRC32 for runtime detection of
processor support for CRC. However, I can't find a similar symbol in
the context of the crypto instructions. Confer,
http://www.google.com/search?q="HWCAP_CRYPTO".
My question is, what are the equivalent defines for Crypto features?
Thanks in advance.
*****
Below is from a 64-bit LeMaker HiKey
(http://www.lemaker.org/product-hikey-index.html). It responds to
getauxval(AT_HWCAP) and HWCAP_CRC32.
$ cat /proc/cpuinfo
Processor : AArch64 Processor rev 3 (aarch64)
processor : 0
...
processor : 7
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 3
Hardware : HiKey Development Board
On 5/15/2016 1:13 PM, Jeffrey Walton wrote:
> Hi Everyone,
>
> It appears defines like HWCAP_CRC32 fall under the purview of the
> kernel. Confer, http://www.google.com/search?q="HWCAP_CRC32" (my
> apologies if this is not the case).
>
> We use getauxval(AT_HWCAP) and HWCAP_CRC32 for runtime detection of
> processor support for CRC. However, I can't find a similar symbol in
> the context of the crypto instructions. Confer,
> http://www.google.com/search?q="HWCAP_CRYPTO".
>
> My question is, what are the equivalent defines for Crypto features?
>
Take a look at arch/arm64/include/uapi/asm/hwcap.h
#define HWCAP_AES (1 << 3)
#define HWCAP_PMULL (1 << 4)
#define HWCAP_SHA1 (1 << 5)
#define HWCAP_SHA2 (1 << 6)
Horia
> Thanks in advance.
>
> *****
>
> Below is from a 64-bit LeMaker HiKey
> (http://www.lemaker.org/product-hikey-index.html). It responds to
> getauxval(AT_HWCAP) and HWCAP_CRC32.
>
> $ cat /proc/cpuinfo
> Processor : AArch64 Processor rev 3 (aarch64)
> processor : 0
> ...
> processor : 7
> Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
> CPU implementer : 0x41
> CPU architecture: AArch64
> CPU variant : 0x0
> CPU part : 0xd03
> CPU revision : 3
>
> Hardware : HiKey Development Board