mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-17 01:47:00 +02:00
Added support for HW computed CRC using Arm ACLE intrinsics. These are built-in intrinsics available for ARMv8.1-A, and onwards. These intrinsics are enabled via '-march=armv8-a+crc' compile switch for ARMv8-A (supports CRC instructions optionally). HW CRC support is enabled unconditionally in BL2 for all Arm platforms. HW CRC calculation is verified offline to ensure a similar result as its respective ZLib utility function. HW CRC calculation support will be used in the upcoming firmware update patches. Change-Id: Ia2ae801f62d2003e89a9c3e6d77469b5312614b3 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
17 lines
333 B
C
17 lines
333 B
C
/*
|
|
* Copyright (c) 2021, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef HW_CRC32_H
|
|
#define HW_CRC32_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
/* compute CRC using Arm intrinsic function */
|
|
uint32_t hw_crc32(uint32_t crc, const unsigned char *buf, size_t size);
|
|
|
|
#endif /* HW_CRC32_H */
|