VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseRngLib/BaseRngLibInternals.h@ 107675

最後變更 在這個檔案從107675是 105670,由 vboxsync 提交於 8 月 前

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.5 KB
 
1/** @file
2
3 Architecture specific interface to RNG functionality.
4
5Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
6
7SPDX-License-Identifier: BSD-2-Clause-Patent
8
9**/
10
11#ifndef BASE_RNGLIB_INTERNALS_H_
12#define BASE_RNGLIB_INTERNALS_H_
13
14/**
15 Generates a 16-bit random number.
16
17 @param[out] Rand Buffer pointer to store the 16-bit random value.
18
19 @retval TRUE Random number generated successfully.
20 @retval FALSE Failed to generate the random number.
21
22**/
23BOOLEAN
24EFIAPI
25ArchGetRandomNumber16 (
26 OUT UINT16 *Rand
27 );
28
29/**
30 Generates a 32-bit random number.
31
32 @param[out] Rand Buffer pointer to store the 32-bit random value.
33
34 @retval TRUE Random number generated successfully.
35 @retval FALSE Failed to generate the random number.
36
37**/
38BOOLEAN
39EFIAPI
40ArchGetRandomNumber32 (
41 OUT UINT32 *Rand
42 );
43
44/**
45 Generates a 64-bit random number.
46
47 @param[out] Rand Buffer pointer to store the 64-bit random value.
48
49 @retval TRUE Random number generated successfully.
50 @retval FALSE Failed to generate the random number.
51
52**/
53BOOLEAN
54EFIAPI
55ArchGetRandomNumber64 (
56 OUT UINT64 *Rand
57 );
58
59/**
60 Checks whether the RNG instruction is supported.
61
62 @retval TRUE RNG instruction is supported.
63 @retval FALSE RNG instruction is not supported.
64
65**/
66BOOLEAN
67EFIAPI
68ArchIsRngSupported (
69 VOID
70 );
71
72#if defined (MDE_CPU_AARCH64)
73
74// RNDR, Random Number
75#define RNDR S3_3_C2_C4_0
76
77#endif
78
79#endif // BASE_RNGLIB_INTERNALS_H_
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette