public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: 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>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jian J Wang <jian.j.wang@intel.com>
Subject: [PATCH v9 19/19] ArmVirtPkg: Kvmtool: Add RNG support using Arm TRNG interface
Date: Fri, 28 Oct 2022 17:32:59 +0200	[thread overview]
Message-ID: <20221028153259.397445-20-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20221028153259.397445-1-Pierre.Gondois@arm.com>

From: Sami Mujawar <sami.mujawar@arm.com>

Bugzilla: 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668)

The EFI_RNG_PROTOCOL published by RngDxe has been updated to
implement the EFI_RNG_ALGORITHM_RAW using the Arm TRNG interface
to provide access to entropy.

Therefore, enable EFI_RNG_PROTOCOL for the Kvmtool guest/virtual
firmware.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
 ArmVirtPkg/ArmVirtKvmTool.dsc | 10 ++++++++++
 ArmVirtPkg/ArmVirtKvmTool.fdf |  5 +++++
 2 files changed, 15 insertions(+)

diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index c598903b33d2..2ba00bd08ff1 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -81,6 +81,9 @@ [LibraryClasses.common]
   HwInfoParserLib|DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf
   DynamicPlatRepoLib|DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepoLib.inf
 
+  ArmMonitorLib|ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf
+  ArmTrngLib|ArmPkg/Library/ArmTrngLib/ArmTrngLib.inf
+
 [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
   PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
@@ -112,6 +115,8 @@ [PcdsFeatureFlag.common]
   # Use MMIO for accessing RTC controller registers.
   gPcAtChipsetPkgTokenSpaceGuid.PcdRtcUseMmio|TRUE
 
+  gArmTokenSpaceGuid.PcdMonitorConduitHvc|TRUE
+
 [PcdsFixedAtBuild.common]
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
 
@@ -362,6 +367,11 @@ [Components.common]
   OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
   OvmfPkg/Virtio10Dxe/Virtio10.inf
 
+  #
+  # Rng Support
+  #
+  SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
+
 !if $(ARCH) == AARCH64
   #
   # ACPI Support
diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf
index b696bffc7ccb..82aff47673cb 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.fdf
+++ b/ArmVirtPkg/ArmVirtKvmTool.fdf
@@ -224,6 +224,11 @@ [FV.FvMain]
   #
   INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf
 
+  #
+  # Rng Support
+  #
+  INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
+
 [FV.FVMAIN_COMPACT]
 FvAlignment        = 16
 ERASE_POLARITY     = 1
-- 
2.25.1


  parent reply	other threads:[~2022-10-28 15:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 15:32 [PATCH v9 00/19] Add Raw algorithm support using Arm TRNG interface PierreGondois
2022-10-28 15:32 ` [PATCH v9 01/19] ArmPkg: PCD to select conduit for monitor calls PierreGondois
2022-10-28 15:32 ` [PATCH v9 02/19] ArmPkg/ArmMonitorLib: Definition for ArmMonitorLib library class PierreGondois
2022-10-28 15:32 ` [PATCH v9 03/19] ArmPkg/ArmMonitorLib: Add ArmMonitorLib PierreGondois
2022-10-28 15:32 ` [PATCH v9 04/19] ArmPkg: Sort HVC/SMC section alphbetically in ArmPkg.dsc PierreGondois
2022-10-28 15:32 ` [PATCH v9 05/19] ArmPkg/ArmHvcLibNull: Add NULL instance of ArmHvcLib PierreGondois
2022-10-28 15:32 ` [PATCH v9 06/19] MdePkg/ArmTrngLib: Definition for Arm TRNG library class interface PierreGondois
2022-10-28 15:32 ` [PATCH v9 07/19] MdePkg/ArmTrngLib: Add NULL instance of Arm TRNG Library PierreGondois
2022-10-28 15:32 ` [PATCH v9 08/19] ArmPkg: Add FID definitions for Arm TRNG PierreGondois
2022-10-28 15:32 ` [PATCH v9 09/19] ArmPkg/ArmTrngLib: Add Arm TRNG library PierreGondois
2022-10-28 15:32 ` [PATCH v9 10/19] SecurityPkg/RngDxe: Rename RdRandGenerateEntropy to generic name PierreGondois
2022-10-28 15:32 ` [PATCH v9 11/19] SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid PierreGondois
2022-10-28 15:32 ` [PATCH v9 12/19] SecurityPkg/RngDxe: Remove ArchGetSupportedRngAlgorithms() PierreGondois
2022-10-28 15:32 ` [PATCH v9 13/19] SecurityPkg/RngDxe: Documentation/include/parameter cleanup PierreGondois
2022-10-28 15:32 ` [PATCH v9 14/19] SecurityPkg/RngDxe: Check before advertising Cpu Rng algo PierreGondois
2022-10-28 15:32 ` [PATCH v9 15/19] SecurityPkg/RngDxe: Add AArch64 RawAlgorithm support through ArmTrngLib PierreGondois
2022-10-28 15:32 ` [PATCH v9 16/19] SecurityPkg/RngDxe: Add debug warning for NULL PcdCpuRngSupportedAlgorithm PierreGondois
2022-10-28 15:32 ` [PATCH v9 17/19] SecurityPkg/RngDxe: Rename AArch64/RngDxe.c PierreGondois
2022-10-28 15:32 ` [PATCH v9 18/19] SecurityPkg/RngDxe: Add Arm support of RngDxe PierreGondois
2022-10-28 15:32 ` PierreGondois [this message]
2022-11-01  1:10 ` 回复: [PATCH v9 00/19] Add Raw algorithm support using Arm TRNG interface gaoliming
2022-11-01  8:55 ` Yao, Jiewen
2022-11-04  1:16   ` 回复: " gaoliming
2022-11-04 17:34     ` [edk2-devel] " Ard Biesheuvel
2022-11-06 16:57       ` Ard Biesheuvel

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=20221028153259.397445-20-Pierre.Gondois@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