52#define UI_ACTION_NONE 0
53#define UI_ACTION_REFRESH_FORM 1
54#define UI_ACTION_REFRESH_FORMSET 2
55#define UI_ACTION_EXIT 3
61#define ONE_SECOND 10000000
65#define CONFIG_REQUEST_STRING_INCREMENTAL 1024
70#define EXPRESSION_STACK_SIZE_INCREMENT 0x100
72#define EFI_IFR_SPECIFICATION_VERSION (UINT16) (((EFI_SYSTEM_TABLE_REVISION >> 16) << 8) | (((EFI_SYSTEM_TABLE_REVISION & 0xFFFF) / 10) << 4) | ((EFI_SYSTEM_TABLE_REVISION & 0xFFFF) % 10))
74#define SETUP_DRIVER_SIGNATURE SIGNATURE_32 ('F', 'B', 'D', 'V')
92#define EFI_HII_EXPRESSION_INCONSISTENT_IF 0
93#define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1
94#define EFI_HII_EXPRESSION_GRAY_OUT_IF 2
95#define EFI_HII_EXPRESSION_SUPPRESS_IF 3
96#define EFI_HII_EXPRESSION_DISABLE_IF 4
97#define EFI_HII_EXPRESSION_VALUE 5
98#define EFI_HII_EXPRESSION_RULE 6
99#define EFI_HII_EXPRESSION_READ 7
100#define EFI_HII_EXPRESSION_WRITE 8
101#define EFI_HII_EXPRESSION_WARNING_IF 9
103#define EFI_HII_VARSTORE_BUFFER 0
104#define EFI_HII_VARSTORE_NAME_VALUE 1
105#define EFI_HII_VARSTORE_EFI_VARIABLE 2
106#define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
108#define FORM_INCONSISTENT_VALIDATION 0
109#define FORM_NO_SUBMIT_VALIDATION 1
111#define NAME_VALUE_NODE_SIGNATURE SIGNATURE_32 ('N', 'V', 'S', 'T')
121#define NAME_VALUE_NODE_FROM_LINK(a) CR (a, NAME_VALUE_NODE, Link, NAME_VALUE_NODE_SIGNATURE)
123#define BROWSER_STORAGE_SIGNATURE SIGNATURE_32 ('B', 'S', 'T', 'G')
145 CHAR16 *ConfigRequest;
150#define BROWSER_STORAGE_FROM_LINK(a) CR (a, BROWSER_STORAGE, Link, BROWSER_STORAGE_SIGNATURE)
152#define FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'G')
166 CHAR16 *ConfigRequest;
167 CHAR16 *ConfigAltResp;
168 BOOLEAN HasCallAltCfg;
171 CHAR16 *RestoreConfigRequest;
172 CHAR16 *SyncConfigRequest;
175#define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)
176#define FORMSET_STORAGE_FROM_SAVE_FAIL_LINK(a) CR (a, FORMSET_STORAGE, SaveFailLink, FORMSET_STORAGE_SIGNATURE)
179 EFI_STRING_ID VarName;
183#define EXPRESSION_OPCODE_SIGNATURE SIGNATURE_32 ('E', 'X', 'O', 'P')
197 EFI_QUESTION_ID QuestionId;
198 EFI_QUESTION_ID QuestionId2;
203 EFI_STRING_ID DevicePath;
214#define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)
216#define FORM_EXPRESSION_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'P')
235#define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)
237#define FORM_EXPRESSION_LIST_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'R')
245#define QUESTION_DEFAULT_SIGNATURE SIGNATURE_32 ('Q', 'D', 'F', 'T')
257#define QUESTION_DEFAULT_FROM_LINK(a) CR (a, QUESTION_DEFAULT, Link, QUESTION_DEFAULT_SIGNATURE)
259#define QUESTION_OPTION_SIGNATURE SIGNATURE_32 ('Q', 'O', 'P', 'T')
270 EFI_IMAGE_ID ImageId;
275#define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)
293#define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')
305 EFI_STRING_ID Prompt;
307 EFI_STRING_ID TextTwo;
312 EFI_QUESTION_ID FakeQuestionId;
317 EFI_QUESTION_ID QuestionId;
318 EFI_VARSTORE_ID VarStoreId;
322 UINT16 BitStorageWidth;
325 BOOLEAN QuestionReferToBitField;
326 CHAR16 *VariableName;
340 UINT16 BannerLineNumber;
341 EFI_STRING_ID QuestionConfig;
347 EFI_DEFAULT_ID DefaultId;
350 BOOLEAN ValueChanged;
358 EFI_IMAGE_ID ImageId;
359 UINT8 RefreshInterval;
372#define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)
374#define FORM_BROWSER_CONFIG_REQUEST_SIGNATURE SIGNATURE_32 ('F', 'C', 'R', 'S')
381 CHAR16 *ConfigRequest;
382 CHAR16 *ConfigAltResp;
385 CHAR16 *RestoreConfigRequest;
386 CHAR16 *SyncConfigRequest;
390#define FORM_BROWSER_CONFIG_REQUEST_FROM_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, Link, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)
391#define FORM_BROWSER_CONFIG_REQUEST_FROM_SAVE_FAIL_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, SaveFailLink, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)
393#define FORM_BROWSER_FORM_SIGNATURE SIGNATURE_32 ('F', 'F', 'R', 'M')
394#define STANDARD_MAP_FORM_TYPE 0x01
401 EFI_STRING_ID FormTitle;
404 EFI_IMAGE_ID ImageId;
417#define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)
419#define FORMSET_DEFAULTSTORE_SIGNATURE SIGNATURE_32 ('F', 'D', 'F', 'S')
426 EFI_STRING_ID DefaultName;
429#define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)
431#define FORM_BROWSER_FORMSET_SIGNATURE SIGNATURE_32 ('F', 'B', 'F', 'S')
443 UINTN IfrBinaryLength;
444 UINT8 *IfrBinaryData;
446 BOOLEAN QuestionInited;
448 EFI_STRING_ID FormSetTitle;
450 UINT8 NumberOfClassGuid;
454 EFI_IMAGE_ID ImageId;
469#define FORM_BROWSER_FORMSET_FROM_LINK(a) CR (a, FORM_BROWSER_FORMSET, Link, FORM_BROWSER_FORMSET_SIGNATURE)
471#define FORM_BROWSER_FORMSET_FROM_SAVE_FAIL_LINK(a) CR (a, FORM_BROWSER_FORMSET, SaveFailLink, FORM_BROWSER_FORMSET_SIGNATURE)
478#define FORM_BROWSER_REFRESH_EVENT_FROM_LINK(a) BASE_CR (a, FORM_BROWSER_REFRESH_EVENT_NODE, Link)
515 BOOLEAN FormEditable;
520#define BROWSER_CONTEXT_SIGNATURE SIGNATURE_32 ('B', 'C', 'T', 'X')
529 BOOLEAN FlagReconnect;
530 BOOLEAN CallbackReconnect;
531 BOOLEAN ResetRequired;
532 BOOLEAN ExitRequired;
538 EFI_QUESTION_ID CurFakeQestId;
539 BOOLEAN HiiPackageListUpdated;
540 BOOLEAN FinishRetrieveCall;
545#define BROWSER_CONTEXT_FROM_LINK(a) CR (a, BROWSER_CONTEXT, Link, BROWSER_CONTEXT_SIGNATURE)
551 GetDefaultForNoStorage,
552 GetDefaultForStorage,
555} BROWSER_GET_DEFAULT_VALUE;
561 GetSetValueWithEditBuffer = 0,
562 GetSetValueWithBuffer,
563 GetSetValueWithHiiDriver,
564 GetSetValueWithBothBuffer,
573extern BOOLEAN gCallbackReconnect;
574extern BOOLEAN gFlagReconnect;
575extern BOOLEAN gResetRequiredFormLevel;
576extern BOOLEAN gResetRequiredSystemLevel;
577extern BOOLEAN gExitRequired;
580extern BROWSER_SETTING_SCOPE gBrowserSettingScope;
587extern CHAR16 *gEmptyString;
590extern BOOLEAN mHiiPackageListUpdated;
591extern UINT16 mCurFakeQestId;
592extern BOOLEAN mFinishRetrieveCall;
660 IN EFI_STRING_ID StringId,
676 IN EFI_STRING_ID Token,
696 IN OUT CHAR16 **Value,
768 IN BROWSER_SETTING_SCOPE SettingScope
844 IN BROWSER_SETTING_SCOPE SettingScope
862 IN BROWSER_SETTING_SCOPE SettingScope
941 IN BROWSER_SETTING_SCOPE SettingScope,
942 IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope,
944 IN BOOLEAN RetrieveValueFirst,
945 IN BOOLEAN SkipGetAltCfg
1001 IN CHAR16 **ConfigResp,
1002 IN CHAR16 *ConfigRequest,
1003 IN BOOLEAN GetEditBuf
1019 IN CHAR16 *ConfigResp
1057 OUT UINT8 **BinaryData
1115 IN UINT16 FormId OPTIONAL,
1117 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
1152 IN OUT EFI_STRING ResultsData,
1153 IN BOOLEAN RetrieveData,
1155 IN CONST CHAR16 *VariableName OPTIONAL
1174 IN BROWSER_SETTING_SCOPE SettingLevel
1225 IN EFI_BROWSER_ACTION Action,
1226 IN BOOLEAN SkipSaveOrDiscard
1292 IN BROWSER_SETTING_SCOPE Scope
1320 IN UINT16 DefaultId,
1321 IN EFI_STRING HelpString OPTIONAL
1513 IN UINT16 QuestionId
1558 IN BROWSER_SETTING_SCOPE SettingLevel
1678 IN EFI_STRING PasswordString OPTIONAL
1751 IN BOOLEAN RespString
1785 IN UINT32 BrowserStatus,
1788 IN CHAR16 *ErrorString
1820 IN EFI_VARSTORE_ID VarStoreId
1865 IN EFI_STRING ConfigString
EFI_STATUS SubmitForm(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope)
EFI_HII_HANDLE DevicePathToHiiHandle(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_GUID *FormsetGuid)
FORMSET_STORAGE * GetFstStgFromBrsStg(IN BROWSER_STORAGE *Storage)
EFI_STATUS CompareHiiValue(IN EFI_HII_VALUE *Value1, IN EFI_HII_VALUE *Value2, OUT INTN *Result, IN EFI_HII_HANDLE HiiHandle OPTIONAL)
EFI_STATUS DiscardForm(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope)
VOID SaveBrowserContext(VOID)
BOOLEAN ConfigRequestAdjust(IN BROWSER_STORAGE *Storage, IN CHAR16 *Request, IN BOOLEAN RespString)
FORM_ENTRY_INFO * UiFindMenuList(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid, IN UINT16 FormId)
EFI_STATUS SetValueByName(IN BROWSER_STORAGE *Storage, IN CHAR16 *Name, IN CHAR16 *Value, IN GET_SET_QUESTION_VALUE_WITH SetValueTo, OUT NAME_VALUE_NODE **ReturnNode)
FORM_BROWSER_STATEMENT * GetBrowserStatement(IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement)
VOID InitializeCurrentSetting(IN OUT FORM_BROWSER_FORMSET *FormSet)
BOOLEAN FindNextMenu(IN OUT UI_MENU_SELECTION *Selection, IN BROWSER_SETTING_SCOPE SettingLevel)
FORM_ENTRY_INFO * UiFindParentMenu(IN FORM_ENTRY_INFO *CurrentMenu, IN BROWSER_SETTING_SCOPE SettingLevel)
VOID InitializeDisplayFormData(VOID)
BOOLEAN IsHiiHandleInBrowserContext(EFI_HII_HANDLE Handle)
BOOLEAN IsNvUpdateRequiredForForm(IN FORM_BROWSER_FORM *Form)
EFI_STATUS LoadFormSetConfig(IN OUT UI_MENU_SELECTION *Selection, IN FORM_BROWSER_FORMSET *FormSet)
EFI_STATUS EFIAPI SetScope(IN BROWSER_SETTING_SCOPE Scope)
EFI_STATUS ValueChangedValidation(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN FORM_BROWSER_STATEMENT *Question)
EFI_STATUS InitializeFormSet(IN EFI_HII_HANDLE Handle, IN OUT EFI_GUID *FormSetGuid, OUT FORM_BROWSER_FORMSET *FormSet)
VOID UpdateStatementStatus(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope)
EFI_STATUS EFIAPI BrowserCallback(IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, IN OUT UINTN *ResultsDataSize, IN OUT EFI_STRING ResultsData, IN BOOLEAN RetrieveData, IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL)
UINT32 EFIAPI SaveReminder(VOID)
EFI_STATUS ParseOpCodes(IN FORM_BROWSER_FORMSET *FormSet)
VOID UiFreeMenuList(LIST_ENTRY *MenuListHead)
VOID LoadStorage(IN FORM_BROWSER_FORMSET *FormSet, IN FORMSET_STORAGE *Storage)
VOID DestroyFormSet(IN OUT FORM_BROWSER_FORMSET *FormSet)
EFI_STATUS ConfigRespToStorage(IN BROWSER_STORAGE *Storage, IN CHAR16 *ConfigResp)
BOOLEAN ValidateFormSet(FORM_BROWSER_FORMSET *FormSet)
VOID InitializeBrowserStrings(VOID)
VOID PasswordInvalid(VOID)
EFI_STATUS PasswordCallback(IN UI_MENU_SELECTION *Selection, IN FORM_BROWSER_STATEMENT *Question, IN CHAR16 *String)
EFI_STATUS DeleteString(IN EFI_STRING_ID StringId, IN EFI_HII_HANDLE HiiHandle)
EFI_STATUS ProcessRetrieveForQuestion(IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess, IN FORM_BROWSER_STATEMENT *Statement, IN FORM_BROWSER_FORMSET *FormSet)
EFI_STATUS GetQuestionDefault(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN FORM_BROWSER_STATEMENT *Question, IN UINT16 DefaultId)
BOOLEAN ReconnectController(IN EFI_HANDLE DriverHandle)
BOOLEAN EFIAPI IsResetRequired(VOID)
CHAR16 * GetToken(IN EFI_STRING_ID Token, IN EFI_HII_HANDLE HiiHandle)
EFI_STATUS SetupBrowser(IN OUT UI_MENU_SELECTION *Selection)
EFI_STATUS ValidateQuestion(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN FORM_BROWSER_STATEMENT *Question, IN UINTN Type)
EFI_STATUS LoadFormConfig(IN OUT UI_MENU_SELECTION *Selection, IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form)
BOOLEAN ValidateHiiHandle(EFI_HII_HANDLE HiiHandle)
EFI_STATUS EFIAPI ExecuteAction(IN UINT32 Action, IN UINT16 DefaultId)
BROWSER_HOT_KEY * GetHotKeyFromRegisterList(IN EFI_INPUT_KEY *KeyData)
VOID EFIAPI HiiToLower(IN EFI_STRING ConfigString)
EFI_STATUS GetIfrBinaryData(IN EFI_HII_HANDLE Handle, IN OUT EFI_GUID *FormSetGuid, OUT UINTN *BinaryLength, OUT UINT8 **BinaryData)
EFI_STATUS EFIAPI SendForm(IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, IN EFI_HII_HANDLE *Handles, IN UINTN HandleCount, IN EFI_GUID *FormSetGuid OPTIONAL, IN UINT16 FormId OPTIONAL, IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions OPTIONAL, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL)
FORM_BROWSER_FORMSET * GetFormSetFromHiiHandle(EFI_HII_HANDLE Handle)
EFI_STATUS ProcessCallBackFunction(IN OUT UI_MENU_SELECTION *Selection, IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN FORM_BROWSER_STATEMENT *Question, IN EFI_BROWSER_ACTION Action, IN BOOLEAN SkipSaveOrDiscard)
EFI_STATUS GetValueByName(IN BROWSER_STORAGE *Storage, IN CHAR16 *Name, IN OUT CHAR16 **Value, IN GET_SET_QUESTION_VALUE_WITH GetValueFrom)
EFI_STATUS ExtractDefault(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN UINT16 DefaultId, IN BROWSER_SETTING_SCOPE SettingScope, IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope, IN BROWSER_STORAGE *Storage, IN BOOLEAN RetrieveValueFirst, IN BOOLEAN SkipGetAltCfg)
UINT64 GetArrayData(IN VOID *Array, IN UINT8 Type, IN UINTN Index)
EFI_STATUS EFIAPI PasswordCheck(IN FORM_DISPLAY_ENGINE_FORM *Form, IN FORM_DISPLAY_ENGINE_STATEMENT *Statement, IN EFI_STRING PasswordString OPTIONAL)
FORMSET_STORAGE * GetFstStgFromVarId(IN FORM_BROWSER_FORMSET *FormSet, IN EFI_VARSTORE_ID VarStoreId)
GET_SET_QUESTION_VALUE_WITH
UINT32 PopupErrorMessage(IN UINT32 BrowserStatus, IN EFI_HII_HANDLE HiiHandle, IN EFI_IFR_OP_HEADER *OpCode OPTIONAL, IN CHAR16 *ErrorString)
VOID SetArrayData(IN VOID *Array, IN UINT8 Type, IN UINTN Index, IN UINT64 Value)
QUESTION_OPTION * ValueToOption(IN FORM_BROWSER_STATEMENT *Question, IN EFI_HII_VALUE *OptionValue)
FORM_ENTRY_INFO * UiAddMenuList(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid, IN UINT16 FormId, IN UINT16 QuestionId)
EFI_STATUS StorageToConfigResp(IN BROWSER_STORAGE *Storage, IN CHAR16 **ConfigResp, IN CHAR16 *ConfigRequest, IN BOOLEAN GetEditBuf)
BOOLEAN EFIAPI IsBrowserDataModified(VOID)
BOOLEAN IsNvUpdateRequiredForFormSet(IN FORM_BROWSER_FORMSET *FormSet)
VOID EFIAPI RegiserExitHandler(IN EXIT_HANDLER Handler)
VOID CleanBrowserStorage(IN OUT FORM_BROWSER_FORMSET *FormSet)
BOOLEAN IsQuestionValueChanged(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH GetValueFrom)
VOID FreeBrowserStrings(VOID)
EFI_STATUS SetQuestionValue(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH SetValueTo)
BOOLEAN IsTrue(IN EFI_HII_VALUE *Result)
EFI_STATUS GetQuestionValue(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH GetValueFrom)
EFI_STRING_ID NewString(IN CHAR16 *String, IN EFI_HII_HANDLE HiiHandle)
VOID RestoreBrowserContext(VOID)
EFI_STATUS EFIAPI RegisterHotKey(IN EFI_INPUT_KEY *KeyData, IN UINT32 Action, IN UINT16 DefaultId, IN EFI_STRING HelpString OPTIONAL)
VOID UiCopyMenuList(OUT LIST_ENTRY *NewMenuListHead, IN LIST_ENTRY *CurrentMenuListHead)