TianoCore EDK2 master
|
#include <Uefi.h>
#include <Protocol/UnicodeCollation.h>
#include <Protocol/HiiConfigRouting.h>
#include <Protocol/HiiDatabase.h>
#include <Protocol/UserManager.h>
#include <Protocol/DevicePathFromText.h>
#include <Protocol/RegularExpressionProtocol.h>
#include <Guid/MdeModuleHii.h>
#include <Guid/ZeroGuid.h>
#include <Guid/HiiPlatformSetupFormset.h>
#include <Guid/HiiFormMapMethodGuid.h>
#include <Library/PrintLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/HiiLib.h>
#include <Library/DevicePathLib.h>
#include <Library/UefiLib.h>
#include "HiiExpression.h"
#include <Library/HiiUtilityLib.h>
Go to the source code of this file.
Data Structures | |
struct | HII_FORM_CONFIG_REQUEST |
Definition of HII_FORM_CONFIG_REQUEST. More... | |
Macros | |
#define | EXPRESSION_STACK_SIZE_INCREMENT 0x100 |
#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)) |
#define | HII_FORM_CONFIG_REQUEST_SIGNATURE SIGNATURE_32 ('F', 'C', 'R', 'S') |
#define | HII_FORM_CONFIG_REQUEST_FROM_LINK(a) CR (a, HII_FORM_CONFIG_REQUEST, Link, HII_FORM_CONFIG_REQUEST_SIGNATURE) |
#define | CONFIG_REQUEST_STRING_INCREMENTAL 1024 |
HII internal header file.
Copyright (c) 2019, Intel Corporation. All rights reserved.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HiiInternal.h.
#define CONFIG_REQUEST_STRING_INCREMENTAL 1024 |
Incremental string length of ConfigRequest
Definition at line 68 of file HiiInternal.h.
#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)) |
Definition at line 43 of file HiiInternal.h.
#define EXPRESSION_STACK_SIZE_INCREMENT 0x100 |
Definition at line 42 of file HiiInternal.h.
#define HII_FORM_CONFIG_REQUEST_FROM_LINK | ( | a | ) | CR (a, HII_FORM_CONFIG_REQUEST, Link, HII_FORM_CONFIG_REQUEST_SIGNATURE) |
Definition at line 63 of file HiiInternal.h.
#define HII_FORM_CONFIG_REQUEST_SIGNATURE SIGNATURE_32 ('F', 'C', 'R', 'S') |
Definition at line 62 of file HiiInternal.h.
EFI_STATUS BufferToQuestionValue | ( | IN HII_STATEMENT * | Question, |
IN CHAR16 * | Value, | ||
OUT HII_STATEMENT_VALUE * | QuestionValue | ||
) |
Convert the buffer value to HiiValue.
[in] | Question | The question. |
[in] | Value | Unicode buffer save the question value. |
[out] | QuestionValue | The Question Value retrieved from Buffer. |
Status | whether convert the value success. |
Definition at line 178 of file HiiUtilityInternal.c.
EFI_STATUS ConfigRespToStorage | ( | IN HII_FORMSET_STORAGE * | Storage, |
IN CHAR16 * | ConfigResp | ||
) |
Convert <ConfigResp> to settings in Buffer Storage or NameValue Storage.
[in] | Storage | The Storage to receive the settings. |
[in] | ConfigResp | The <ConfigResp> to be converted. |
EFI_SUCCESS | Convert success. |
EFI_INVALID_PARAMETER | Incorrect storage type. |
Definition at line 679 of file HiiUtilityInternal.c.
VOID DestroyForm | ( | IN HII_FORMSET * | FormSet, |
IN OUT HII_FORM * | Form | ||
) |
Free resources of a Form.
[in] | FormSet | Pointer of the FormSet |
[in,out] | Form | Pointer of the Form. |
Definition at line 798 of file HiiIfrParse.c.
VOID ExtendValueToU64 | ( | IN HII_STATEMENT_VALUE * | Value | ) |
Zero extend integer/boolean/date/time to UINT64 for comparing.
[in] | Value | HII Value to be converted. |
Definition at line 1294 of file HiiUtilityInternal.c.
VOID GetBitsQuestionValue | ( | IN HII_STATEMENT * | Question, |
IN UINT8 * | Buffer, | ||
OUT HII_STATEMENT_VALUE * | QuestionValue | ||
) |
Get bit field value from the buffer and then set the value for the question. Note: Data type UINT32 can cover all the bit field value.
[in] | Question | The question refer to bit field. |
[in] | Buffer | Point to the buffer which the question value get from. |
[out] | QuestionValue | The Question Value retrieved from Bits. |
Definition at line 112 of file HiiUtilityInternal.c.
HII_FORMSET_STORAGE * GetFstStgFromVarId | ( | IN HII_FORMSET * | FormSet, |
IN EFI_VARSTORE_ID | VarStoreId | ||
) |
Get formset storage based on the input varstoreid info.
[in] | FormSet | Pointer of the current FormSet. |
[in] | VarStoreId | Varstore ID info. |
Definition at line 417 of file HiiIfrParse.c.
EFI_STATUS GetIfrBinaryData | ( | IN EFI_HII_HANDLE | Handle, |
IN OUT EFI_GUID * | FormSetGuid, | ||
OUT UINTN * | BinaryLength, | ||
OUT UINT8 ** | BinaryData | ||
) |
Fetch the Ifr binary data of a FormSet.
[in] | Handle | PackageList Handle |
[in,out] | FormSetGuid | On input, GUID or class GUID of a formset. If not specified (NULL or zero GUID), take the first FormSet with class GUID EFI_HII_PLATFORM_SETUP_FORMSET_GUID found in package list. On output, GUID of the formset found(if not NULL). |
[out] | BinaryLength | The length of the FormSet IFR binary. |
[out] | BinaryData | The buffer designed to receive the FormSet. |
EFI_SUCCESS | Buffer filled with the requested FormSet. BufferLength was updated. |
EFI_INVALID_PARAMETER | The handle is unknown. |
EFI_NOT_FOUND | A form or FormSet on the requested handle cannot be found with the requested FormId. |
Fetch the Ifr binary data of a FormSet.
Handle | PackageList Handle |
FormSetGuid | On input, GUID or class GUID of a formset. If not specified (NULL or zero GUID), take the first FormSet with class GUID EFI_HII_PLATFORM_SETUP_FORMSET_GUID found in package list. On output, GUID of the formset found(if not NULL). |
BinaryLength | The length of the FormSet IFR binary. |
BinaryData | The buffer designed to receive the FormSet. |
EFI_SUCCESS | Buffer filled with the requested FormSet. BufferLength was updated. |
EFI_INVALID_PARAMETER | The handle is unknown. |
EFI_NOT_FOUND | A form or FormSet on the requested handle cannot be found with the requested FormId. |
CHAR16 * GetTokenString | ( | IN EFI_STRING_ID | Token, |
IN EFI_HII_HANDLE | HiiHandle | ||
) |
Get the string based on the StringId and HII Package List Handle.
[in] | Token | The String's ID. |
[in] | HiiHandle | The package list in the HII database to search for the specified string. |
Definition at line 313 of file HiiUtilityInternal.c.
VOID EFIAPI HiiStringToLowercase | ( | IN EFI_STRING | ConfigString | ) |
Converts the unicode character of the string from uppercase to lowercase. This is a internal function.
[in] | ConfigString | String to be converted |
Definition at line 344 of file HiiUtilityInternal.c.
BOOLEAN IsHiiValueTrue | ( | IN EFI_HII_VALUE * | Result | ) |
Evaluate if the result is a non-zero value.
[in] | Result | The result to be evaluated. |
TRUE | It is a non-zero value. |
FALSE | It is a zero value. |
Definition at line 375 of file HiiUtilityInternal.c.
VOID LoadFormSetStorage | ( | IN HII_FORMSET * | FormSet, |
IN HII_FORMSET_STORAGE * | Storage | ||
) |
Fill storage with settings requested from Configuration Driver.
[in] | FormSet | FormSet data structure. |
[in] | Storage | Buffer Storage. |
Definition at line 1161 of file HiiUtilityInternal.c.
EFI_STRING_ID NewHiiString | ( | IN CHAR16 * | String, |
IN EFI_HII_HANDLE | HiiHandle | ||
) |
Set a new string to string package.
[in] | String | A pointer to the Null-terminated Unicode string to add or update in the String Package associated with HiiHandle. |
[in] | HiiHandle | A handle that was previously registered in the HII Database. |
Definition at line 413 of file HiiUtilityInternal.c.
Allocate new memory and then copy the Unicode string Source to Destination.
[in,out] | Dest | Location to copy string |
[in] | Src | String to copy |
Definition at line 36 of file HiiUtilityInternal.c.
EFI_STATUS NoSubmitCheck | ( | IN HII_FORMSET * | FormSet, |
IN OUT HII_FORM ** | CurrentForm, | ||
OUT HII_STATEMENT ** | Statement | ||
) |
Perform NoSubmit check for each Form in FormSet.
[in] | FormSet | FormSet data structure. |
[in,out] | CurrentForm | Current input form data structure. |
[out] | Statement | The statement for this check. |
EFI_SUCCESS | Form validation pass. |
other | Form validation failed. |
Definition at line 482 of file HiiUtilityInternal.c.
EFI_STATUS ParseOpCodes | ( | IN HII_FORMSET * | FormSet | ) |
Parse opcodes in the formset IFR binary.
[in] | FormSet | Pointer of the FormSet data structure. |
EFI_SUCCESS | Opcode parse success. |
Other | Opcode parse fail. |
Definition at line 985 of file HiiIfrParse.c.
VOID SetBitsQuestionValue | ( | IN HII_STATEMENT * | Question, |
IN OUT UINT8 * | Buffer, | ||
IN UINT32 | Value | ||
) |
Set bit field value to the buffer. Note: Data type UINT32 can cover all the bit field value.
[in] | Question | The question refer to bit field. |
[in,out] | Buffer | Point to the buffer which the question value set to. |
[in] | Value | The bit field value need to set. |
Definition at line 148 of file HiiUtilityInternal.c.
EFI_STATUS SetValueByName | ( | IN HII_FORMSET_STORAGE * | Storage, |
IN CHAR16 * | Name, | ||
IN CHAR16 * | Value, | ||
OUT HII_NAME_VALUE_NODE ** | ReturnNode | ||
) |
Set Value of given Name in a NameValue Storage.
[in] | Storage | The NameValue Storage. |
[in] | Name | The Name. |
[in] | Value | The Value to set. |
[out] | ReturnNode | The node use the input name. |
EFI_SUCCESS | Value found for given Name. |
EFI_NOT_FOUND | No such Name found in NameValue storage. |
Definition at line 61 of file HiiUtilityInternal.c.
EFI_STATUS StorageToConfigResp | ( | IN HII_FORMSET_STORAGE * | Storage, |
IN CHAR16 ** | ConfigResp, | ||
IN CHAR16 * | ConfigRequest | ||
) |
Convert setting of Buffer Storage or NameValue Storage to <ConfigResp>.
[in] | Storage | The Storage to be converted. |
[in] | ConfigResp | The returned <ConfigResp>. |
[in] | ConfigRequest | The ConfigRequest string. |
EFI_SUCCESS | Convert success. |
EFI_INVALID_PARAMETER | Incorrect storage type. |
Definition at line 572 of file HiiUtilityInternal.c.
EFI_STATUS ValidateNoSubmit | ( | IN HII_FORMSET * | FormSet, |
IN HII_FORM * | Form, | ||
IN HII_STATEMENT * | Question | ||
) |
Perform nosubmitif check for a Form.
[in] | FormSet | FormSet data structure. |
[in] | Form | Form data structure. |
[in] | Question | The Question to be validated. |
EFI_SUCCESS | Form validation pass. |
other | Form validation failed. |
Definition at line 436 of file HiiUtilityInternal.c.