audk/MdePkg/Library/BaseRngLib/BaseRngLibInternals.h
Oliver Smith-Denny d9715c133f MdePkg: Centralize RNDR Register Definition
RNDR is a standard register defined in the ARM ARM for
AARCH64. Move the definition from BaseRngLib to AArch64.h.

Furthermore, move the inclusion of this register definition
to the ARM specific header file.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-02-07 02:23:11 +00:00

73 lines
1.5 KiB
C

/** @file
Architecture specific interface to RNG functionality.
Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef BASE_RNGLIB_INTERNALS_H_
#define BASE_RNGLIB_INTERNALS_H_
/**
Generates a 16-bit random number.
@param[out] Rand Buffer pointer to store the 16-bit random value.
@retval TRUE Random number generated successfully.
@retval FALSE Failed to generate the random number.
**/
BOOLEAN
EFIAPI
ArchGetRandomNumber16 (
OUT UINT16 *Rand
);
/**
Generates a 32-bit random number.
@param[out] Rand Buffer pointer to store the 32-bit random value.
@retval TRUE Random number generated successfully.
@retval FALSE Failed to generate the random number.
**/
BOOLEAN
EFIAPI
ArchGetRandomNumber32 (
OUT UINT32 *Rand
);
/**
Generates a 64-bit random number.
@param[out] Rand Buffer pointer to store the 64-bit random value.
@retval TRUE Random number generated successfully.
@retval FALSE Failed to generate the random number.
**/
BOOLEAN
EFIAPI
ArchGetRandomNumber64 (
OUT UINT64 *Rand
);
/**
Checks whether the RNG instruction is supported.
@retval TRUE RNG instruction is supported.
@retval FALSE RNG instruction is not supported.
**/
BOOLEAN
EFIAPI
ArchIsRngSupported (
VOID
);
#endif // BASE_RNGLIB_INTERNALS_H_