mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00

The Juno Trusted Entropy Source has a bias, which makes the generated raw numbers fail a FIPS 140-2 statistic test. To improve the quality of the numbers, we can use the CPU's CRC instructions, which do a decent job on conditioning the bits. This adds a *very* simple version of arm_acle.h, which is typically provided by the compiler, and contains the CRC instrinsics definitions we need. We need the original version by using -nostdinc. Change-Id: I83d3e6902d6a1164aacd5060ac13a38f0057bd1a Signed-off-by: Andre Przywara <andre.przywara@arm.com>
22 lines
542 B
C
22 lines
542 B
C
/*
|
|
* Copyright (c) 2021 ARM Limited
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*
|
|
* The definitions below are a subset of what we would normally get by using
|
|
* the compiler's version of arm_acle.h. We can't use that directly because
|
|
* we specify -nostdinc in the Makefiles.
|
|
*
|
|
* We just define the functions we need so far.
|
|
*/
|
|
|
|
#ifndef ARM_ACLE_H
|
|
#define ARM_ACLE_H
|
|
|
|
#if !defined(__aarch64__) || defined(__clang__)
|
|
# define __crc32w __builtin_arm_crc32w
|
|
#else
|
|
# define __crc32w __builtin_aarch64_crc32w
|
|
#endif
|
|
|
|
#endif /* ARM_ACLE_H */
|