SecurityPkg: Integrate new RngLib into RngDxe

Use the new RngLib to provide the IA32/X64 random data for RngDxe.
Remove x86 specific functions from RdRand files.
Simplify RngDxe by using WriteUnaligned64 for all platforms.
Use GetRandomNumber128 in RngDxe to leverage 128 bit support provided
by some HW RNG devices.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18591 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Thomas Palmer
2015-10-09 06:03:26 +00:00
committed by qlong
parent c8b6f16d7d
commit 3b60842ce7
5 changed files with 28 additions and 409 deletions

View File

@@ -9,6 +9,7 @@
# Secure Key technology.
#
# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -41,16 +42,6 @@
AesCore.c
AesCore.h
[Sources.IA32]
IA32/RdRandWord.c
IA32/AsmRdRand.asm
IA32/GccRdRand.c | GCC
[Sources.X64]
X64/RdRandWord.c
X64/AsmRdRand.asm
X64/GccRdRand.c | GCC
[Packages]
MdePkg/MdePkg.dec
SecurityPkg/SecurityPkg.dec
@@ -62,6 +53,7 @@
DebugLib
UefiDriverEntryPoint
TimerLib
RngLib
[Guids]
gEfiRngAlgorithmSp80090Ctr256Guid ## SOMETIMES_PRODUCES ## GUID # Unique ID of the algorithm for RNG
@@ -77,4 +69,4 @@
XCODE:*_*_*_CC_FLAGS = -mmmx -msse
[UserExtensions.TianoCore."ExtraFiles"]
RngDxeExtra.uni
RngDxeExtra.uni