Skip to content

Commit

Permalink
MdePkg: Add Random Number Generator (RNG) PPI
Browse files Browse the repository at this point in the history
(cherry picked from commit de5c119)

REF:tianocore#10529

Adds a new PPI that serves the same purpose as EFI_RNG_PROTOCOL in
DXE. This PPI can be produced by a PEIM to provide a dynamic interface
to RNG services in PEI.

Signed-off-by: Michael Kubacki <[email protected]>
(cherry picked from commit de5c119)

Change-Id: I5da2fd339552908f044ebf5b5d2c8b2fd90a665b
  • Loading branch information
makubacki authored and HemaAnmisha committed Feb 11, 2025
1 parent 393bae6 commit 837ca09
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
27 changes: 27 additions & 0 deletions MdePkg/Include/Ppi/Rng.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/** @file
The Random Number Generator (RNG) PPI is used to provide random bits for use
in PEIMs, or entropy for seeding other random number generators. The PPI was
introduced in the PI 1.9 Specification.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#ifndef RNG_PPI_H_
#define RNG_PPI_H_

#include <Guid/Rng.h>

///
/// Global ID for the Random Number Generator PPI
///
#define RNG_PPI_GUID \
{ \
0xeaed0a7e, 0x1a70, 0x4c2b, { 0x85, 0x58, 0x37, 0x17, 0x74, 0x56, 0xd8, 0x06 } \
}

typedef EFI_RNG_INTERFACE RNG_PPI;

extern EFI_GUID gEfiRngPpiGuid;

#endif
3 changes: 3 additions & 0 deletions MdePkg/MdePkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,9 @@
## Include/Ppi/DelayedDispatch.h
gEfiPeiDelayedDispatchPpiGuid = { 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6 }}

## Include/Ppi/Rng.h
gEfiRngPpiGuid = { 0xeaed0a7e, 0x1a70, 0x4c2b, { 0x85, 0x58, 0x37, 0x17, 0x74, 0x56, 0xd8, 0x06 }}

[Protocols]
## Include/Protocol/MemoryAccept.h
gEdkiiMemoryAcceptProtocolGuid = { 0x38c74800, 0x5590, 0x4db4, { 0xa0, 0xf3, 0x67, 0x5d, 0x9b, 0x8e, 0x80, 0x26 }}
Expand Down

0 comments on commit 837ca09

Please sign in to comment.