From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mx.groups.io with SMTP id smtpd.web11.6541.1682512407608388399 for ; Wed, 26 Apr 2023 05:33:28 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@starlabs-systems.20221208.gappssmtp.com header.s=20221208 header.b=j/Z0qEY2; spf=pass (domain: starlabs.systems, ip: 209.85.218.51, mailfrom: sean@starlabs.systems) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-95678d891d6so1269426666b.1 for ; Wed, 26 Apr 2023 05:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starlabs-systems.20221208.gappssmtp.com; s=20221208; t=1682512406; x=1685104406; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=okpZmtYr2lnUNjX6Fq6/JwCE7oOtuynKxZk9ZatVT20=; b=j/Z0qEY2t6Ry3fEPDvHugXdtDwY22N2hiJWlyNbg4vT0aS/12tptwZPh/SXJW5Qm6M FTSsmadA/2j5t9VnLKSYPT0urgMgKLvdrIcwfOkzN5rMcwJHD/+3oN9S6yTEGf1LU876 Pk/61Z2/MfoVcYAKMv/HjkU8YIses/n+8OuaYNkgArruNnPhAK2OpNwYgt8oVFX8i7QP NoVboHBmJDKbCw9XKmtqhw8YjTJjC6AzY6hXWaXi7qlJnl+jqu0W07jpcvknohZly7Ea nzq2fOIA0j4/VF3eCZ1/4zq+AQ2DFmakBoa/TW2V3yC95pVP3hdtuvUe7xPXkXBhEFCQ Zbaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682512406; x=1685104406; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=okpZmtYr2lnUNjX6Fq6/JwCE7oOtuynKxZk9ZatVT20=; b=SiOQ5TOWy0fkspf+4Q0mWlmlekC+Yw9rMiSzrsqGZz4bA2WViVMWz90l1G07g0xApO KVxt2qs0CQvr7e3YydpUg25trkedTmNxzYx5PMTJOJrv6UfcHxfsx5zUCILh/1cCxYmz PEzRPozi9XYYJ+ui/hmRtWd/s7fxYUDYsNRvKytgF2Y2HIquCQ/BfemaFzDH3MrHRy7g R1QowXPqPsJ/iQgwZYLI17szVoBtqwxKVhH8p3qW8x8YLBcPXBZw2+Y0qby2+urbVixZ k6stJAO9onWNPd/oJv/GeEwIsQz2L/Z2eUBSmaLrNQ6lnphhgFpfkXY+1Al/XN32i2mH YoFQ== X-Gm-Message-State: AAQBX9fsRoSBrgvvQ3maSlKZY5gq3yYEzJp86mz/n2dvWxa39tu43n6v JTwCD5t3NpN4NG1e+gOD0/R73TKxzUEchMiC+sP6 X-Google-Smtp-Source: AKy350aByF/xFdMxNXFJnP1ko8jQqEeb+f+1tW0CjBq/dkEs273YsjRR4dfuLPbiYC3nF7qIgRKm8bI3PTUzlKWsxnQ= X-Received: by 2002:a17:906:a191:b0:94e:5708:1564 with SMTP id s17-20020a170906a19100b0094e57081564mr16558685ejy.22.1682512405902; Wed, 26 Apr 2023 05:33:25 -0700 (PDT) MIME-Version: 1.0 References: <7edb8c7baae2fc58034a62f50f5f4000fb5bd102.1682442501.git.benjamin.doron00@gmail.com> In-Reply-To: From: "Sean Rhodes" Date: Wed, 26 Apr 2023 13:33:14 +0100 Message-ID: Subject: Re: [edk2-devel][PATCH v1 2/2] UefiPayloadPkg: Enable RNG support To: Benjamin Doron Cc: devel@edk2.groups.io, Guo Dong , Ray Ni , James Lu , Gua Guo Content-Type: multipart/alternative; boundary="00000000000048ccdd05fa3c7227" --00000000000048ccdd05fa3c7227 Content-Type: text/plain; charset="UTF-8" Reviewed-by: Sean Rhodes On Tue, 25 Apr 2023 at 18:09, Benjamin Doron wrote: > From: Benjamin Doron > > Uses CPU RDRAND support and installs the EfiRngProtocol. > The protocol may be used by iPXE or the Linux kernel to gather entropy. > > Cc: Guo Dong > Cc: Ray Ni > Cc: Sean Rhodes > Cc: James Lu > Cc: Gua Guo > Signed-off-by: Benjamin Doron > --- > UefiPayloadPkg/UefiPayloadPkg.dsc | 3 +++ > UefiPayloadPkg/UefiPayloadPkg.fdf | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc > b/UefiPayloadPkg/UefiPayloadPkg.dsc > index 1e803ba01567..486af2396731 100644 > --- a/UefiPayloadPkg/UefiPayloadPkg.dsc > +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc > @@ -634,6 +634,9 @@ > MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf > !endif > UefiCpuPkg/CpuDxe/CpuDxe.inf > +!if $(CPU_RNG_ENABLE) == TRUE > + SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf > +!endif > MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > !if $(BOOTSPLASH_IMAGE) > MdeModulePkg/Logo/LogoDxe.inf > diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf > b/UefiPayloadPkg/UefiPayloadPkg.fdf > index f8c2aa8c4a02..53add65a6a40 100644 > --- a/UefiPayloadPkg/UefiPayloadPkg.fdf > +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf > @@ -157,6 +157,9 @@ INF CryptoPkg/Driver/CryptoDxe.inf > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf > !endif > INF UefiCpuPkg/CpuDxe/CpuDxe.inf > +!if $(CPU_RNG_ENABLE) == TRUE > +INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf > +!endif > > INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf > INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf > -- > 2.39.2 > > --00000000000048ccdd05fa3c7227 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
=

On Tue, 25 Apr 2023 at 18:09, Benjamin Doron <benjamin.doron00@gmail.com> wrote:
From: Benjamin Doron &l= t;benjami= n.doron@9elements.com>

Uses CPU RDRAND support and installs the EfiRngProtocol.
The protocol may be used by iPXE or the Linux kernel to gather entropy.

Cc: Guo Dong <gu= o.dong@intel.com>
Cc: Ray Ni <ray.ni= @intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <ja= mes.lu@intel.com>
Cc: Gua Guo <gua.= guo@intel.com>
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
---
=C2=A0UefiPayloadPkg/UefiPayloadPkg.dsc | 3 +++
=C2=A0UefiPayloadPkg/UefiPayloadPkg.fdf | 3 +++
=C2=A02 files changed, 6 insertions(+)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc
index 1e803ba01567..486af2396731 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -634,6 +634,9 @@
=C2=A0 =C2=A0MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
=C2=A0!endif
=C2=A0 =C2=A0UefiCpuPkg/CpuDxe/CpuDxe.inf
+!if $(CPU_RNG_ENABLE) =3D=3D TRUE
+=C2=A0 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
+!endif
=C2=A0 =C2=A0MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
=C2=A0!if $(BOOTSPLASH_IMAGE)
=C2=A0 =C2=A0MdeModulePkg/Logo/LogoDxe.inf
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf
index f8c2aa8c4a02..53add65a6a40 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -157,6 +157,9 @@ INF CryptoPkg/Driver/CryptoDxe.inf
=C2=A0INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
=C2=A0!endif
=C2=A0INF UefiCpuPkg/CpuDxe/CpuDxe.inf
+!if $(CPU_RNG_ENABLE) =3D=3D TRUE
+INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
+!endif

=C2=A0INF RuleOverride =3D UI MdeModulePkg/Application/UiApp/UiApp.inf
=C2=A0INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.in= f
--
2.39.2

--00000000000048ccdd05fa3c7227--