From: "Sami Mujawar" <sami.mujawar@arm.com>
To: <devel@edk2.groups.io>
Cc: Sami Mujawar <sami.mujawar@arm.com>, <ardb+tianocore@kernel.org>,
<leif@nuviainc.com>, <rebecca@bsdio.com>, <kraxel@redhat.com>,
<michael.d.kinney@intel.com>, <gaoliming@byosoft.com.cn>,
<zhiguang.liu@intel.com>, <jiewen.yao@intel.com>,
<jian.j.wang@intel.com>, <Matteo.Carlini@arm.com>,
<Akanksha.Jain2@arm.com>, <Ben.Adderson@arm.com>, <nd@arm.com>
Subject: [PATCH v2 0/8] Add Raw algorithm support using Arm FW-TRNG interface
Date: Tue, 16 Nov 2021 11:32:52 +0000 [thread overview]
Message-ID: <20211116113301.31088-1-sami.mujawar@arm.com> (raw)
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)'
next reply other threads:[~2021-11-16 11:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 11:32 Sami Mujawar [this message]
2021-11-16 11:32 ` [PATCH v2 1/8] MdePkg: Definition for TRNG library class interface Sami Mujawar
2021-11-16 11:32 ` [PATCH v2 2/8] ArmPkg: PCD to select conduit for monitor calls Sami Mujawar
2021-11-24 12:07 ` Leif Lindholm
2021-11-24 13:03 ` Ard Biesheuvel
2021-11-24 13:05 ` Leif Lindholm
2021-11-24 13:07 ` Ard Biesheuvel
2021-11-24 13:25 ` Leif Lindholm
2021-11-16 11:32 ` [PATCH v2 3/8] ArmPkg: Add Arm Firmware TRNG library Sami Mujawar
2021-11-24 13:01 ` [edk2-devel] " Leif Lindholm
2021-11-25 15:23 ` Sami Mujawar
2022-03-24 9:46 ` PierreGondois
[not found] ` <80941d66-5d31-053f-388a-95efe5dbbfdf@arm.com>
2022-03-24 14:56 ` PierreGondois
2022-03-24 18:12 ` Leif Lindholm
2021-11-16 11:32 ` [PATCH v2 4/8] MdePkg: Add NULL instance of TRNG Library Sami Mujawar
2021-11-16 11:32 ` [PATCH v2 5/8] SecurityPkg: Rename RdRandGenerateEntropy to common name Sami Mujawar
2021-11-16 11:32 ` [PATCH v2 6/8] SecurityPkg: Restructure checks in RngGetInfo Sami Mujawar
2021-11-16 11:32 ` [PATCH v2 7/8] SecurityPkg: Add RawAlgorithm support using TRNG library Sami Mujawar
2021-11-16 11:33 ` [PATCH v2 8/8] ArmVirtPkg: Kvmtool: Add RNG support using FW-TRNG interface Sami Mujawar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211116113301.31088-1-sami.mujawar@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox