From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <Pierre.Gondois@arm.com>, <devel@edk2.groups.io>
Cc: "'Sami Mujawar'" <sami.mujawar@arm.com>,
"'Leif Lindholm'" <quic_llindhol@quicinc.com>,
"'Ard Biesheuvel'" <ardb+tianocore@kernel.org>,
"'Rebecca Cran'" <rebecca@bsdio.com>,
"'Michael D Kinney'" <michael.d.kinney@intel.com>,
"'Jiewen Yao'" <jiewen.yao@intel.com>,
"'Jian J Wang'" <jian.j.wang@intel.com>
Subject: 回复: [PATCH v4 00/21] Add Raw algorithm support using Arm FW-TRNG interface
Date: Mon, 25 Jul 2022 12:30:11 +0800 [thread overview]
Message-ID: <002b01d89fdf$3a7466a0$af5d33e0$@byosoft.com.cn> (raw)
In-Reply-To: <20220722143153.913585-1-Pierre.Gondois@arm.com>
Pierre:
The change in MdePkg is good to me. Reviewed-by: Liming Gao
<gaoliming@byosoft.com.cn>
Thanks
Liming
> -----邮件原件-----
> 发件人: Pierre.Gondois@arm.com <Pierre.Gondois@arm.com>
> 发送时间: 2022年7月22日 22:32
> 收件人: devel@edk2.groups.io
> 抄送: Sami Mujawar <sami.mujawar@arm.com>; Leif Lindholm
> <quic_llindhol@quicinc.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>;
> Rebecca Cran <rebecca@bsdio.com>; Michael D Kinney
> <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> Jiewen Yao <jiewen.yao@intel.com>; Jian J Wang <jian.j.wang@intel.com>;
> Pierre Gondois <pierre.gondois@arm.com>
> 主题: [PATCH v4 00/21] Add Raw algorithm support using Arm FW-TRNG
> interface
>
> From: Pierre Gondois <pierre.gondois@arm.com>
>
> 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 patch-set:
> - 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.
>
> This patch-set is based on the v2 from Sami Mujawar:
> [PATCH v2 0/8] Add Raw algorithm support using Arm FW-TRNG interface
> v2:
> https://edk2.groups.io/g/devel/message/83775
> v3:
> https://edk2.groups.io/g/devel/message/90845
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v3
> v4:
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v4
>
> V4:
> - Removed dependencies on ArmPkg and dropped patch:
> [PATCH v3 12/22] SecurityPkg: Update Securitypkg.ci.yaml
> [Jiewen]
> - Use a dynamically allocated array to hold available algorithms.
> The array is freed in a new UNLOAD_IMAGE function and
> allocated in arch specific implementations of
> GetAvailableAlgorithms(), available in AArch64/AArch64Algo.c
> and Arm/ArmAlgo.c.
> - Correctly reference gEfiRngAlgorithmSp80090Ctr256Guid
> Guid by copying its address (add missing '&'). [Jiewen]
> V3:
> - Address Leif's comment (moving definitions, optimizations, ...)
> - Add ArmMonitorLib to choose Hvc/Smc conduit depending on a Pcd.
> - Re-factor some parts of SecurityPkg/RngDxe/ to ease the addition
> of new algorithms.
> - Add ArmHasRngExt() function to check Arm's FEAT_RNG extension.
> V2:
> - 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.
>
> Pierre Gondois (13):
> ArmPkg/ArmMonitorLib: Definition for ArmMonitorLib library class
> ArmPkg/ArmMonitorLib: Add ArmMonitorLib
> ArmPkg/ArmHvcNullLib: Add NULL instance of ArmHvcLib
> MdePkg/BaseRngLib: Rename ArmReadIdIsar0() to ArmGetFeatRng()
> ArmPkg/ArmLib: Add ArmReadIdIsar0() helper
> ArmPkg/ArmLib: Add ArmHasRngExt()
> SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid
> SecurityPkg/RngDxe: Remove ArchGetSupportedRngAlgorithms()
> SecurityPkg/RngDxe: Documentation/include/parameter cleanup
> SecurityPkg/RngDxe: Check before advertising Cpu Rng algo
> SecurityPkg/RngDxe: Add debug warning for NULL
> PcdCpuRngSupportedAlgorithm
> SecurityPkg/RngDxe: Rename AArch64/RngDxe.c
> SecurityPkg/RngDxe: Add Arm support of RngDxe
>
> Sami Mujawar (8):
> ArmPkg: PCD to select conduit for monitor calls
> MdePkg/TrngLib: Definition for TRNG library class interface
> MdePkg/TrngLib: Add NULL instance of TRNG Library
> ArmPkg: Add FID definitions for Firmware TRNG
> ArmPkg/TrngLib: Add Arm Firmware TRNG library
> SecurityPkg/RngDxe: Rename RdRandGenerateEntropy to generic name
> SecurityPkg/RngDxe: Add AArch64 RawAlgorithm support through TrngLib
> ArmVirtPkg: Kvmtool: Add RNG support using FW-TRNG interface
>
> ArmPkg/ArmPkg.dec | 12 +-
> ArmPkg/ArmPkg.dsc | 3 +
> ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 109 ++++-
> ArmPkg/Include/Library/ArmLib.h | 12 +-
> ArmPkg/Include/Library/ArmMonitorLib.h | 42 ++
> ArmPkg/Library/ArmFwTrngLib/ArmFwTrngDefs.h | 50 +++
> ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.c | 403
> ++++++++++++++++++
> ArmPkg/Library/ArmFwTrngLib/ArmFwTrngLib.inf | 29 ++
> ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.c | 29 ++
> .../Library/ArmHvcNullLib/ArmHvcNullLib.inf | 22 +
> ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c | 15 +-
> ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h | 14 +-
> .../Library/ArmLib/AArch64/AArch64Support.S | 7 +-
> ArmPkg/Library/ArmLib/Arm/ArmV7Lib.c | 16 +-
> ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c | 34 ++
> .../Library/ArmMonitorLib/ArmMonitorLib.inf | 29 ++
> ArmVirtPkg/ArmVirtKvmTool.dsc | 10 +
> ArmVirtPkg/ArmVirtKvmTool.fdf | 5 +
> MdePkg/Include/Library/TrngLib.h | 121 ++++++
> .../{ArmReadIdIsar0.S => ArmGetFeatRng.S} | 8 +-
> .../{ArmReadIdIsar0.asm => ArmGetFeatRng.asm} | 8 +-
> MdePkg/Library/BaseRngLib/AArch64/ArmRng.h | 2 +-
> MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 2 +-
> MdePkg/Library/BaseRngLib/BaseRngLib.inf | 4 +-
> .../Library/BaseTrngLibNull/BaseTrngLibNull.c | 135 ++++++
> .../BaseTrngLibNull/BaseTrngLibNull.inf | 30 ++
> .../BaseTrngLibNull/BaseTrngLibNull.uni | 12 +
> MdePkg/MdePkg.dec | 5 +
> MdePkg/MdePkg.dsc | 1 +
> .../RngDxe/AArch64/AArch64Algo.c | 72 ++++
> .../RngDxe/Arm/ArmAlgo.c | 51 +++
> .../RngDxe/{AArch64/RngDxe.c => ArmRngDxe.c} | 81 +++-
> .../RandomNumberGenerator/RngDxe/ArmTrng.c | 71 +++
> .../RngDxe/Rand/RdRand.c | 14 +-
> .../RngDxe/Rand/RdRand.h | 43 --
> .../RngDxe/Rand/RngDxe.c | 62 ++-
> .../RandomNumberGenerator/RngDxe/RngDxe.c | 90 ++--
> .../RandomNumberGenerator/RngDxe/RngDxe.inf | 18 +-
> .../RngDxe/RngDxeInternals.h | 71 +--
> SecurityPkg/SecurityPkg.dsc | 5 +-
> 40 files changed, 1575 insertions(+), 172 deletions(-)
> create mode 100644 ArmPkg/Include/Library/ArmMonitorLib.h
> 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 ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.c
> create mode 100644 ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.inf
> create mode 100644 ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.c
> create mode 100644 ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf
> create mode 100644 MdePkg/Include/Library/TrngLib.h
> rename MdePkg/Library/BaseRngLib/AArch64/{ArmReadIdIsar0.S =>
> ArmGetFeatRng.S} (78%)
> rename MdePkg/Library/BaseRngLib/AArch64/{ArmReadIdIsar0.asm =>
> ArmGetFeatRng.asm} (81%)
> 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/AArch64/AArch64Algo.c
> create mode 100644
> SecurityPkg/RandomNumberGenerator/RngDxe/Arm/ArmAlgo.c
> rename SecurityPkg/RandomNumberGenerator/RngDxe/{AArch64/RngDxe.c
> => ArmRngDxe.c} (64%)
> create mode 100644
> SecurityPkg/RandomNumberGenerator/RngDxe/ArmTrng.c
> delete mode 100644
> SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RdRand.h
>
> --
> 2.25.1
next prev parent reply other threads:[~2022-07-25 4:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 14:31 [PATCH v4 00/21] Add Raw algorithm support using Arm FW-TRNG interface PierreGondois
2022-07-22 14:31 ` [PATCH v4 01/21] ArmPkg: PCD to select conduit for monitor calls PierreGondois
2022-07-22 14:31 ` [PATCH v4 02/21] ArmPkg/ArmMonitorLib: Definition for ArmMonitorLib library class PierreGondois
2022-07-22 14:31 ` [PATCH v4 03/21] ArmPkg/ArmMonitorLib: Add ArmMonitorLib PierreGondois
2022-07-22 14:31 ` [PATCH v4 04/21] ArmPkg/ArmHvcNullLib: Add NULL instance of ArmHvcLib PierreGondois
2022-07-22 14:31 ` [PATCH v4 05/21] MdePkg/TrngLib: Definition for TRNG library class interface PierreGondois
2022-07-26 1:11 ` [edk2-devel] " Yao, Jiewen
2022-07-26 9:52 ` PierreGondois
2022-07-22 14:31 ` [PATCH v4 06/21] MdePkg/TrngLib: Add NULL instance of TRNG Library PierreGondois
2022-07-22 14:31 ` [PATCH v4 07/21] ArmPkg: Add FID definitions for Firmware TRNG PierreGondois
2022-07-22 14:31 ` [PATCH v4 08/21] ArmPkg/TrngLib: Add Arm Firmware TRNG library PierreGondois
2022-07-22 14:31 ` [PATCH v4 09/21] MdePkg/BaseRngLib: Rename ArmReadIdIsar0() to ArmGetFeatRng() PierreGondois
2022-07-22 14:31 ` [PATCH v4 10/21] ArmPkg/ArmLib: Add ArmReadIdIsar0() helper PierreGondois
2022-07-22 14:31 ` [PATCH v4 11/21] ArmPkg/ArmLib: Add ArmHasRngExt() PierreGondois
2022-07-22 14:31 ` [PATCH v4 12/21] SecurityPkg/RngDxe: Rename RdRandGenerateEntropy to generic name PierreGondois
2022-07-22 14:31 ` [PATCH v4 13/21] SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid PierreGondois
2022-07-22 14:31 ` [PATCH v4 14/21] SecurityPkg/RngDxe: Remove ArchGetSupportedRngAlgorithms() PierreGondois
2022-07-22 14:31 ` [PATCH v4 15/21] SecurityPkg/RngDxe: Documentation/include/parameter cleanup PierreGondois
2022-07-22 14:31 ` [PATCH v4 16/21] SecurityPkg/RngDxe: Check before advertising Cpu Rng algo PierreGondois
2022-07-22 14:31 ` [PATCH v4 17/21] SecurityPkg/RngDxe: Add AArch64 RawAlgorithm support through TrngLib PierreGondois
2022-07-22 14:31 ` [PATCH v4 18/21] SecurityPkg/RngDxe: Add debug warning for NULL PcdCpuRngSupportedAlgorithm PierreGondois
2022-07-22 14:31 ` [PATCH v4 19/21] SecurityPkg/RngDxe: Rename AArch64/RngDxe.c PierreGondois
2022-07-22 14:31 ` [PATCH v4 20/21] SecurityPkg/RngDxe: Add Arm support of RngDxe PierreGondois
2022-07-22 14:31 ` [PATCH v4 21/21] ArmVirtPkg: Kvmtool: Add RNG support using FW-TRNG interface PierreGondois
2022-07-25 4:30 ` gaoliming [this message]
2022-08-22 12:41 ` 回复: [PATCH v4 00/21] Add Raw algorithm support using Arm " PierreGondois
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='002b01d89fdf$3a7466a0$af5d33e0$@byosoft.com.cn' \
--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