From b47694b968e6df0c4fe4753f349c7bb53bb347c1 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Wed, 14 May 2008 08:18:48 +0000 Subject: [PATCH] 1) Use 0xFFEE as the VarId the reason is as follows: // VARSTORE ID of 0 for Buffer Storage Type Storage is reserved in UEFI IFR form. But VARSTORE ID // 0 in Framework IFR is the default VarStore ID for storage without explicit declaration. So we have // to reseved 0xFFEE in UEFI VARSTORE ID to represetn default storage id in Framework IFR. // Framework VFR has to be ported or pre-processed to change the default VARSTORE to a VARSTORE // with ID equal to 0xFFEE. 2) Update some comments git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5201 6f19259b-4bc3-4df7-8a09-765794883524 --- .../FrameworkHiiToUefiHiiThunk.inf | 8 ++++++-- .../FrameworkHiiToUefiHiiThunk/UefiIfrDefault.c | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf index 5ccb1d64c7..d0483c76bf 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf @@ -1,6 +1,10 @@ #/** @file -# Component description file for HiiDatabase module which produce a Framework HII instance -# based on the avaliable UEFI HII protocol found in the platform. +# Component description file for HiiDatabase module which produce a Framework HII Protocol instance +# based on the avaliable UEFI HII protocol found in the platform. This modules enables modules complying +# to Framework HII specification to able to run on a UEFI HII platform with only a rebuild. This is +# to ensure that all HII packages are generated by UEFI HII package generation tools (UEFI VfrCompiler and +# String Gather Tools). This thunk layer only produces the Frameowork HII protocol interface. The binary package +# data format complying to UEFI HII specification. # # This module inits HII database and installs HII protocol based on the avaliable UEFI HII protocol found in the platform.. # Copyright (c) 2006 - 2008, Intel Corporation diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrDefault.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrDefault.c index fa01c3f7dc..f33d63cfa4 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrDefault.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrDefault.c @@ -502,6 +502,7 @@ GetBufferTypeDefaultIdAndStorageId ( Node->Signature = UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE; Node->Name = AllocateCopyPool (StrSize (Storage->Name), Storage->Name); Node->DefaultId = DefaultStore->DefaultId; + Node->StoreId = Storage->VarStoreId; CopyGuid (&Node->Guid, &Storage->Guid); Node->Size = Storage->Size; Node->Buffer = AllocateZeroPool (Node->Size); @@ -710,13 +711,14 @@ UefiDefaultsToFrameworkDefaults ( // if (Node->StoreId == RESERVED_VARSTORE_ID) { Pack->VariableId = 0; + } else { + Pack->VariableId = Node->StoreId; } // // Initialize EFI_HII_VARIABLE_PACK // Pack->Header.Type = 0; Pack->Header.Length = Size; - Pack->VariableId = Node->StoreId; Pack->VariableNameLength = StrSize (Node->Name); CopyMem (&Pack->VariableGuid, &Node->Guid, sizeof (EFI_GUID)); @@ -749,9 +751,7 @@ UefiDefaultsToFrameworkDefaults ( a UEFI form set. - @retval EFI_SUCCESS Successful. - @retval EFI_INVALID_PARAMETER The default mask is not FRAMEWORK_EFI_IFR_FLAG_DEFAULT or - FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING. + @retval VOID **/ VOID FreeDefaultList ( -- 2.39.2