summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dc21099)
Instead of comparing a GUID with gZeroGuid via the CompareGuid API, the
commit uses the IsZeroGuid API to check if the given GUID is a zero GUID.
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@Intel.com>
17 files changed:
#include <Protocol/SmmCommunication.h>\r
#include <Protocol/SmmAccess2.h>\r
\r
#include <Protocol/SmmCommunication.h>\r
#include <Protocol/SmmAccess2.h>\r
\r
-#include <Guid/ZeroGuid.h>\r
#include <Guid/MemoryProfile.h>\r
#include <Guid/PiSmmCommunicationRegionTable.h>\r
\r
#include <Guid/MemoryProfile.h>\r
#include <Guid/PiSmmCommunicationRegionTable.h>\r
\r
return mNameString;\r
}\r
\r
return mNameString;\r
}\r
\r
- if (!CompareGuid (&DriverInfo->FileName, &gZeroGuid)) {\r
+ if (!IsZeroGuid (&DriverInfo->FileName)) {\r
//\r
// Try to get the image's FFS UI section by image GUID\r
//\r
//\r
// Try to get the image's FFS UI section by image GUID\r
//\r
## SOMETIMES_CONSUMES ## GUID # Locate protocol\r
## SOMETIMES_CONSUMES ## GUID # SmiHandlerRegister\r
gEdkiiMemoryProfileGuid\r
## SOMETIMES_CONSUMES ## GUID # Locate protocol\r
## SOMETIMES_CONSUMES ## GUID # SmiHandlerRegister\r
gEdkiiMemoryProfileGuid\r
- gZeroGuid ## SOMETIMES_CONSUMES ## GUID\r
gEdkiiPiSmmCommunicationRegionTableGuid ## SOMETIMES_CONSUMES ## SystemTable\r
\r
[Protocols]\r
gEdkiiPiSmmCommunicationRegionTableGuid ## SOMETIMES_CONSUMES ## SystemTable\r
\r
[Protocols]\r
#include <Guid/IdleLoopEvent.h>\r
#include <Guid/VectorHandoffTable.h>\r
#include <Ppi/VectorHandoffInfo.h>\r
#include <Guid/IdleLoopEvent.h>\r
#include <Guid/VectorHandoffTable.h>\r
#include <Ppi/VectorHandoffInfo.h>\r
-#include <Guid/ZeroGuid.h>\r
#include <Guid/MemoryProfile.h>\r
\r
#include <Library/DxeCoreEntryPoint.h>\r
#include <Guid/MemoryProfile.h>\r
\r
#include <Library/DxeCoreEntryPoint.h>\r
gEventExitBootServicesFailedGuid ## SOMETIMES_PRODUCES ## Event\r
gEfiVectorHandoffTableGuid ## SOMETIMES_PRODUCES ## SystemTable\r
gEdkiiMemoryProfileGuid ## SOMETIMES_PRODUCES ## GUID # Install protocol\r
gEventExitBootServicesFailedGuid ## SOMETIMES_PRODUCES ## Event\r
gEfiVectorHandoffTableGuid ## SOMETIMES_PRODUCES ## SystemTable\r
gEdkiiMemoryProfileGuid ## SOMETIMES_PRODUCES ## GUID # Install protocol\r
- gZeroGuid ## SOMETIMES_CONSUMES ## GUID\r
gEfiPropertiesTableGuid ## SOMETIMES_PRODUCES ## SystemTable\r
gEfiMemoryAttributesTableGuid ## SOMETIMES_PRODUCES ## SystemTable\r
gEfiEndOfDxeEventGroupGuid ## SOMETIMES_CONSUMES ## Event\r
gEfiPropertiesTableGuid ## SOMETIMES_PRODUCES ## SystemTable\r
gEfiMemoryAttributesTableGuid ## SOMETIMES_PRODUCES ## SystemTable\r
gEfiEndOfDxeEventGroupGuid ## SOMETIMES_CONSUMES ## Event\r
#include <Guid/Apriori.h>\r
#include <Guid/EventGroup.h>\r
#include <Guid/EventLegacyBios.h>\r
#include <Guid/Apriori.h>\r
#include <Guid/EventGroup.h>\r
#include <Guid/EventLegacyBios.h>\r
-#include <Guid/ZeroGuid.h>\r
#include <Guid/MemoryProfile.h>\r
\r
#include <Library/BaseLib.h>\r
#include <Guid/MemoryProfile.h>\r
\r
#include <Library/BaseLib.h>\r
gEdkiiMemoryProfileGuid\r
## SOMETIMES_PRODUCES ## GUID # Install protocol\r
gEdkiiSmmMemoryProfileGuid\r
gEdkiiMemoryProfileGuid\r
## SOMETIMES_PRODUCES ## GUID # Install protocol\r
gEdkiiSmmMemoryProfileGuid\r
- gZeroGuid ## SOMETIMES_CONSUMES ## GUID\r
\r
[UserExtensions.TianoCore."ExtraFiles"]\r
PiSmmCoreExtra.uni\r
\r
[UserExtensions.TianoCore."ExtraFiles"]\r
PiSmmCoreExtra.uni\r
/** @file\r
Library functions which relates with driver health.\r
\r
/** @file\r
Library functions which relates with driver health.\r
\r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
//\r
// Configure PcdDriverHealthConfigureForm to ZeroGuid to disable driver health check.\r
//\r
//\r
// Configure PcdDriverHealthConfigureForm to ZeroGuid to disable driver health check.\r
//\r
- if (CompareGuid (PcdGetPtr (PcdDriverHealthConfigureForm), &gZeroGuid)) {\r
+ if (IsZeroGuid (PcdGetPtr (PcdDriverHealthConfigureForm))) {\r
#include <Protocol/VariableLock.h>\r
#include <Protocol/RamDisk.h>\r
\r
#include <Protocol/VariableLock.h>\r
#include <Protocol/RamDisk.h>\r
\r
-#include <Guid/ZeroGuid.h>\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Guid/FileInfo.h>\r
#include <Guid/GlobalVariable.h>\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Guid/FileInfo.h>\r
#include <Guid/GlobalVariable.h>\r
gEfiDiskInfoAhciInterfaceGuid ## SOMETIMES_CONSUMES ## GUID\r
gEfiDiskInfoIdeInterfaceGuid ## SOMETIMES_CONSUMES ## GUID\r
gEfiDiskInfoScsiInterfaceGuid ## SOMETIMES_CONSUMES ## GUID\r
gEfiDiskInfoAhciInterfaceGuid ## SOMETIMES_CONSUMES ## GUID\r
gEfiDiskInfoIdeInterfaceGuid ## SOMETIMES_CONSUMES ## GUID\r
gEfiDiskInfoScsiInterfaceGuid ## SOMETIMES_CONSUMES ## GUID\r
- gZeroGuid ## CONSUMES ## GUID\r
\r
[Protocols]\r
gEfiPciRootBridgeIoProtocolGuid ## CONSUMES\r
\r
[Protocols]\r
gEfiPciRootBridgeIoProtocolGuid ## CONSUMES\r
/** @file\r
Include file for Var Check Hii handler and bin.\r
\r
/** @file\r
Include file for Var Check Hii handler and bin.\r
\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<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
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
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
\r
-#include <Guid/ZeroGuid.h>\r
-\r
#include <Protocol/HiiDatabase.h>\r
#include <Protocol/FirmwareVolume2.h>\r
#include <Protocol/FirmwareVolumeBlock.h>\r
#include <Protocol/HiiDatabase.h>\r
#include <Protocol/FirmwareVolume2.h>\r
#include <Protocol/FirmwareVolumeBlock.h>\r
/** @file\r
Var Check Hii generation from FV.\r
\r
/** @file\r
Var Check Hii generation from FV.\r
\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<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
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
UINTN Index;\r
VAR_CHECK_VFR_DRIVER_INFO *VfrDriverInfo;\r
\r
UINTN Index;\r
VAR_CHECK_VFR_DRIVER_INFO *VfrDriverInfo;\r
\r
- for (Index = 0; !CompareGuid (&DriverGuidArray[Index], &gZeroGuid); Index++) {\r
+ for (Index = 0; !IsZeroGuid (&DriverGuidArray[Index]); Index++) {\r
DEBUG ((EFI_D_INFO, "CreateVfrDriverList: %g\n", &DriverGuidArray[Index]));\r
VfrDriverInfo = InternalVarCheckAllocateZeroPool (sizeof (*VfrDriverInfo));\r
ASSERT (VfrDriverInfo != NULL);\r
DEBUG ((EFI_D_INFO, "CreateVfrDriverList: %g\n", &DriverGuidArray[Index]));\r
VfrDriverInfo = InternalVarCheckAllocateZeroPool (sizeof (*VfrDriverInfo));\r
ASSERT (VfrDriverInfo != NULL);\r
//\r
DriverGuidArray = (EFI_GUID *) PcdGetPtr (PcdVarCheckVfrDriverGuidArray);\r
\r
//\r
DriverGuidArray = (EFI_GUID *) PcdGetPtr (PcdVarCheckVfrDriverGuidArray);\r
\r
- if (CompareGuid (&DriverGuidArray[0], &gZeroGuid)) {\r
+ if (IsZeroGuid (&DriverGuidArray[0])) {\r
//\r
// No VFR driver will be parsed from FVs.\r
//\r
//\r
// No VFR driver will be parsed from FVs.\r
//\r
PcdLib\r
VarCheckLib\r
\r
PcdLib\r
VarCheckLib\r
\r
-[Guids]\r
- gZeroGuid ## SOMETIMES_CONSUMES ## GUID\r
-\r
[Protocols]\r
gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMES\r
gEfiFirmwareVolumeBlock2ProtocolGuid ## SOMETIMES_CONSUMES\r
[Protocols]\r
gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMES\r
gEfiFirmwareVolumeBlock2ProtocolGuid ## SOMETIMES_CONSUMES\r
if (StrPtr != NULL) {\r
FreePool (StrPtr);\r
}\r
if (StrPtr != NULL) {\r
FreePool (StrPtr);\r
}\r
- } else if (CompareGuid (&OpCode->Guid, &gZeroGuid) != 0) {\r
+ } else if (IsZeroGuid (&OpCode->Guid)) {\r
if (!GetQuestionValueFromForm(NULL, FormSet->HiiHandle, &OpCode->Guid, Value->Value.u16, &QuestionVal)){\r
Value->Type = EFI_IFR_TYPE_UNDEFINED;\r
break;\r
if (!GetQuestionValueFromForm(NULL, FormSet->HiiHandle, &OpCode->Guid, Value->Value.u16, &QuestionVal)){\r
Value->Type = EFI_IFR_TYPE_UNDEFINED;\r
break;\r
//\r
// Create the refresh event process function.\r
//\r
//\r
// Create the refresh event process function.\r
//\r
- if (!CompareGuid (&Statement->RefreshGuid, &gZeroGuid)) {\r
+ if (!IsZeroGuid (&Statement->RefreshGuid)) {\r
CreateRefreshEventForStatement (Statement);\r
}\r
\r
CreateRefreshEventForStatement (Statement);\r
}\r
\r
// Create the refresh guid hook event.\r
// If the statement in this form has refresh event or refresh interval, browser will create this event for display engine.\r
//\r
// Create the refresh guid hook event.\r
// If the statement in this form has refresh event or refresh interval, browser will create this event for display engine.\r
//\r
- if ((!CompareGuid (&Statement->RefreshGuid, &gZeroGuid)) || (Statement->RefreshInterval != 0)) {\r
+ if ((!IsZeroGuid (&Statement->RefreshGuid)) || (Statement->RefreshInterval != 0)) {\r
gDisplayFormData.FormRefreshEvent = mValueChangedEvent;\r
}\r
\r
gDisplayFormData.FormRefreshEvent = mValueChangedEvent;\r
}\r
\r
//\r
// Create the refresh event process function for Form.\r
//\r
//\r
// Create the refresh event process function for Form.\r
//\r
- if (!CompareGuid (&gCurrentSelection->Form->RefreshGuid, &gZeroGuid)) {\r
+ if (!IsZeroGuid (&gCurrentSelection->Form->RefreshGuid)) {\r
CreateRefreshEventForForm (gCurrentSelection->Form);\r
if (gDisplayFormData.FormRefreshEvent == NULL) {\r
gDisplayFormData.FormRefreshEvent = mValueChangedEvent;\r
CreateRefreshEventForForm (gCurrentSelection->Form);\r
if (gDisplayFormData.FormRefreshEvent == NULL) {\r
gDisplayFormData.FormRefreshEvent = mValueChangedEvent;\r
CopyMem (&Selection->FormSetGuid,&Statement->HiiValue.Value.ref.FormSetGuid, sizeof (EFI_GUID));\r
Selection->FormId = Statement->HiiValue.Value.ref.FormId;\r
Selection->QuestionId = Statement->HiiValue.Value.ref.QuestionId;\r
CopyMem (&Selection->FormSetGuid,&Statement->HiiValue.Value.ref.FormSetGuid, sizeof (EFI_GUID));\r
Selection->FormId = Statement->HiiValue.Value.ref.FormId;\r
Selection->QuestionId = Statement->HiiValue.Value.ref.QuestionId;\r
- } else if (!CompareGuid (&Statement->HiiValue.Value.ref.FormSetGuid, &gZeroGuid)) {\r
+ } else if (!IsZeroGuid (&Statement->HiiValue.Value.ref.FormSetGuid)) {\r
if (Selection->Form->ModalForm) {\r
return Status;\r
}\r
if (Selection->Form->ModalForm) {\r
return Status;\r
}\r
// Find the same FromSet.\r
//\r
if (MenuList->HiiHandle == HiiHandle) {\r
// Find the same FromSet.\r
//\r
if (MenuList->HiiHandle == HiiHandle) {\r
- if (CompareGuid (&MenuList->FormSetGuid, &gZeroGuid)) {\r
+ if (IsZeroGuid (&MenuList->FormSetGuid)) {\r
//\r
// FormSetGuid is not specified.\r
//\r
//\r
// FormSetGuid is not specified.\r
//\r
//\r
// Try to compare against formset GUID\r
//\r
//\r
// Try to compare against formset GUID\r
//\r
- if (CompareGuid (FormSetGuid, &gZeroGuid) || \r
+ if (IsZeroGuid (FormSetGuid) ||\r
CompareGuid (ComparingGuid, (EFI_GUID *)(OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {\r
break;\r
}\r
CompareGuid (ComparingGuid, (EFI_GUID *)(OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {\r
break;\r
}\r
VariableServiceSetVariable(), VariableServiceQueryVariableInfo(), ReclaimForOS(),\r
SmmVariableGetStatistics() should also do validation based on its own knowledge.\r
\r
VariableServiceSetVariable(), VariableServiceQueryVariableInfo(), ReclaimForOS(),\r
SmmVariableGetStatistics() should also do validation based on its own knowledge.\r
\r
-Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<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
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
#include <Library/SmmMemLib.h>\r
\r
#include <Guid/SmmVariableCommon.h>\r
#include <Library/SmmMemLib.h>\r
\r
#include <Guid/SmmVariableCommon.h>\r
-#include <Guid/ZeroGuid.h>\r
#include "Variable.h"\r
\r
extern VARIABLE_INFO_ENTRY *gVariableInfo;\r
#include "Variable.h"\r
\r
extern VARIABLE_INFO_ENTRY *gVariableInfo;\r
\r
CopyGuid (&VendorGuid, &InfoEntry->VendorGuid);\r
\r
\r
CopyGuid (&VendorGuid, &InfoEntry->VendorGuid);\r
\r
- if (CompareGuid (&VendorGuid, &gZeroGuid)) {\r
+ if (IsZeroGuid (&VendorGuid)) {\r
//\r
// Return the first variable info\r
//\r
//\r
// Return the first variable info\r
//\r
## SOMETIMES_CONSUMES ## Variable:L"VarErrorFlag"\r
## SOMETIMES_PRODUCES ## Variable:L"VarErrorFlag"\r
gEdkiiVarErrorFlagGuid\r
## SOMETIMES_CONSUMES ## Variable:L"VarErrorFlag"\r
## SOMETIMES_PRODUCES ## Variable:L"VarErrorFlag"\r
gEdkiiVarErrorFlagGuid\r
- gZeroGuid ## SOMETIMES_CONSUMES ## GUID\r
\r
[Pcd]\r
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CONSUMES\r
\r
[Pcd]\r
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CONSUMES\r