{\r
EFI_HOB_GUID_TYPE *GuidHob;\r
\r
+ //\r
+ // Make sure there is no more than one Variable HOB.\r
+ //\r
+ DEBUG_CODE (\r
+ GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);\r
+ if (GuidHob != NULL) {\r
+ if ((GetNextGuidHob (&gEfiAuthenticatedVariableGuid, GET_NEXT_HOB (GuidHob)) != NULL)) {\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Found two Auth Variable HOBs\n"));\r
+ ASSERT (FALSE);\r
+ } else if (GetFirstGuidHob (&gEfiVariableGuid) != NULL) {\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Found one Auth + one Normal Variable HOBs\n"));\r
+ ASSERT (FALSE);\r
+ }\r
+ } else {\r
+ GuidHob = GetFirstGuidHob (&gEfiVariableGuid);\r
+ if (GuidHob != NULL) {\r
+ if ((GetNextGuidHob (&gEfiVariableGuid, GET_NEXT_HOB (GuidHob)) != NULL)) {\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Found two Normal Variable HOBs\n"));\r
+ ASSERT (FALSE);\r
+ }\r
+ }\r
+ }\r
+ );\r
+\r
GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);\r
if (GuidHob != NULL) {\r
*VariableStoreHeader = (VARIABLE_STORE_HEADER *) GET_GUID_HOB_DATA (GuidHob);\r
EFI_HOB_GUID_TYPE *GuidHob;\r
BOOLEAN NeedConvertNormalToAuth;\r
\r
+ //\r
+ // Make sure there is no more than one Variable HOB.\r
+ //\r
+ DEBUG_CODE (\r
+ GuidHob = GetFirstGuidHob (&gEfiAuthenticatedVariableGuid);\r
+ if (GuidHob != NULL) {\r
+ if ((GetNextGuidHob (&gEfiAuthenticatedVariableGuid, GET_NEXT_HOB (GuidHob)) != NULL)) {\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Found two Auth Variable HOBs\n"));\r
+ ASSERT (FALSE);\r
+ } else if (GetFirstGuidHob (&gEfiVariableGuid) != NULL) {\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Found one Auth + one Normal Variable HOBs\n"));\r
+ ASSERT (FALSE);\r
+ }\r
+ } else {\r
+ GuidHob = GetFirstGuidHob (&gEfiVariableGuid);\r
+ if (GuidHob != NULL) {\r
+ if ((GetNextGuidHob (&gEfiVariableGuid, GET_NEXT_HOB (GuidHob)) != NULL)) {\r
+ DEBUG ((DEBUG_ERROR, "ERROR: Found two Normal Variable HOBs\n"));\r
+ ASSERT (FALSE);\r
+ }\r
+ }\r
+ }\r
+ );\r
+\r
//\r
// Combinations supported:\r
// 1. Normal NV variable store +\r