[edk2-devel] [PATCH v2 0/8] Add Raw algorithm support using Arm FW-TRNG interface

Sami Mujawar posted 8 patches 2 weeks, 5 days ago
Failed in applying to current master (apply log)
ArmPkg/ArmPkg.dec                                          |   5 +
ArmPkg/ArmPkg.dsc                                          |   1 +
ArmPkg/Library/ArmFwTrngLib/ArmFwTrngDefs.h                |  64 +++
ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.c                 | 483 ++++++++++++++++++++
ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.inf               |  34 ++
ArmVirtPkg/ArmVirtKvmTool.dsc                              |  10 +
ArmVirtPkg/ArmVirtKvmTool.fdf                              |   5 +
MdePkg/Include/Library/TrngLib.h                           | 121 +++++
MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.c           | 111 +++++
MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.inf         |  30 ++
MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.uni         |  12 +
MdePkg/MdePkg.dec                                          |   7 +-
MdePkg/MdePkg.dsc                                          |   1 +
SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c  |  79 +++-
SecurityPkg/RandomNumberGenerator/RngDxe/Arm/RngDxe.c      | 163 +++++++
SecurityPkg/RandomNumberGenerator/RngDxe/ArmTrng.c         |  61 +++
SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.c     |  13 +-
SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h     |  43 --
SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c     |  12 +-
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.c          |  13 +-
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf        |  14 +-
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h |  22 +-
SecurityPkg/SecurityPkg.dsc                                |   8 +-
23 files changed, 1239 insertions(+), 73 deletions(-)
create mode 100644 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngDefs.h
create mode 100644 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.c
create mode 100644 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.inf
create mode 100644 MdePkg/Include/Library/TrngLib.h
create mode 100644 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.c
create mode 100644 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.inf
create mode 100644 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.uni
create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/Arm/RngDxe.c
create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/ArmTrng.c
delete mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h

[edk2-devel] [PATCH v2 0/8] Add Raw algorithm support using Arm FW-TRNG interface

Posted by Sami Mujawar 2 weeks, 5 days ago
Bugzilla: Bug 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668)

The Arm True Random Number Generator Firmware, Interface 1.0, specification
defines an interface between an Operating System (OS) executing at EL1 and
Firmware (FW) exposing a conditioned entropy source that is provided by a
TRNG back end.

This v2 patch series updates the following based on the feedback received
for the v1 series at https://edk2.groups.io/g/devel/message/81653:
 - Updates TrngLib definitions to use RETURN_STATUS as the return type
   from the interface functions as TrngLib is base type library.
 - Drops the patch "MdePkg: Add definition for NULL GUID" as there is
   already an equivalent definition provided by gZeroGuid. Thus, the
   use of gNullGuid has been replaced with gZeroGuid.

The V1 patch series:
 - defines a TRNG library class that provides an interface to access the
   entropy source on a platform.
 - implements a TRNG library instance that uses the Arm FW-TRNG interface.
 - Adds RawAlgorithm support to RngDxe for Arm architecture using the Arm
   FW-TRNG interface.
 - Enables RNG support using FW-TRNG interface for Kvmtool Guest/Virtual
   firmware.

The changes can be seen at:
https://github.com/samimujawar/edk2/tree/1829_arm_fw_trng_v2

Sami Mujawar (8):
  MdePkg: Definition for TRNG library class interface
  ArmPkg: PCD to select conduit for monitor calls
  ArmPkg: Add Arm Firmware TRNG library
  MdePkg: Add NULL instance of TRNG Library
  SecurityPkg: Rename RdRandGenerateEntropy to common name
  SecurityPkg: Restructure checks in RngGetInfo
  SecurityPkg: Add RawAlgorithm support using TRNG library
  ArmVirtPkg: Kvmtool: Add RNG support using FW-TRNG interface

 ArmPkg/ArmPkg.dec                                          |   5 +
 ArmPkg/ArmPkg.dsc                                          |   1 +
 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngDefs.h                |  64 +++
 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.c                 | 483 ++++++++++++++++++++
 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.inf               |  34 ++
 ArmVirtPkg/ArmVirtKvmTool.dsc                              |  10 +
 ArmVirtPkg/ArmVirtKvmTool.fdf                              |   5 +
 MdePkg/Include/Library/TrngLib.h                           | 121 +++++
 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.c           | 111 +++++
 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.inf         |  30 ++
 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.uni         |  12 +
 MdePkg/MdePkg.dec                                          |   7 +-
 MdePkg/MdePkg.dsc                                          |   1 +
 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c  |  79 +++-
 SecurityPkg/RandomNumberGenerator/RngDxe/Arm/RngDxe.c      | 163 +++++++
 SecurityPkg/RandomNumberGenerator/RngDxe/ArmTrng.c         |  61 +++
 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.c     |  13 +-
 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h     |  43 --
 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c     |  12 +-
 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.c          |  13 +-
 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf        |  14 +-
 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h |  22 +-
 SecurityPkg/SecurityPkg.dsc                                |   8 +-
 23 files changed, 1239 insertions(+), 73 deletions(-)
 create mode 100644 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngDefs.h
 create mode 100644 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.c
 create mode 100644 ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.inf
 create mode 100644 MdePkg/Include/Library/TrngLib.h
 create mode 100644 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.c
 create mode 100644 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.inf
 create mode 100644 MdePkg/Library/BaseTrngLibNull/BaseTrngLibNull.uni
 create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/Arm/RngDxe.c
 create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/ArmTrng.c
 delete mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h

-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83775): https://edk2.groups.io/g/devel/message/83775
Mute This Topic: https://groups.io/mt/87092731/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-