blob: d6dd8b602a918aa83889816af9309fdbb6582e15 [file] [log] [blame]
Balint Dobszay550ce872022-12-15 15:28:40 +01001/*
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
13bool crc32_armv8a_hw_available(void)
14{
15 unsigned long hwcaps = getauxval(AT_HWCAP);
16 return (hwcaps & HWCAP_CRC32) == HWCAP_CRC32;
17}