MdePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
1436aea4d5
commit
2f88bd3a12
@@ -24,7 +24,7 @@
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArmRndr (
|
||||
OUT UINT64 *Rand
|
||||
OUT UINT64 *Rand
|
||||
);
|
||||
|
||||
/**
|
||||
|
@@ -17,12 +17,12 @@
|
||||
#include "ArmRng.h"
|
||||
#include "BaseRngLibInternals.h"
|
||||
|
||||
STATIC BOOLEAN mRndrSupported;
|
||||
STATIC BOOLEAN mRndrSupported;
|
||||
|
||||
//
|
||||
// Bit mask used to determine if RNDR instruction is supported.
|
||||
//
|
||||
#define RNDR_MASK ((UINT64)MAX_UINT16 << 60U)
|
||||
#define RNDR_MASK ((UINT64)MAX_UINT16 << 60U)
|
||||
|
||||
/**
|
||||
The constructor function checks whether or not RNDR instruction is supported
|
||||
@@ -41,7 +41,8 @@ BaseRngLibConstructor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
UINT64 Isar0;
|
||||
UINT64 Isar0;
|
||||
|
||||
//
|
||||
// Determine RNDR support by examining bits 63:60 of the ISAR0 register returned by
|
||||
// MSR. A non-zero value indicates that the processor supports the RNDR instruction.
|
||||
@@ -66,10 +67,10 @@ BaseRngLibConstructor (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber16 (
|
||||
OUT UINT16 *Rand
|
||||
OUT UINT16 *Rand
|
||||
)
|
||||
{
|
||||
UINT64 Rand64;
|
||||
UINT64 Rand64;
|
||||
|
||||
if (ArchGetRandomNumber64 (&Rand64)) {
|
||||
*Rand = Rand64 & MAX_UINT16;
|
||||
@@ -91,10 +92,10 @@ ArchGetRandomNumber16 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber32 (
|
||||
OUT UINT32 *Rand
|
||||
OUT UINT32 *Rand
|
||||
)
|
||||
{
|
||||
UINT64 Rand64;
|
||||
UINT64 Rand64;
|
||||
|
||||
if (ArchGetRandomNumber64 (&Rand64)) {
|
||||
*Rand = Rand64 & MAX_UINT32;
|
||||
@@ -116,7 +117,7 @@ ArchGetRandomNumber32 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber64 (
|
||||
OUT UINT64 *Rand
|
||||
OUT UINT64 *Rand
|
||||
)
|
||||
{
|
||||
return ArmRndr (Rand);
|
||||
|
@@ -19,8 +19,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
// Uses the recommended value defined in Section 7.3.17 of "Intel 64 and IA-32
|
||||
// Architectures Software Developer's Manual".
|
||||
//
|
||||
#define GETRANDOM_RETRY_LIMIT 10
|
||||
|
||||
#define GETRANDOM_RETRY_LIMIT 10
|
||||
|
||||
/**
|
||||
Generates a 16-bit random number.
|
||||
@@ -36,7 +35,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
GetRandomNumber16 (
|
||||
OUT UINT16 *Rand
|
||||
OUT UINT16 *Rand
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
@@ -77,7 +76,7 @@ GetRandomNumber16 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
GetRandomNumber32 (
|
||||
OUT UINT32 *Rand
|
||||
OUT UINT32 *Rand
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
@@ -118,7 +117,7 @@ GetRandomNumber32 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
GetRandomNumber64 (
|
||||
OUT UINT64 *Rand
|
||||
OUT UINT64 *Rand
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
@@ -159,7 +158,7 @@ GetRandomNumber64 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
GetRandomNumber128 (
|
||||
OUT UINT64 *Rand
|
||||
OUT UINT64 *Rand
|
||||
)
|
||||
{
|
||||
ASSERT (Rand != NULL);
|
||||
|
@@ -22,7 +22,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber16 (
|
||||
OUT UINT16 *Rand
|
||||
OUT UINT16 *Rand
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ ArchGetRandomNumber16 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber32 (
|
||||
OUT UINT32 *Rand
|
||||
OUT UINT32 *Rand
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -52,7 +52,7 @@ ArchGetRandomNumber32 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber64 (
|
||||
OUT UINT64 *Rand
|
||||
OUT UINT64 *Rand
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -71,8 +71,8 @@ ArchIsRngSupported (
|
||||
#if defined (MDE_CPU_AARCH64)
|
||||
|
||||
// RNDR, Random Number
|
||||
#define RNDR S3_3_C2_C4_0
|
||||
#define RNDR S3_3_C2_C4_0
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BASE_RNGLIB_INTERNALS_H_
|
||||
#endif // BASE_RNGLIB_INTERNALS_H_
|
||||
|
@@ -18,10 +18,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
//
|
||||
// Bit mask used to determine if RdRand instruction is supported.
|
||||
//
|
||||
#define RDRAND_MASK BIT30
|
||||
#define RDRAND_MASK BIT30
|
||||
|
||||
|
||||
STATIC BOOLEAN mRdRandSupported;
|
||||
STATIC BOOLEAN mRdRandSupported;
|
||||
|
||||
/**
|
||||
The constructor function checks whether or not RDRAND instruction is supported
|
||||
@@ -66,7 +65,7 @@ BaseRngLibConstructor (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber16 (
|
||||
OUT UINT16 *Rand
|
||||
OUT UINT16 *Rand
|
||||
)
|
||||
{
|
||||
return AsmRdRand16 (Rand);
|
||||
@@ -84,7 +83,7 @@ ArchGetRandomNumber16 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber32 (
|
||||
OUT UINT32 *Rand
|
||||
OUT UINT32 *Rand
|
||||
)
|
||||
{
|
||||
return AsmRdRand32 (Rand);
|
||||
@@ -102,7 +101,7 @@ ArchGetRandomNumber32 (
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
ArchGetRandomNumber64 (
|
||||
OUT UINT64 *Rand
|
||||
OUT UINT64 *Rand
|
||||
)
|
||||
{
|
||||
return AsmRdRand64 (Rand);
|
||||
|
Reference in New Issue
Block a user