TianoCore EDK2 master
Loading...
Searching...
No Matches
X86RdRand.c File Reference
#include "BaseLibInternals.h"

Go to the source code of this file.

Functions

BOOLEAN EFIAPI AsmRdRand16 (OUT UINT16 *Rand)
 
BOOLEAN EFIAPI AsmRdRand32 (OUT UINT32 *Rand)
 
BOOLEAN EFIAPI AsmRdRand64 (OUT UINT64 *Rand)
 

Detailed Description

IA-32/x64 AsmRdRandxx() Generates random number through CPU RdRand instruction.

Copyright (c) 2016, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file X86RdRand.c.

Function Documentation

◆ AsmRdRand16()

BOOLEAN EFIAPI AsmRdRand16 ( OUT UINT16 *  Rand)

Generates a 16-bit random number through RDRAND instruction.

if Rand is NULL, then ASSERT().

Parameters
[out]RandBuffer pointer to store the random result.
Return values
TRUERDRAND call was successful.
FALSEFailed attempts to call RDRAND.

Definition at line 25 of file X86RdRand.c.

◆ AsmRdRand32()

BOOLEAN EFIAPI AsmRdRand32 ( OUT UINT32 *  Rand)

Generates a 32-bit random number through RDRAND instruction.

if Rand is NULL, then ASSERT().

Parameters
[out]RandBuffer pointer to store the random result.
Return values
TRUERDRAND call was successful.
FALSEFailed attempts to call RDRAND.

Definition at line 46 of file X86RdRand.c.

◆ AsmRdRand64()

BOOLEAN EFIAPI AsmRdRand64 ( OUT UINT64 *  Rand)

Generates a 64-bit random number through RDRAND instruction.

if Rand is NULL, then ASSERT().

Parameters
[out]RandBuffer pointer to store the random result.
Return values
TRUERDRAND call was successful.
FALSEFailed attempts to call RDRAND.

Definition at line 67 of file X86RdRand.c.