1) Fix a bug of DefaultVarStoreId of the Form Set should be used when Framework IfrSupportLib create new opcode.

2) Remove the unnecessary OpcodeCreation.h 
3) Update the doxygen function header.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6787 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2008-12-01 07:16:55 +00:00
parent b0dd810861
commit 03254710db
10 changed files with 335 additions and 529 deletions

View File

@ -15,7 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "HiiDatabase.h"
#include "UefiIfrDefault.h"
#include "OpcodeCreation.h"
//
// This structure is only intended to be used in this file.

View File

@ -42,7 +42,6 @@
ConfigAccess.c
ConfigAccess.h
OpcodeCreation.c
OpcodeCreation.h
UefiIfrParser.c
UefiIfrParser.h
UefiIfrParserExpression.c

View File

@ -422,6 +422,25 @@ NewOrAddPackNotify (
IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
);
/**
Create a EFI_HII_UPDATE_DATA structure used to call IfrLibUpdateForm.
@param ThunkContext The HII Thunk Context.
@param FwUpdateData The Framework Update Data.
@param UefiUpdateData The UEFI Update Data.
@retval EFI_SUCCESS The UEFI Update Data is created successfully.
@retval EFI_UNSUPPORTED There is unsupported opcode in FwUpdateData.
@retval EFI_OUT_OF_RESOURCES There is not enough resource.
**/
EFI_STATUS
FwUpdateDataToUefiUpdateData (
IN HII_THUNK_CONTEXT *ThunkContext,
IN CONST FRAMEWORK_EFI_HII_UPDATE_DATA *FwUpdateData,
OUT EFI_HII_UPDATE_DATA **UefiUpdateData
)
;
#include "Utility.h"
#include "ConfigAccess.h"

View File

@ -22,7 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param This A pointer to the EFI_HII_PROTOCOL instance.
@param DescriptorCount A pointer to the number of Descriptor entries being described in the keyboard layout being retrieved.
@param Descriptor A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries. Each entry will reflect the definition of a specific physical key. Type EFI_KEY_DESCRIPTOR is defined in "Related Definitions" below.
@param Descriptor A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries. Each entry will reflect the
definition of a specific physical key. Type EFI_KEY_DESCRIPTOR is defined in "Related Definitions" below.
@retval EFI_SUCCESS The keyboard layout was retrieved successfully.

View File

@ -1,111 +0,0 @@
/** @file
Implement Functions to convert IFR Opcode in format defined in Framework HII specification to
format defined in UEFI HII Specification.
Copyright (c) 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _HII_THUNK_OPCODE_CREATION_H
#define _HII_THUNK_OPCODE_CREATION_H
EFI_STATUS
UCreateEndOfOpcode (
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
F2UCreateSubtitleOpCode (
IN CONST FRAMEWORK_EFI_IFR_SUBTITLE *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
F2UCreateTextOpCode (
IN CONST FRAMEWORK_EFI_IFR_TEXT *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
F2UCreateGotoOpCode (
IN CONST FRAMEWORK_EFI_IFR_REF *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
F2UCreateOneOfOptionOpCode (
IN CONST FRAMEWORK_EFI_IFR_ONE_OF_OPTION *FwOpcode,
IN UINTN Width,
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
F2UCreateOneOfOpCode (
IN HII_THUNK_CONTEXT *ThunkContext,
IN UINT16 VarStoreId,
IN CONST FRAMEWORK_EFI_IFR_ONE_OF *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData,
OUT FRAMEWORK_EFI_IFR_OP_HEADER **NextFwOpcode,
OUT UINTN *DataCount
);
EFI_STATUS
F2UCreateOrderedListOpCode (
IN HII_THUNK_CONTEXT *ThunkContext,
IN UINT16 VarStoreId,
IN CONST FRAMEWORK_EFI_IFR_ORDERED_LIST *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData,
OUT FRAMEWORK_EFI_IFR_OP_HEADER **NextFwOpcode,
OUT UINTN *DataCount
);
EFI_STATUS
F2UCreateCheckBoxOpCode (
IN HII_THUNK_CONTEXT *ThunkContext,
IN UINT16 VarStoreId,
IN CONST FRAMEWORK_EFI_IFR_CHECKBOX *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
F2UCreateNumericOpCode (
IN HII_THUNK_CONTEXT *ThunkContext,
IN UINT16 VarStoreId,
IN CONST FRAMEWORK_EFI_IFR_NUMERIC *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
F2UCreateStringOpCode (
IN HII_THUNK_CONTEXT *ThunkContext,
IN UINT16 VarStoreId,
IN CONST FRAMEWORK_EFI_IFR_STRING *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
F2UCreateBannerOpCode (
IN CONST FRAMEWORK_EFI_IFR_BANNER *FwOpcode,
OUT EFI_HII_UPDATE_DATA *UefiData
);
EFI_STATUS
FwUpdateDataToUefiUpdateData (
IN HII_THUNK_CONTEXT *ThunkContext,
IN CONST FRAMEWORK_EFI_HII_UPDATE_DATA *Data,
OUT EFI_HII_UPDATE_DATA **UefiData
);
#endif

View File

@ -1,29 +0,0 @@
/**@file
This file contains utility functions by HII Thunk Modules.
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _THUNK_IFR_SUPPORTLIB_H
#define _THUNK_IFR_SUPPORTLIB_H
#endif

View File

@ -487,7 +487,7 @@ UefiDefaultsToFwDefaults (
//
// In UEFI, 0 is defined to be invalid for EFI_IFR_VARSTORE.VarStoreId.
// So the default storage of Var Store in VFR from a Framework module
// should be translated to 0x0001 (FRAMEWORK_RESERVED_VARSTORE_ID).
// should be translated to the default Varstore ID.
//
if (Node->StoreId == UefiFormSetDefaultVarStoreId) {
Pack->VariableId = 0;

View File

@ -317,6 +317,11 @@ typedef struct {
UINT16 MaxQuestionId;
//
// Added for Framework HII Thunk.
// Default Variable Storage built from a Framework VFR file using UEFI VFR Compiler in Compatibility mode is determined
// by priority rules defined in GetFormsetDefaultVarstoreId (). See the function description for details.
//
EFI_VARSTORE_ID DefaultVarStoreId;
UINTN NumberOfStatement;

View File

@ -392,10 +392,11 @@ DestroyThunkContext (
/**
Get the FormSet's Default Varstore ID based on the rule (Descending Priority):
1) Var Store ID of FRAMEWORK_RESERVED_VARSTORE_ID (0x01).
2) First Var Store ID.
1) If VarStore ID of FRAMEWORK_RESERVED_VARSTORE_ID (0x01) is found, Var Store ID is used.
2) If VarStore ID of FRAMEWORK_RESERVED_VARSTORE_ID is not found, First Var Store ID is used
as the default Var Store ID.
@param FormSet The Form Set.
@param FormSet The Form Set. The Default Varstore ID is updated if found.
**/
VOID