summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Library/DxeTpm2MeasureBootLib
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2015-07-07 03:03:49 +0000
committerhwu1225 <hwu1225@Edk2>2015-07-07 03:03:49 +0000
commit2cca779652a487fdfdbe0323a11f987f21c4be70 (patch)
tree34046fe7ceee5c768da8eb110ae5e312129b2775 /SecurityPkg/Library/DxeTpm2MeasureBootLib
parent532d26a002149ac849c2583572ac55a8c3f191f0 (diff)
downloadedk2-2cca779652a487fdfdbe0323a11f987f21c4be70.tar.gz
edk2-2cca779652a487fdfdbe0323a11f987f21c4be70.tar.bz2
edk2-2cca779652a487fdfdbe0323a11f987f21c4be70.zip
SecurityPkg: Remove mTrEEZeroGuid definition in DxeTpm2MeasureBootLib
MdeModulePkg has defined gZeroGuid in 'Guid/ZeroGuid.h', therefore, the mTrEEZeroGuid defined in DxeTpm2MeasureBootLib is redundant. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17843 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/Library/DxeTpm2MeasureBootLib')
-rw-r--r--SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c6
-rw-r--r--SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf3
2 files changed, 5 insertions, 4 deletions
diff --git a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c
index ed53b7e003..2f752196a9 100644
--- a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c
+++ b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c
@@ -35,6 +35,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/FirmwareVolumeBlock.h>
#include <Guid/MeasuredFvHob.h>
+#include <Guid/ZeroGuid.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
@@ -51,7 +52,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// Flag to check GPT partition. It only need be measured once.
//
BOOLEAN mTrEEMeasureGptTableFlag = FALSE;
-EFI_GUID mTrEEZeroGuid = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
UINTN mTrEEMeasureGptCount = 0;
VOID *mTrEEFileBuffer;
UINTN mTrEEImageSize;
@@ -201,7 +201,7 @@ TrEEMeasureGptTable (
PartitionEntry = (EFI_PARTITION_ENTRY *)EntryPtr;
NumberOfPartition = 0;
for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
- if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &mTrEEZeroGuid)) {
+ if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &gZeroGuid)) {
NumberOfPartition++;
}
PartitionEntry = (EFI_PARTITION_ENTRY *)((UINT8 *)PartitionEntry + PrimaryHeader->SizeOfPartitionEntry);
@@ -237,7 +237,7 @@ TrEEMeasureGptTable (
PartitionEntry = (EFI_PARTITION_ENTRY*)EntryPtr;
NumberOfPartition = 0;
for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
- if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &mTrEEZeroGuid)) {
+ if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &gZeroGuid)) {
CopyMem (
(UINT8 *)&GptData->Partitions + NumberOfPartition * PrimaryHeader->SizeOfPartitionEntry,
(UINT8 *)PartitionEntry,
diff --git a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf
index c007d7cf5d..14bf190317 100644
--- a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf
+++ b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf
@@ -9,7 +9,7 @@
# This external input must be validated carefully to avoid security issues such
# as buffer overflow or integer overflow.
#
-# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -58,6 +58,7 @@
[Guids]
gMeasuredFvHobGuid ## SOMETIMES_CONSUMES ## HOB
+ gZeroGuid ## SOMETIMES_CONSUMES ## GUID
[Protocols]
gEfiTrEEProtocolGuid ## SOMETIMES_CONSUMES