2 Header file for Function and Macro defintions for to extract default values from UEFI Form package.
4 Copyright (c) 2008, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _HII_THUNK_UEFI_IFR_DEFAULT_
16 #define _HII_THUNK_UEFI_IFR_DEFAULT_
19 // VARSTORE ID of 0 for Buffer Storage Type Storage is reserved in UEFI IFR form. But VARSTORE ID
20 // 0 in Framework IFR is the default VarStore ID for storage without explicit declaration. So we have
21 // to reseved 0x0001 in UEFI VARSTORE ID to represetn default storage id in Framework IFR.
22 // Framework VFR has to be ported or pre-processed to change the default VARSTORE to a VARSTORE
23 // with ID equal to 0x0001.
25 #define RESERVED_VARSTORE_ID 0x0001
26 #define RESERVED_QUESTION_ID 0xf000
28 #define UEFI_IFR_BUFFER_STORAGE_NODE_FROM_LIST(a) CR(a, UEFI_IFR_BUFFER_STORAGE_NODE, List, UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE)
29 #define UEFI_IFR_BUFFER_STORAGE_NODE_SIGNATURE EFI_SIGNATURE_32 ('I', 'b', 'S', 'n')
41 } UEFI_IFR_BUFFER_STORAGE_NODE
;
44 Get the default value for Buffer Type storage from the first FormSet
45 in the Package List specified by a EFI_HII_HANDLE.
47 The results can be multiple instances of UEFI_IFR_BUFFER_STORAGE_NODE.
48 They are inserted to the link list.
50 @param UefiHiiHandle The handle for the package list.
51 @param UefiDefaultsListHead The head of link list for the output.
53 @retval EFI_SUCCESS Successful.
57 UefiIfrGetBufferTypeDefaults (
58 EFI_HII_HANDLE UefiHiiHandle
,
59 LIST_ENTRY
**UefiDefaults
63 Convert the UEFI Buffer Type default values to a Framework HII default
64 values specified by a EFI_HII_VARIABLE_PACK_LIST structure.
66 @param ListHead The link list of UEFI_IFR_BUFFER_STORAGE_NODE
67 which contains the default values retrived from
69 @param DefaultMask The default mask.
70 The valid values are FRAMEWORK_EFI_IFR_FLAG_DEFAULT
71 and FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.
72 UEFI spec only map FRAMEWORK_EFI_IFR_FLAG_DEFAULT and FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING
73 from specification to valid default class.
74 @param VariablePackList The output default value in a format defined in Framework.
77 @retval EFI_SUCCESS Successful.
78 @retval EFI_INVALID_PARAMETER The default mask is not FRAMEWORK_EFI_IFR_FLAG_DEFAULT or
79 FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.
83 UefiDefaultsToFwDefaults (
84 IN LIST_ENTRY
*UefiIfrDefaults
,
86 OUT EFI_HII_VARIABLE_PACK_LIST
**VariablePackList
91 Free up all buffer allocated for the link list of UEFI_IFR_BUFFER_STORAGE_NODE.
93 @param ListHead The link list of UEFI_IFR_BUFFER_STORAGE_NODE
94 which contains the default values retrived from
98 @retval EFI_SUCCESS Successful.
99 @retval EFI_INVALID_PARAMETER The default mask is not FRAMEWORK_EFI_IFR_FLAG_DEFAULT or
100 FRAMEWORK_EFI_IFR_FLAG_MANUFACTURING.
104 IN LIST_ENTRY
*UefiIfrDefaults