2 Head file for front page.
4 Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #define _FRONT_PAGE_H_
15 #include <Protocol/BootLogo.h>
17 // These is the VFR compiler generated data representing our VFR data.
19 extern UINT8 FrontPageVfrBin
[];
21 extern EFI_FORM_BROWSER2_PROTOCOL
*gFormBrowser2
;
24 #define SMBIOS_TYPE4_CPU_SOCKET_POPULATED BIT6
27 // This is the VFR compiler generated header file which defines the
28 // string identifiers.
30 #define PRINTABLE_LANGUAGE_NAME_STRING_ID 0x0001
33 // These are defined as the same with vfr file
35 #define FRONT_PAGE_FORM_ID 0x1000
37 #define LABEL_FRANTPAGE_INFORMATION 0x1000
38 #define LABEL_END 0xffff
40 #define FRONT_PAGE_FORMSET_GUID \
42 0x9e0c30bc, 0x3f06, 0x4ba6, {0x82, 0x88, 0x9, 0x17, 0x9b, 0x85, 0x5d, 0xbe} \
45 #define FRONT_PAGE_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('F', 'P', 'C', 'B')
51 // HII relative handles
53 EFI_HII_HANDLE HiiHandle
;
54 EFI_HANDLE DriverHandle
;
55 EFI_STRING_ID
*LanguageToken
;
60 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess
;
61 } FRONT_PAGE_CALLBACK_DATA
;
64 #define EFI_FP_CALLBACK_DATA_FROM_THIS(a) \
66 FRONT_PAGE_CALLBACK_DATA, \
68 FRONT_PAGE_CALLBACK_DATA_SIGNATURE \
72 This function allows a caller to extract the current configuration for one
73 or more named elements from the target driver.
76 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
77 @param Request - A null-terminated Unicode string in <ConfigRequest> format.
78 @param Progress - On return, points to a character in the Request string.
79 Points to the string's null terminator if request was successful.
80 Points to the most recent '&' before the first failing name/value
81 pair (or the beginning of the string if the failure is in the
82 first name/value pair) if the request was not successful.
83 @param Results - A null-terminated Unicode string in <ConfigAltResp> format which
84 has all values filled in for the names in the Request string.
85 String to be allocated by the called function.
87 @retval EFI_SUCCESS The Results is filled with the requested values.
88 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
89 @retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name.
90 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
96 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
97 IN CONST EFI_STRING Request
,
98 OUT EFI_STRING
*Progress
,
99 OUT EFI_STRING
*Results
103 This function processes the results of changes in configuration.
106 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
107 @param Configuration - A null-terminated Unicode string in <ConfigResp> format.
108 @param Progress - A pointer to a string filled in with the offset of the most
109 recent '&' before the first failing name/value pair (or the
110 beginning of the string if the failure is in the first
111 name/value pair) or the terminating NULL if all was successful.
113 @retval EFI_SUCCESS The Results is processed successfully.
114 @retval EFI_INVALID_PARAMETER Configuration is NULL.
115 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
121 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
122 IN CONST EFI_STRING Configuration
,
123 OUT EFI_STRING
*Progress
127 This function processes the results of changes in configuration.
130 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
131 @param Action - Specifies the type of action taken by the browser.
132 @param QuestionId - A unique value which is sent to the original exporting driver
133 so that it can identify the type of data to expect.
134 @param Type - The type of value for the question.
135 @param Value - A pointer to the data being sent to the original exporting driver.
136 @param ActionRequest - On return, points to the action requested by the callback function.
138 @retval EFI_SUCCESS The callback successfully handled the action.
139 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
140 @retval EFI_DEVICE_ERROR The variable could not be saved.
141 @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.
147 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
148 IN EFI_BROWSER_ACTION Action
,
149 IN EFI_QUESTION_ID QuestionId
,
151 IN EFI_IFR_TYPE_VALUE
*Value
,
152 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest
156 Initialize HII information for the FrontPage
158 @retval EFI_SUCCESS The operation is successful.
159 @retval EFI_DEVICE_ERROR If the dynamic opcode creation failed.
163 InitializeFrontPage (
168 Acquire the string associated with the ProducerGuid and return it.
171 @param ProducerGuid - The Guid to search the HII database for
172 @param Token - The token value of the string to extract
173 @param String - The string that is extracted
175 @retval EFI_SUCCESS The function returns EFI_SUCCESS always.
180 IN EFI_GUID
*ProducerGuid
,
181 IN EFI_STRING_ID Token
,
186 This function is the main entry of the UI entry.
187 The function will present the main menu of the system UI.
189 @param ConnectAllHappened Caller passes the value to UI to avoid unnecessary connect-all.
195 IN BOOLEAN ConnectAllHappened
199 Extract device path for given HII handle and class guid.
201 @param Handle The HII handle.
203 @retval NULL Fail to get the device path string.
204 @return PathString Get the device path string.
208 ExtractDevicePathFromHiiHandle (
209 IN EFI_HII_HANDLE Handle
212 #endif // _FRONT_PAGE_H_