public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
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 v1 4/9] MdePkg: Add definition for NULL GUID
Date: Thu, 30 Sep 2021 16:40:39 +0100	[thread overview]
Message-ID: <20210930154044.37336-5-sami.mujawar@arm.com> (raw)
In-Reply-To: <20210930154044.37336-1-sami.mujawar@arm.com>

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

Some PCDs e.g. PcdCpuRngSupportedAlgorithm are defined as GUIDs and
may be initialised as NULL (all zeros) by default. Therefore, define
a NULL GUID (128 bit zeros), so that it can be used for comparison
using CompareGuid().

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---
 MdePkg/Include/Guid/NullGuid.h | 21 ++++++++++++++++++++
 MdePkg/MdePkg.dec              |  6 ++++++
 2 files changed, 27 insertions(+)

diff --git a/MdePkg/Include/Guid/NullGuid.h b/MdePkg/Include/Guid/NullGuid.h
new file mode 100644
index 0000000000000000000000000000000000000000..e44a92c7863f0573ce10d6d98e4a67e3d63f5743
--- /dev/null
+++ b/MdePkg/Include/Guid/NullGuid.h
@@ -0,0 +1,21 @@
+/** @file
+  Definition of a NULL GUID.
+
+  Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef NULL_GUID_H_
+#define NULL_GUID_H_
+
+// {00000000-0000-0000-0000-000000000000}
+#define NULL_GUID \
+  { \
+    0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } \
+  }
+
+extern EFI_GUID gNullGuid;
+
+#endif // NULL_GUID_H_
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 492c3c3fd83e632dbf902bd8093b7d5e62597433..dcdccf2b68b58536b84f1c360ef048ca8f2f1690 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -828,6 +828,12 @@ [Guids]
   #
   gLinuxEfiInitrdMediaGuid       = {0x5568e427, 0x68fc, 0x4f3d, {0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}}
 
+  #
+  # Definition of a NULL GUID
+  #
+  ## Include/Guid/NullGuid.h
+  gNullGuid = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}
+
 [Guids.IA32, Guids.X64]
   ## Include/Guid/Cper.h
   gEfiIa32X64ErrorTypeCacheCheckGuid = { 0xA55701F5, 0xE3EF, 0x43de, { 0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C }}
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


  parent reply	other threads:[~2021-09-30 15:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 15:40 [PATCH v1 0/9] Add Raw algorithm support using Arm FW-TRNG interface Sami Mujawar
2021-09-30 15:40 ` [PATCH v1 1/9] MdePkg: Definition for TRNG library class interface Sami Mujawar
2021-09-30 15:40 ` [PATCH v1 2/9] ArmPkg: PCD to select conduit for monitor calls Sami Mujawar
2021-09-30 15:40 ` [PATCH v1 3/9] ArmPkg: Add Arm Firmware TRNG library Sami Mujawar
2021-09-30 15:40 ` Sami Mujawar [this message]
2021-09-30 15:40 ` [PATCH v1 5/9] MdePkg: Add NULL instance of TRNG Library Sami Mujawar
2021-09-30 15:40 ` [PATCH v1 6/9] SecurityPkg: Rename RdRandGenerateEntropy to common name Sami Mujawar
2021-09-30 15:40 ` [PATCH v1 7/9] SecurityPkg: Restructure checks in RngGetInfo Sami Mujawar
2021-09-30 15:40 ` [PATCH v1 8/9] SecurityPkg: Add RawAlgorithm support using TRNG library Sami Mujawar
2021-09-30 15:40 ` [PATCH v1 9/9] ArmVirtPkg: Kvmtool: Add RNG support using FW-TRNG interface Sami Mujawar
2021-10-01 17:47   ` [edk2-devel] " Joey Gouly
2021-10-08  5:35 ` 回复: [PATCH v1 0/9] Add Raw algorithm support using Arm " gaoliming

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=20210930154044.37336-5-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