]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c
SecurityPkg: Use IsZeroGuid API for zero GUID checking
[mirror_edk2.git] / SecurityPkg / Library / DxeTpm2MeasureBootLib / DxeTpm2MeasureBootLib.c
index 26bf6fb0008656ddd51e4bf987437ba107b06c6b..aacafa83b3498964d5d208a443a9e5f2516b239d 100644 (file)
@@ -15,7 +15,8 @@
   Tcg2MeasureGptTable() function will receive untrusted GPT partition table, and parse\r
   partition data carefully.\r
 \r
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials \r
 are licensed and made available under the terms and conditions of the BSD License \r
 which accompanies this distribution.  The full text of the license may be found at \r
@@ -35,7 +36,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/FirmwareVolumeBlock.h>\r
 \r
 #include <Guid/MeasuredFvHob.h>\r
-#include <Guid/ZeroGuid.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -201,7 +201,7 @@ Tcg2MeasureGptTable (
   PartitionEntry    = (EFI_PARTITION_ENTRY *)EntryPtr;\r
   NumberOfPartition = 0;\r
   for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {\r
-    if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &gZeroGuid)) {\r
+    if (!IsZeroGuid (&PartitionEntry->PartitionTypeGUID)) {\r
       NumberOfPartition++;  \r
     }\r
     PartitionEntry = (EFI_PARTITION_ENTRY *)((UINT8 *)PartitionEntry + PrimaryHeader->SizeOfPartitionEntry);\r
@@ -237,7 +237,7 @@ Tcg2MeasureGptTable (
   PartitionEntry    = (EFI_PARTITION_ENTRY*)EntryPtr;\r
   NumberOfPartition = 0;\r
   for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {\r
-    if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &gZeroGuid)) {\r
+    if (!IsZeroGuid (&PartitionEntry->PartitionTypeGUID)) {\r
       CopyMem (\r
         (UINT8 *)&GptData->Partitions + NumberOfPartition * PrimaryHeader->SizeOfPartitionEntry,\r
         (UINT8 *)PartitionEntry,\r
@@ -447,7 +447,7 @@ DxeTpm2MeasureBootHandler (
     // Tcg2 protocol is not installed. So, TPM2 is not present.\r
     // Don't do any measurement, and directly return EFI_SUCCESS.\r
     //\r
-    DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - Tcg2 - %r\n", Status));\r
+    DEBUG ((EFI_D_VERBOSE, "DxeTpm2MeasureBootHandler - Tcg2 - %r\n", Status));\r
     return EFI_SUCCESS;\r
   }\r
 \r