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
This commit is contained in:
qwang12 2008-05-14 08:18:48 +00:00
parent ea7cb08c0a
commit b47694b968
2 changed files with 10 additions and 6 deletions

View File

@ -1,6 +1,10 @@
#/** @file #/** @file
# Component description file for HiiDatabase module which produce a Framework HII instance # Component description file for HiiDatabase module which produce a Framework HII Protocol instance
# based on the avaliable UEFI HII protocol found in the platform. # 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.. # 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 # Copyright (c) 2006 - 2008, Intel Corporation

View File

@ -502,6 +502,7 @@ GetBufferTypeDefaultIdAndStorageId (
Node->Signature = UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE; Node->Signature = UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE;
Node->Name = AllocateCopyPool (StrSize (Storage->Name), Storage->Name); Node->Name = AllocateCopyPool (StrSize (Storage->Name), Storage->Name);
Node->DefaultId = DefaultStore->DefaultId; Node->DefaultId = DefaultStore->DefaultId;
Node->StoreId = Storage->VarStoreId;
CopyGuid (&Node->Guid, &Storage->Guid); CopyGuid (&Node->Guid, &Storage->Guid);
Node->Size = Storage->Size; Node->Size = Storage->Size;
Node->Buffer = AllocateZeroPool (Node->Size); Node->Buffer = AllocateZeroPool (Node->Size);
@ -710,13 +711,14 @@ UefiDefaultsToFrameworkDefaults (
// //
if (Node->StoreId == RESERVED_VARSTORE_ID) { if (Node->StoreId == RESERVED_VARSTORE_ID) {
Pack->VariableId = 0; Pack->VariableId = 0;
} else {
Pack->VariableId = Node->StoreId;
} }
// //
// Initialize EFI_HII_VARIABLE_PACK // Initialize EFI_HII_VARIABLE_PACK
// //
Pack->Header.Type = 0; Pack->Header.Type = 0;
Pack->Header.Length = Size; Pack->Header.Length = Size;
Pack->VariableId = Node->StoreId;
Pack->VariableNameLength = StrSize (Node->Name); Pack->VariableNameLength = StrSize (Node->Name);
CopyMem (&Pack->VariableGuid, &Node->Guid, sizeof (EFI_GUID)); CopyMem (&Pack->VariableGuid, &Node->Guid, sizeof (EFI_GUID));
@ -749,9 +751,7 @@ UefiDefaultsToFrameworkDefaults (
a UEFI form set. a UEFI form set.
@retval EFI_SUCCESS Successful. @retval VOID
@retval EFI_INVALID_PARAMETER The default mask is not FRAMEWORK_EFI_IFR_FLAG_DEFAULT or
FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.
**/ **/
VOID VOID
FreeDefaultList ( FreeDefaultList (