Add HW feature check for ARMv8 AArch64 and crypto extensions
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Thu, 14 Jul 2016 14:55:28 +0000 (17:55 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Thu, 14 Jul 2016 14:55:28 +0000 (17:55 +0300)
commiteee78f6e1fbce7d54c43fb7efc5aa8be9f52755f
tree2c4a87ba0258d237c845144ebb0a7883988cfb1a
parent62642c4be0653a94fdec0c0b1f9d38673250a156
Add HW feature check for ARMv8 AArch64 and crypto extensions

* configure.ac: Add '--disable-arm-crypto-support'; enable hwf-arm
module on 64-bit ARM.
(armcryptosupport, gcry_cv_gcc_inline_aarch32_crypto)
(gcry_cv_inline_asm_aarch64_neon)
(gcry_cv_gcc_inline_asm_aarch64_crypto): New.
* src/g10lib.h (HWF_ARM_AES, HWF_ARM_SHA1, HWF_ARM_SHA2)
(HWF_ARM_PMULL): New.
* src/hwf-arm.c [__aarch64__]: Enable building in AArch64 mode.
(feature_map_s): New.
[__arm__] (AT_HWCAP, AT_HWCAP2, HWCAP2_AES, HWCAP2_PMULL)
(HWCAP2_SHA1, HWCAP2_SHA2, arm_features): New.
[__aarch64__] (AT_HWCAP, AT_HWCAP2, HWCAP_ASIMD, HWCAP_AES)
(HWCAP_PMULL, HWCAP_SHA1, HWCAP_SHA2, arm_features): New.
(get_hwcap): Add reading of 'AT_HWCAP2'; Change auxv use
'unsigned long'.
(detect_arm_at_hwcap): Add mapping of HWCAP/HWCAP2 to HWF flags.
(detect_arm_proc_cpuinfo): Add mapping of CPU features to HWF flags.
(_gcry_hwf_detect_arm): Use __ARM_NEON instead of legacy __ARM_NEON__.
* src/hwfeatures.c (hwflist): Add 'arm-aes', 'arm-sha1', 'arm-sha2'
and 'arm-pmull'.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
configure.ac
src/g10lib.h
src/hwf-arm.c
src/hwfeatures.c