1) Add in support to get only VarStoreId = 1 from Multiple VarStores.
2) Remove ThunkIfrSupportLib.h 3) Update some comments. 4) Add GetAttributesOfFirstFormSet to scan form package to read formset title, class info. 5) Clean up function related to package registration code. 6) Clean up RemovePackNotify git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5705 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -398,6 +398,31 @@ GetUefiVariable (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BUFFER_STORAGE_ENTRY *
|
||||||
|
GetBufferStorageEntry (
|
||||||
|
IN CONFIG_ACCESS_PRIVATE *ConfigAccess,
|
||||||
|
IN UINT16 VarStoreId
|
||||||
|
)
|
||||||
|
{
|
||||||
|
LIST_ENTRY *Link;
|
||||||
|
BUFFER_STORAGE_ENTRY *BufferStorage;
|
||||||
|
|
||||||
|
Link = GetFirstNode (&ConfigAccess->BufferStorageListHead);
|
||||||
|
|
||||||
|
while (!IsNull (&ConfigAccess->BufferStorageListHead, Link)) {
|
||||||
|
BufferStorage = BUFFER_STORAGE_ENTRY_FROM_LINK (Link);
|
||||||
|
|
||||||
|
if (BufferStorage->VarStoreId == VarStoreId) {
|
||||||
|
return BufferStorage;
|
||||||
|
}
|
||||||
|
|
||||||
|
Link = GetNextNode (&ConfigAccess->BufferStorageListHead, Link);
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
This function implement the EFI_HII_CONFIG_ACCESS_PROTOCOL.ExtractConfig
|
This function implement the EFI_HII_CONFIG_ACCESS_PROTOCOL.ExtractConfig
|
||||||
@ -432,7 +457,6 @@ ThunkExtractConfig (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CONFIG_ACCESS_PRIVATE *ConfigAccess;
|
CONFIG_ACCESS_PRIVATE *ConfigAccess;
|
||||||
LIST_ENTRY *Link;
|
|
||||||
BUFFER_STORAGE_ENTRY *BufferStorage;
|
BUFFER_STORAGE_ENTRY *BufferStorage;
|
||||||
VOID *Data;
|
VOID *Data;
|
||||||
UINTN DataSize;
|
UINTN DataSize;
|
||||||
@ -443,13 +467,7 @@ ThunkExtractConfig (
|
|||||||
//
|
//
|
||||||
// For now, only one var varstore is supported so that we don't need to parse the Configuration string.
|
// For now, only one var varstore is supported so that we don't need to parse the Configuration string.
|
||||||
//
|
//
|
||||||
Link = GetFirstNode (&ConfigAccess->BufferStorageListHead);
|
BufferStorage = GetBufferStorageEntry (ConfigAccess, (UINT16) RESERVED_VARSTORE_ID);
|
||||||
if (Link == NULL) {
|
|
||||||
ASSERT (FALSE);
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferStorage = BUFFER_STORAGE_ENTRY_FROM_LINK (Link);
|
|
||||||
|
|
||||||
if (ConfigAccess->ThunkContext->NvMapOverride == NULL) {
|
if (ConfigAccess->ThunkContext->NvMapOverride == NULL) {
|
||||||
if (ConfigAccess->FormCallbackProtocol == NULL ||
|
if (ConfigAccess->FormCallbackProtocol == NULL ||
|
||||||
@ -519,7 +537,6 @@ ThunkRouteConfig (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CONFIG_ACCESS_PRIVATE *ConfigAccess;
|
CONFIG_ACCESS_PRIVATE *ConfigAccess;
|
||||||
LIST_ENTRY *Link;
|
|
||||||
BUFFER_STORAGE_ENTRY *BufferStorage;
|
BUFFER_STORAGE_ENTRY *BufferStorage;
|
||||||
UINT8 *Data;
|
UINT8 *Data;
|
||||||
UINTN DataSize;
|
UINTN DataSize;
|
||||||
@ -534,13 +551,8 @@ ThunkRouteConfig (
|
|||||||
//
|
//
|
||||||
// For now, only one var varstore is supported so that we don't need to parse the Configuration string.
|
// For now, only one var varstore is supported so that we don't need to parse the Configuration string.
|
||||||
//
|
//
|
||||||
Link = GetFirstNode (&ConfigAccess->BufferStorageListHead);
|
BufferStorage = GetBufferStorageEntry (ConfigAccess, (UINT16) RESERVED_VARSTORE_ID);
|
||||||
if (Link == NULL) {
|
|
||||||
ASSERT (FALSE);
|
|
||||||
return EFI_INVALID_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferStorage = BUFFER_STORAGE_ENTRY_FROM_LINK (Link);
|
|
||||||
DataSize2 = BufferStorage->Size;
|
DataSize2 = BufferStorage->Size;
|
||||||
if (ConfigAccess->ThunkContext->NvMapOverride == NULL) {
|
if (ConfigAccess->ThunkContext->NvMapOverride == NULL) {
|
||||||
DataAllocated = TRUE;
|
DataAllocated = TRUE;
|
||||||
@ -901,17 +913,10 @@ ThunkCallback (
|
|||||||
//
|
//
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
if (Packet != NULL) {
|
if (Packet != NULL) {
|
||||||
//
|
|
||||||
// BUGBUG: need to restore the changing question to default value
|
|
||||||
//
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
IfrLibCreatePopUp (1, &Key, Packet->String);
|
IfrLibCreatePopUp (1, &Key, Packet->String);
|
||||||
|
|
||||||
} while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
|
} while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Error Code in Status is discarded.
|
// Error Code in Status is discarded.
|
||||||
//
|
//
|
||||||
@ -943,7 +948,7 @@ ThunkCallback (
|
|||||||
NotifyHandle
|
NotifyHandle
|
||||||
);
|
);
|
||||||
//
|
//
|
||||||
// UEFI SetupBrowser handles scenario differently with Framework SetupBrowser when call back function
|
// UEFI SetupBrowser behaves differently with Framework SetupBrowser when call back function
|
||||||
// update any forms in HII database. UEFI SetupBrowser will re-parse the displaying form package and load
|
// update any forms in HII database. UEFI SetupBrowser will re-parse the displaying form package and load
|
||||||
// the values from variable storages. Framework SetupBrowser will only re-parse the displaying form packages.
|
// the values from variable storages. Framework SetupBrowser will only re-parse the displaying form packages.
|
||||||
// To make sure customer's previous changes is saved and the changing question behaves as expected, we
|
// To make sure customer's previous changes is saved and the changing question behaves as expected, we
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/**@file
|
/**@file
|
||||||
|
|
||||||
This file contains the Glyph related function.
|
This file contains the Glyph related function.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
|
@ -38,8 +38,7 @@ FW_HII_FORMSET_TEMPLATE FormSetTemplate = {
|
|||||||
FRAMEWORK_EFI_IFR_FORM_SET_OP,
|
FRAMEWORK_EFI_IFR_FORM_SET_OP,
|
||||||
sizeof (FRAMEWORK_EFI_IFR_FORM_SET)
|
sizeof (FRAMEWORK_EFI_IFR_FORM_SET)
|
||||||
},
|
},
|
||||||
//Guid
|
{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, //Guid
|
||||||
{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}},
|
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -45,7 +45,10 @@ HII_THUNK_PRIVATE_DATA mHiiThunkPrivateDataTempate = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
NULL, NULL //HiiHandleLinkList
|
///
|
||||||
|
/// HiiHandleLinkList
|
||||||
|
///
|
||||||
|
NULL, NULL
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**@file
|
/**@file
|
||||||
|
|
||||||
This file contains global defines and prototype definitions
|
This file contains global defines and prototype definitions
|
||||||
for the HII database.
|
for the Framework HII to Uefi HII Thunk Module.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
@ -51,6 +51,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
#include <MdeModuleHii.h>
|
#include <MdeModuleHii.h>
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// 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 0x0001 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 0x0001.
|
||||||
|
//
|
||||||
|
#define RESERVED_VARSTORE_ID 0x0001
|
||||||
|
|
||||||
|
|
||||||
#pragma pack (push, 1)
|
#pragma pack (push, 1)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT32 BinaryLength;
|
UINT32 BinaryLength;
|
||||||
@ -220,21 +231,6 @@ extern HII_THUNK_PRIVATE_DATA *mHiiThunkPrivateData;
|
|||||||
extern BOOLEAN mInFrameworkUpdatePakcage;
|
extern BOOLEAN mInFrameworkUpdatePakcage;
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Prototypes
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// Public Interface Prototypes
|
|
||||||
//
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
InitializeHiiDatabase (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
HiiNewPack (
|
HiiNewPack (
|
||||||
@ -413,15 +409,6 @@ HiiGetKeyboardLayout (
|
|||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
HiiCompareLanguage (
|
|
||||||
IN CHAR16 *LanguageStringLocation,
|
|
||||||
IN CHAR16 *Language
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ThunkSendForm (
|
ThunkSendForm (
|
||||||
@ -434,7 +421,8 @@ ThunkSendForm (
|
|||||||
IN UINT8 *NvMapOverride, OPTIONAL
|
IN UINT8 *NvMapOverride, OPTIONAL
|
||||||
IN FRAMEWORK_EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
|
IN FRAMEWORK_EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
|
||||||
OUT BOOLEAN *ResetRequired OPTIONAL
|
OUT BOOLEAN *ResetRequired OPTIONAL
|
||||||
);
|
)
|
||||||
|
;
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -446,7 +434,8 @@ ThunkCreatePopUp (
|
|||||||
OUT EFI_INPUT_KEY *KeyValue,
|
OUT EFI_INPUT_KEY *KeyValue,
|
||||||
IN CHAR16 *String,
|
IN CHAR16 *String,
|
||||||
...
|
...
|
||||||
);
|
)
|
||||||
|
;
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**@file
|
/**@file
|
||||||
Framework HII handle database allocation and deallocation functins.
|
This file is for functins related to assign and free Framework HII handle number.
|
||||||
|
|
||||||
Copyright (c) 2008, Intel Corporation
|
Copyright (c) 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/**@file
|
/**@file
|
||||||
|
This file is for functins related to assign and free Framework HII handle number.
|
||||||
This file contains utility functions by HII Thunk Modules.
|
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
|
@ -755,10 +755,7 @@ F2UCreateNumericOpCode (
|
|||||||
UOpcode.Question.Header.Help = FwOpcode->Help;
|
UOpcode.Question.Header.Help = FwOpcode->Help;
|
||||||
|
|
||||||
UOpcode.Question.QuestionId = FwOpcode->Key;
|
UOpcode.Question.QuestionId = FwOpcode->Key;
|
||||||
//
|
UOpcode.Question.VarStoreId = VarStoreId;
|
||||||
// BUGBUG RESERVED_VARSTORE_ID should be passed in.
|
|
||||||
//
|
|
||||||
UOpcode.Question.VarStoreId = RESERVED_VARSTORE_ID;
|
|
||||||
UOpcode.Question.VarStoreInfo.VarOffset = FwOpcode->QuestionId;
|
UOpcode.Question.VarStoreInfo.VarOffset = FwOpcode->QuestionId;
|
||||||
|
|
||||||
UOpcode.Question.Flags = (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
|
UOpcode.Question.Flags = (FwOpcode->Flags & (FRAMEWORK_EFI_IFR_FLAG_INTERACTIVE | FRAMEWORK_EFI_IFR_FLAG_RESET_REQUIRED));
|
||||||
|
@ -43,7 +43,7 @@ GetPackageCount (
|
|||||||
|
|
||||||
for (Index = 0; Index < Packages->NumberOfPackages; Index++) {
|
for (Index = 0; Index < Packages->NumberOfPackages; Index++) {
|
||||||
//
|
//
|
||||||
// BugBug: The current UEFI HII build tool generate a binary in the format defined in:
|
// The current UEFI HII build tool generate a binary in the format defined by
|
||||||
// TIANO_AUTOGEN_PACKAGES_HEADER. We assume that all packages generated in
|
// TIANO_AUTOGEN_PACKAGES_HEADER. We assume that all packages generated in
|
||||||
// this binary is with same package type. So the returned IfrPackageCount and StringPackageCount
|
// this binary is with same package type. So the returned IfrPackageCount and StringPackageCount
|
||||||
// may not be the exact number of valid package number in the binary generated
|
// may not be the exact number of valid package number in the binary generated
|
||||||
|
@ -37,7 +37,7 @@ ThunkSendForm (
|
|||||||
|
|
||||||
if (!UseDatabase) {
|
if (!UseDatabase) {
|
||||||
//
|
//
|
||||||
// Packet, CallbackHandle.
|
// ThunkSendForm only support displays forms registered into the HII database.
|
||||||
//
|
//
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
@ -132,10 +132,6 @@ Returns:
|
|||||||
BOOLEAN Found;
|
BOOLEAN Found;
|
||||||
CHAR8 *Rfc3066AsciiLanguage;
|
CHAR8 *Rfc3066AsciiLanguage;
|
||||||
|
|
||||||
//
|
|
||||||
// BugBug: Conver the language to 3066.
|
|
||||||
//
|
|
||||||
|
|
||||||
LastStringId = (EFI_STRING_ID) 0;
|
LastStringId = (EFI_STRING_ID) 0;
|
||||||
StringId = (EFI_STRING_ID) 0;
|
StringId = (EFI_STRING_ID) 0;
|
||||||
Found = FALSE;
|
Found = FALSE;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "UefiIfrParser.h"
|
#include "UefiIfrParser.h"
|
||||||
#include "UefiIfrDefault.h"
|
#include "UefiIfrDefault.h"
|
||||||
|
#include "HiiDatabase.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Extern Variables
|
// Extern Variables
|
||||||
|
@ -15,16 +15,6 @@
|
|||||||
#ifndef _HII_THUNK_UEFI_IFR_DEFAULT_
|
#ifndef _HII_THUNK_UEFI_IFR_DEFAULT_
|
||||||
#define _HII_THUNK_UEFI_IFR_DEFAULT_
|
#define _HII_THUNK_UEFI_IFR_DEFAULT_
|
||||||
|
|
||||||
//
|
|
||||||
// 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 0x0001 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 0x0001.
|
|
||||||
//
|
|
||||||
#define RESERVED_VARSTORE_ID 0x0001
|
|
||||||
#define RESERVED_QUESTION_ID 0xf000
|
|
||||||
|
|
||||||
#define UEFI_IFR_BUFFER_STORAGE_NODE_FROM_LIST(a) CR(a, UEFI_IFR_BUFFER_STORAGE_NODE, List, UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE)
|
#define UEFI_IFR_BUFFER_STORAGE_NODE_FROM_LIST(a) CR(a, UEFI_IFR_BUFFER_STORAGE_NODE, List, UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE)
|
||||||
#define UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE EFI_SIGNATURE_32 ('I', 'b', 'S', 'n')
|
#define UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE EFI_SIGNATURE_32 ('I', 'b', 'S', 'n')
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Reference in New Issue
Block a user