1) Update variable name to better names. 2) Change List Entry in all data structure to "Link". 3) Update to use proper list manipulation functions in BaseLib. 4) Add in more comments and clean up HiiNewString. 5) Clean up for HiiNewPack, HiiRemovePack and the notify functions. 6) Create better name such as GetPackageCount and AssignFrameworkHiiHandle 7) Clean up the InitializeHiiDatabase entry point. 8) Remove the confusing data field in the HII_THUNK_ENTRY HiiDatabase.h. 9) Add in cleanup code for DestoryThunkContext 10) Add in code to handle the save of browser data after invoke callback 11) Map the UEFI One Of Option code to Framework One Of Option code before calling Framework Callback. 12) Add in CreatePopUp support. 13) Add in SendForm support. 14) HiiGetPrimaryLanguages and HiiGetSecondaryLanguages should support language code in RFC639 format from Caller. Then, they should conver them to 3066 format before calling UEFI HII interfaces. 15) Make ResetStrings a NOP. 16) Remove the unnecessary dependency. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5659 6f19259b-4bc3-4df7-8a09-765794883524
111 lines
4.4 KiB
C
111 lines
4.4 KiB
C
/** @file
|
|
Header file for Function and Macro defintions for to extract default values from UEFI Form package.
|
|
|
|
Copyright (c) 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 _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_SIGNATURE EFI_SIGNATURE_32 ('I', 'b', 'S', 'n')
|
|
typedef struct {
|
|
LIST_ENTRY List;
|
|
UINT32 Signature;
|
|
|
|
EFI_GUID Guid;
|
|
CHAR16 *Name;
|
|
UINT16 DefaultId;
|
|
UINT16 StoreId;
|
|
UINTN Size;
|
|
UINT8 *Buffer;
|
|
|
|
} UEFI_IFR_BUFFER_STORAGE_NODE;
|
|
|
|
/**
|
|
Get the default value for Buffer Type storage from the first FormSet
|
|
in the Package List specified by a EFI_HII_HANDLE.
|
|
|
|
The results can be multiple instances of UEFI_IFR_BUFFER_STORAGE_NODE.
|
|
They are inserted to the link list.
|
|
|
|
@param UefiHiiHandle The handle for the package list.
|
|
@param UefiDefaultsListHead The head of link list for the output.
|
|
|
|
@retval EFI_SUCCESS Successful.
|
|
|
|
**/
|
|
EFI_STATUS
|
|
UefiIfrGetBufferTypeDefaults (
|
|
EFI_HII_HANDLE UefiHiiHandle,
|
|
LIST_ENTRY **UefiDefaults
|
|
);
|
|
|
|
/**
|
|
Convert the UEFI Buffer Type default values to a Framework HII default
|
|
values specified by a EFI_HII_VARIABLE_PACK_LIST structure.
|
|
|
|
@param ListHead The link list of UEFI_IFR_BUFFER_STORAGE_NODE
|
|
which contains the default values retrived from
|
|
a UEFI form set.
|
|
@param DefaultMask The default mask.
|
|
The valid values are FRAMEWORK_EFI_IFR_FLAG_DEFAULT
|
|
and FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.
|
|
UEFI spec only map FRAMEWORK_EFI_IFR_FLAG_DEFAULT and FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING
|
|
from specification to valid default class.
|
|
@param VariablePackList The output default value in a format defined in Framework.
|
|
|
|
|
|
@retval EFI_SUCCESS Successful.
|
|
@retval EFI_INVALID_PARAMETER The default mask is not FRAMEWORK_EFI_IFR_FLAG_DEFAULT or
|
|
FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.
|
|
**/
|
|
|
|
EFI_STATUS
|
|
UefiDefaultsToFwDefaults (
|
|
IN LIST_ENTRY *UefiIfrDefaults,
|
|
IN UINTN DefaultMask,
|
|
OUT EFI_HII_VARIABLE_PACK_LIST **VariablePackList
|
|
)
|
|
;
|
|
|
|
/**
|
|
Free up all buffer allocated for the link list of UEFI_IFR_BUFFER_STORAGE_NODE.
|
|
|
|
@param ListHead The link list of UEFI_IFR_BUFFER_STORAGE_NODE
|
|
which contains the default values retrived from
|
|
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.
|
|
**/
|
|
VOID
|
|
FreeDefaultList (
|
|
IN LIST_ENTRY *UefiIfrDefaults
|
|
)
|
|
;
|
|
|
|
#endif
|
|
|
|
|