[PATCH 0/3] MdePkg,SecurityPkg: Update BaseRngLib and RngDxe to support ARMv8.5 FEAT_RNG


Rebecca Cran <rebecca@...>
 

This is the RngLib|RNDR implementation from page 11 of the "Proposed
update to RNG implementation" presentation from Ard and Sami.

The presentation can be found at:
https://edk2.groups.io/g/devel/files/Designs/2021/0116/EDKII%20-%20Proposed%20update%20to%20RNG%20implementation.pdf

Rebecca Cran (3):
MdePkg/BaseLib: Add support for ARMv8.5 RNG instructions
MdePkg: Refactor BaseRngLib to support AARCH64 in addition to X86
SecurityPkg: Add support for RngDxe on AARCH64

MdePkg/MdePkg.dec | 9 +-
MdePkg/MdePkg.dsc | 4 +-
SecurityPkg/SecurityPkg.dsc | 11 +-
MdePkg/Library/BaseLib/BaseLib.inf | 4 +
MdePkg/Library/BaseRngLib/BaseRngLib.inf | 16 ++-
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf | 19 ++-
MdePkg/Include/Library/BaseLib.h | 47 ++++++++
MdePkg/Library/BaseLib/BaseLibInternals.h | 6 +
MdePkg/Library/BaseRngLib/BaseRngLibInternals.h | 31 +++++
SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/Rndr.h | 37 ++++++
SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.h | 0
SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.h | 0
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h | 88 ++++++++++++++
MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 121 ++++++++++++++++++++
MdePkg/Library/BaseRngLib/BaseRng.c | 55 +++------
MdePkg/Library/BaseRngLib/Rand/RdRand.c | 103 +++++++++++++++++
SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/Rndr.c | 54 +++++++++
SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c | 108 +++++++++++++++++
SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.c | 0
SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.c | 0
SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c | 120 +++++++++++++++++++
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.c | 117 ++++---------------
MdePkg/Library/BaseLib/AArch64/ArmReadIdIsar0.S | 29 +++++
MdePkg/Library/BaseLib/AArch64/ArmReadIdIsar0.asm | 28 +++++
MdePkg/Library/BaseLib/AArch64/ArmRng.S | 51 +++++++++
MdePkg/Library/BaseLib/AArch64/ArmRng.asm | 55 +++++++++
MdePkg/Library/BaseRngLib/BaseRngLib.uni | 6 +-
27 files changed, 961 insertions(+), 158 deletions(-)
create mode 100644 MdePkg/Library/BaseRngLib/BaseRngLibInternals.h
create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/Rndr.h
rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.h (100%)
rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.h (100%)
create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h
create mode 100644 MdePkg/Library/BaseRngLib/AArch64/Rndr.c
create mode 100644 MdePkg/Library/BaseRngLib/Rand/RdRand.c
create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/Rndr.c
create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c
rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.c (100%)
rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.c (100%)
create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c
create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmReadIdIsar0.S
create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmReadIdIsar0.asm
create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmRng.S
create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmRng.asm

--
2.26.2

Join devel@edk2.groups.io to automatically receive all group messages.