mirror of https://github.com/acidanthera/audk.git
SecurityPkg: Remove mZeroGuid definition in DxeTpmMeasureBootLib
MdeModulePkg has defined gZeroGuid in 'Guid/ZeroGuid.h', therefore, the mZeroGuid defined in DxeTpmMeasureBootLib 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@17844 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2cca779652
commit
dd4c164c81
|
@ -34,6 +34,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Protocol/FirmwareVolumeBlock.h>
|
#include <Protocol/FirmwareVolumeBlock.h>
|
||||||
|
|
||||||
#include <Guid/MeasuredFvHob.h>
|
#include <Guid/MeasuredFvHob.h>
|
||||||
|
#include <Guid/ZeroGuid.h>
|
||||||
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
|
@ -50,7 +51,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
// Flag to check GPT partition. It only need be measured once.
|
// Flag to check GPT partition. It only need be measured once.
|
||||||
//
|
//
|
||||||
BOOLEAN mMeasureGptTableFlag = FALSE;
|
BOOLEAN mMeasureGptTableFlag = FALSE;
|
||||||
EFI_GUID mZeroGuid = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
|
|
||||||
UINTN mMeasureGptCount = 0;
|
UINTN mMeasureGptCount = 0;
|
||||||
VOID *mFileBuffer;
|
VOID *mFileBuffer;
|
||||||
UINTN mImageSize;
|
UINTN mImageSize;
|
||||||
|
@ -202,7 +202,7 @@ TcgMeasureGptTable (
|
||||||
PartitionEntry = (EFI_PARTITION_ENTRY *)EntryPtr;
|
PartitionEntry = (EFI_PARTITION_ENTRY *)EntryPtr;
|
||||||
NumberOfPartition = 0;
|
NumberOfPartition = 0;
|
||||||
for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
|
for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
|
||||||
if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &mZeroGuid)) {
|
if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &gZeroGuid)) {
|
||||||
NumberOfPartition++;
|
NumberOfPartition++;
|
||||||
}
|
}
|
||||||
PartitionEntry = (EFI_PARTITION_ENTRY *)((UINT8 *)PartitionEntry + PrimaryHeader->SizeOfPartitionEntry);
|
PartitionEntry = (EFI_PARTITION_ENTRY *)((UINT8 *)PartitionEntry + PrimaryHeader->SizeOfPartitionEntry);
|
||||||
|
@ -236,7 +236,7 @@ TcgMeasureGptTable (
|
||||||
PartitionEntry = (EFI_PARTITION_ENTRY*)EntryPtr;
|
PartitionEntry = (EFI_PARTITION_ENTRY*)EntryPtr;
|
||||||
NumberOfPartition = 0;
|
NumberOfPartition = 0;
|
||||||
for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
|
for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {
|
||||||
if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &mZeroGuid)) {
|
if (!CompareGuid (&PartitionEntry->PartitionTypeGUID, &gZeroGuid)) {
|
||||||
CopyMem (
|
CopyMem (
|
||||||
(UINT8 *)&GptData->Partitions + NumberOfPartition * PrimaryHeader->SizeOfPartitionEntry,
|
(UINT8 *)&GptData->Partitions + NumberOfPartition * PrimaryHeader->SizeOfPartitionEntry,
|
||||||
(UINT8 *)PartitionEntry,
|
(UINT8 *)PartitionEntry,
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# This external input must be validated carefully to avoid security issues such
|
# This external input must be validated carefully to avoid security issues such
|
||||||
# as buffer overflow or integer overflow.
|
# as buffer overflow or integer overflow.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -58,6 +58,7 @@
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gMeasuredFvHobGuid ## SOMETIMES_CONSUMES ## HOB
|
gMeasuredFvHobGuid ## SOMETIMES_CONSUMES ## HOB
|
||||||
|
gZeroGuid ## SOMETIMES_CONSUMES ## GUID
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES
|
gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES
|
||||||
|
|
Loading…
Reference in New Issue