]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseRngLib/AArch64/ArmRng.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseRngLib / AArch64 / ArmRng.h
1 /** @file
2 Random number generator service that uses the RNDR instruction
3 to provide pseudorandom numbers.
4
5 Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef ARM_RNG_H_
12 #define ARM_RNG_H_
13
14 /**
15 Generates a random number using RNDR.
16 Returns TRUE on success; FALSE on failure.
17
18 @param[out] Rand Buffer pointer to store the 64-bit random value.
19
20 @retval TRUE Random number generated successfully.
21 @retval FALSE Failed to generate the random number.
22
23 **/
24 BOOLEAN
25 EFIAPI
26 ArmRndr (
27 OUT UINT64 *Rand
28 );
29
30 /**
31 Reads the ID_AA64ISAR0 Register.
32
33 @return The contents of the ID_AA64ISAR0 register.
34
35 **/
36 UINT64
37 EFIAPI
38 ArmReadIdIsar0 (
39 VOID
40 );
41
42 #endif /* ARM_RNG_H_ */