SecurityPkg: Add RNG support

Uses the RDRAND instruction if available and install EfiRngProtocol.
The protocol may be used by iPXE or the Linux kernel to gather entropy.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Change-Id: I0f74b64c6a7e8fc6fdd8ea8f2a416d8b7c0334f4
This commit is contained in:
Patrick Rudolph
2020-05-11 14:31:44 +02:00
committed by Tim Crawford
parent 1f31c0e81e
commit 136138411f
3 changed files with 248 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
// /** @file
// Instance of RNG (Random Number Generator) Library.
//
// BaseRng Library that uses CPU RdRand instruction access to provide
// high-quality random numbers.
//
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
// **/
#string STR_MODULE_ABSTRACT #language en-US "Instance of RNG Library"
#string STR_MODULE_DESCRIPTION #language en-US "BaseRng Library that uses CPU RdRand instruction access to provide high-quality random numbers"