summaryrefslogtreecommitdiff
path: root/DuetPkg/FSVariable/FSVariable.c
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-29 07:50:58 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-29 07:50:58 +0000
commiteb16e24041d74b607d848adba78ea4f417edff44 (patch)
treec5199c81c00a581e5e50ce1234cae7577f8f35ed /DuetPkg/FSVariable/FSVariable.c
parent46b5ebc877ae80e2fea6709552cbff46965f3abe (diff)
downloadedk2-platforms-eb16e24041d74b607d848adba78ea4f417edff44.tar.xz
Add 8254 module and fix the hob operation for R9 library.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5150 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/FSVariable/FSVariable.c')
-rw-r--r--DuetPkg/FSVariable/FSVariable.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c
index 0413691067..cfe76ccc95 100644
--- a/DuetPkg/FSVariable/FSVariable.c
+++ b/DuetPkg/FSVariable/FSVariable.c
@@ -1154,12 +1154,11 @@ Returns:
EFI_STATUS Status;
EFI_HANDLE NewHandle;
VS_DEV *Dev;
- VOID *HobList;
+ EFI_PEI_HOB_POINTERS GuidHob;
VARIABLE_HEADER *NextVariable;
VARIABLE_STORE_HEADER *VariableStoreHeader;
EFI_FLASH_MAP_FS_ENTRY_DATA *FlashMapEntryData;
EFI_FLASH_SUBAREA_ENTRY VariableStoreEntry;
- VOID *Buffer;
UINT64 BaseAddress;
UINT64 Length;
EFI_GCD_MEMORY_SPACE_DESCRIPTOR GcdDescriptor;
@@ -1173,27 +1172,18 @@ Returns:
return Status;
}
- Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, &HobList);
-
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
-
- for (FlashMapEntryData = NULL; ;) {
- Buffer = GetNextGuidHob (&gEfiFlashMapHobGuid, &HobList);
-
- FlashMapEntryData = (EFI_FLASH_MAP_FS_ENTRY_DATA *) Buffer;
-
- //
- // Get the variable store area
- //
+ GuidHob.Raw = GetHobList ();
+ FlashMapEntryData = NULL;
+ while ((GuidHob.Raw = GetNextGuidHob (&gEfiFlashMapHobGuid, GuidHob.Raw)) != NULL) {
+ FlashMapEntryData = (EFI_FLASH_MAP_FS_ENTRY_DATA *) GET_GUID_HOB_DATA (GuidHob.Guid);
if (FlashMapEntryData->AreaType == EFI_FLASH_AREA_EFI_VARIABLES) {
break;
}
+ GuidHob.Raw = GET_NEXT_HOB (GuidHob);
}
- if (EFI_ERROR (Status) || FlashMapEntryData == NULL) {
+ if (FlashMapEntryData == NULL) {
+ DEBUG ((EFI_D_ERROR, "FSVariable: Could not find flash area for variable!\n"));
Status = EFI_NOT_FOUND;
return Status;
}