Balint Dobszay | 550ce87 | 2022-12-15 15:28:40 +0100 | [diff] [blame] | 1 | /* |
2 | * Copyright (c) 2023, Arm Limited. All rights reserved. | ||||
3 | * | ||||
4 | * SPDX-License-Identifier: BSD-3-Clause | ||||
5 | * | ||||
6 | */ | ||||
7 | |||||
8 | #include <stdbool.h> | ||||
9 | #include <sys/auxv.h> | ||||
10 | |||||
11 | #include "crc32_discovery.h" | ||||
12 | |||||
13 | bool crc32_armv8a_hw_available(void) | ||||
14 | { | ||||
15 | unsigned long hwcaps = getauxval(AT_HWCAP); | ||||
16 | return (hwcaps & HWCAP_CRC32) == HWCAP_CRC32; | ||||
17 | } |