public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Zhiguang Liu <zhiguang.liu@intel.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jian J Wang <jian.j.wang@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Sami Mujawar <sami.mujawar@arm.com>, Kun Qin <kuqin12@gmail.com>
Subject: [edk2-devel] [PATCH v6 3/9] SecurityPkg/SecurityPkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg
Date: Fri, 11 Aug 2023 16:33:04 +0200	[thread overview]
Message-ID: <20230811143310.55101-4-pierre.gondois@arm.com> (raw)
In-Reply-To: <20230811143310.55101-1-pierre.gondois@arm.com>

From: Pierre Gondois <pierre.gondois@arm.com>

In order to use PcdCpuRngSupportedAlgorithm in the MdePkg in a
following patch and to avoid making the MdePkg dependent on another
package, move PcdCpuRngSupportedAlgorithm to the MdePkg.

As the Pcd is only used for AARCH64, place it in an AARCH64
specific sections.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Tested-by: Kun Qin <kun.qin@microsoft.com>
---
 .../Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf        | 2 +-
 MdePkg/MdePkg.dec                                            | 5 +++++
 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf          | 4 ++--
 SecurityPkg/SecurityPkg.dec                                  | 2 --
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf b/MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
index f857290e823b..f7290010604f 100644
--- a/MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
+++ b/MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
@@ -19,7 +19,7 @@ [Defines]
   INF_VERSION                    = 1.27
   BASE_NAME                      = BaseRngLibTimerLib
   MODULE_UNI_FILE                = BaseRngLibTimerLib.uni
-  FILE_GUID                      = 74950C45-10FC-4AB5-B114-49C87C17409B
+  FILE_GUID                      = B3E66B05-D218-4B9A-AC33-EF0F83D6A513
   MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
   LIBRARY_CLASS                  = RngLib
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index b85614992b94..5b8477f4cb8f 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -2393,6 +2393,11 @@ [PcdsFixedAtBuild,PcdsPatchableInModule]
   # @Prompt Time-out for a response, internal
   gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryIntervalMicrosecond|60000|UINT32|0x00000036
 
+[PcdsFixedAtBuild.AARCH64, PcdsPatchableInModule.AARCH64]
+  ## GUID identifying the Rng algorithm implemented by CPU instruction.
+  # @Prompt CPU Rng algorithm's GUID.
+  gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm|{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}|VOID*|0x00000037
+
 [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
   ## This value is used to set the base address of PCI express hierarchy.
   # @Prompt PCI Express Base Address.
diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
index c8e0ee4ae5d9..d6c2d30195bf 100644
--- a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
+++ b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
@@ -79,8 +79,8 @@ [Guids]
 [Protocols]
   gEfiRngProtocolGuid                ## PRODUCES
 
-[Pcd]
-  gEfiSecurityPkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm      ## CONSUMES
+[Pcd.AARCH64]
+  gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm      ## CONSUMES
 
 [Depex]
   TRUE
diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
index 53aa7ec43557..00c4ebdbed59 100644
--- a/SecurityPkg/SecurityPkg.dec
+++ b/SecurityPkg/SecurityPkg.dec
@@ -325,8 +325,6 @@ [PcdsFixedAtBuild, PcdsPatchableInModule]
   gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeFvVerificationPass|0x0303100A|UINT32|0x00010030
   gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeFvVerificationFail|0x0303100B|UINT32|0x00010031
 
-  gEfiSecurityPkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm|{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}|VOID*|0x00010032
-
 [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
   ## Image verification policy for OptionRom. Only following values are valid:<BR><BR>
   #  NOTE: Do NOT use 0x5 and 0x2 since it violates the UEFI specification and has been removed.<BR>
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107712): https://edk2.groups.io/g/devel/message/107712
Mute This Topic: https://groups.io/mt/100684685/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  parent reply	other threads:[~2023-08-11 14:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 14:33 [edk2-devel] [PATCH v6 0/9] SecurityPkg/MdePkg: Update RngLib GUID identification PierreGondois
2023-08-11 14:33 ` [edk2-devel] [PATCH v6 1/9] MdeModulePkg: Duplicate BaseRngLibTimerLib to MdeModulePkg PierreGondois
2023-08-11 14:33 ` [edk2-devel] [PATCH v6 2/9] MdePkg: Add deprecated warning to BaseRngLibTimer PierreGondois
2023-08-11 14:33 ` PierreGondois [this message]
2023-08-11 14:33 ` [edk2-devel] [PATCH v6 4/9] MdePkg/DxeRngLib: Request raw algorithm instead of default PierreGondois
2023-08-11 14:33 ` [edk2-devel] [PATCH v6 5/9] MdePkg/Rng: Add GUID to describe Arm Rndr Rng algorithms PierreGondois
2023-08-11 14:33 ` [edk2-devel] [PATCH v6 6/9] MdeModulePkg/Rng: Add GUID to describe unsafe " PierreGondois
2023-08-11 14:33 ` [edk2-devel] [PATCH v6 7/9] MdePkg/Rng: Add GetRngGuid() to RngLib PierreGondois
2023-08-11 14:33 ` [edk2-devel] [PATCH v6 8/9] SecurityPkg/RngDxe: Use GetRngGuid() when probing RngLib PierreGondois
2023-08-11 14:33 ` [edk2-devel] [PATCH v6 9/9] SecurityPkg/RngDxe: Simplify Rng algorithm selection for 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=20230811143310.55101-4-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