TianoCore EDK2 master
|
#include "HiiInternal.h"
Go to the source code of this file.
Variables | |
CHAR16 * | mUnknownString = L"!" |
CHAR16 * | gEmptyString = L"" |
EFI_HII_VALUE * | mExpressionEvaluationStack = NULL |
EFI_HII_VALUE * | mExpressionEvaluationStackEnd = NULL |
EFI_HII_VALUE * | mExpressionEvaluationStackPointer = NULL |
UINTN | mExpressionEvaluationStackOffset = 0 |
EFI_UNICODE_COLLATION_PROTOCOL * | mUnicodeCollation = NULL |
EFI_USER_MANAGER_PROTOCOL * | mUserManager = NULL |
HII utility internal functions.
Copyright (c) 2019, Intel Corporation. All rights reserved.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HiiUtilityInternal.c.
VOID AppendConfigRequest | ( | IN OUT CHAR16 ** | ConfigRequest, |
IN OUT UINTN * | SpareStrLen, | ||
IN CHAR16 * | RequestElement | ||
) |
Append the Request element to the Config Request.
ConfigRequest | Current ConfigRequest info. |
SpareStrLen | Current remain free buffer for config request. |
RequestElement | New Request element. |
Definition at line 976 of file HiiUtilityInternal.c.
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.
Check if current user has the privilege specified by the permissions GUID.
[in] | Guid | A GUID specifying setup access permissions. |
TRUE | Current user has the privilege. |
FALSE | Current user does not have the privilege. |
If the system does not support user management, then it is assumed that all users have admin privilege and evaluation of each EFI_IFR_SECURITY op-code is always TRUE.
Enumerate all user information of the current user profile to look for any EFI_USER_INFO_ACCESS_SETUP record.
Check if current user has the privilege specified by the permissions GUID.
Definition at line 2122 of file HiiUtilityInternal.c.
EFI_STATUS CompareHiiValue | ( | IN EFI_HII_VALUE * | Value1, |
IN EFI_HII_VALUE * | Value2, | ||
OUT INTN * | Result, | ||
IN EFI_HII_HANDLE HiiHandle | OPTIONAL | ||
) |
Compare two Hii value.
[in] | Value1 | Expression value to compare on left-hand. |
[in] | Value2 | Expression value to compare on right-hand. |
[out] | Result | Return value after compare. retval 0 Two operators equal. return Positive value if Value1 is greater than Value2. retval Negative value if Value1 is less than Value2. |
[in] | HiiHandle | Only required for string compare. |
other | Could not perform compare on two values. |
EFI_SUCCESS | Compare the value success. |
EFI_INVALID_PARAMETER | Value1, Value2 or Result is NULL. |
Definition at line 2017 of file HiiUtilityInternal.c.
BOOLEAN ConfigRequestAdjust | ( | IN HII_FORMSET_STORAGE * | Storage, |
IN CHAR16 * | Request, | ||
IN BOOLEAN | RespString | ||
) |
Adjust the config request info, remove the request elements which already in AllConfigRequest string.
Storage | Form set Storage. |
Request | The input request string. |
RespString | Whether the input is ConfigRequest or ConfigResp format. |
TRUE | Has element not covered by current used elements, need to continue to call ExtractConfig |
FALSE | All elements covered by current used elements. |
Definition at line 1031 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.
EFI_STATUS CreateFormSetFromHiiHandle | ( | IN EFI_HII_HANDLE | Handle, |
IN OUT EFI_GUID * | FormSetGuid, | ||
OUT HII_FORMSET * | FormSet | ||
) |
Initialize the internal data structure 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] | FormSet | FormSet data structure. |
EFI_SUCCESS | The function completed successfully. |
EFI_NOT_FOUND | The specified FormSet could not be found. |
Initialize the internal data structure 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). |
FormSet | FormSet data structure. |
EFI_SUCCESS | The function completed successfully. |
EFI_NOT_FOUND | The specified FormSet could not be found. |
Definition at line 30 of file HiiUtilityLib.c.
EFI_HII_HANDLE DevicePathToHiiHandle | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, |
IN EFI_GUID * | FormsetGuid | ||
) |
Find HII Handle in the HII database associated with given Device Path.
If DevicePath is NULL, then ASSERT.
[in] | DevicePath | Device Path associated with the HII package list handle. |
[in] | FormsetGuid | The formset guid for this formset. |
Handle | HII package list Handle associated with the Device Path. |
NULL | Hii Package list handle is not found. |
Definition at line 3625 of file HiiUtilityInternal.c.
BOOLEAN ElementValidation | ( | IN HII_FORMSET_STORAGE * | Storage, |
IN CHAR16 * | RequestElement | ||
) |
Check if the requested element is in storage.
Storage | The storage contains elements. |
RequestElement | The element to be searched. |
Definition at line 959 of file HiiUtilityInternal.c.
EFI_STATUS EvaluateHiiExpression | ( | IN HII_FORMSET * | FormSet, |
IN HII_FORM * | Form, | ||
IN OUT HII_EXPRESSION * | Expression | ||
) |
Evaluate the result of a HII expression.
If Expression is NULL, then ASSERT.
[in] | FormSet | FormSet associated with this expression. |
[in] | Form | Form associated with this expression. |
[in,out] | Expression | Expression to be evaluated. |
EFI_SUCCESS | The expression evaluated successfully. |
EFI_NOT_FOUND | The Question which referenced by a QuestionId could not be found. |
EFI_OUT_OF_RESOURCES | There is not enough system memory to grow the stack. |
EFI_ACCESS_DENIED | The pop operation underflowed the stack. |
EFI_INVALID_PARAMETER | Syntax error with the Expression. |
EFI_INVALID_PARAMETER | Formset, Form or Expression is NULL. |
Definition at line 3912 of file HiiUtilityInternal.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.
UINT8 * GetBufferForValue | ( | IN EFI_HII_VALUE * | Value | ) |
Return the buffer pointer for this value.
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare.
[in] | Value | Expression value to compare on. |
Buf | Return the buffer pointer. |
Definition at line 1882 of file HiiUtilityInternal.c.
Get default Id value used for browser.
[in] | DefaultId | The default id value used by hii. |
Browser | used default value. |
Definition at line 5391 of file HiiUtilityInternal.c.
EFI_STATUS GetDefaultValueFromAltCfg | ( | IN HII_FORMSET * | FormSet, |
IN HII_FORM * | Form, | ||
IN HII_STATEMENT * | Question, | ||
OUT HII_STATEMENT_VALUE * | DefaultValue | ||
) |
Get Question default value from AltCfg string.
[in] | FormSet | The form set. |
[in] | Form | The form |
[in] | Question | The question. |
[out] | DefaultValue | Default value. |
EFI_SUCCESS | Question is reset to default value. |
Definition at line 5336 of file HiiUtilityInternal.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. |
Definition at line 781 of file HiiUtilityInternal.c.
UINT16 GetLengthForValue | ( | IN EFI_HII_VALUE * | Value | ) |
Return the buffer length for this value.
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare.
[in] | Value | Expression value to compare on. |
BufLen | Return the buffer length. |
Definition at line 1920 of file HiiUtilityInternal.c.
CHAR16 * GetOffsetFromConfigResp | ( | IN HII_STATEMENT * | Question, |
IN CHAR16 * | ConfigResp | ||
) |
Find the point in the ConfigResp string for this question.
[in] | Question | The question. |
[in] | ConfigResp | Get ConfigResp string. |
point | to the offset where is for this question. |
Definition at line 5261 of file HiiUtilityInternal.c.
EFI_STATUS GetQuestionDefault | ( | IN HII_FORMSET * | FormSet, |
IN HII_FORM * | Form, | ||
IN HII_STATEMENT * | Question, | ||
IN UINT16 | DefaultId, | ||
OUT HII_STATEMENT_VALUE * | DefaultValue | ||
) |
Get default value of question.
[in] | FormSet | The form set. |
[in] | Form | The form. |
[in] | Question | The question. |
[in] | DefaultId | The Class of the default. |
[out] | DefaultValue | The default value of given question. |
EFI_SUCCESS | Question is reset to default value. |
Definition at line 5425 of file HiiUtilityInternal.c.
EFI_STATUS GetQuestionValue | ( | IN HII_FORMSET * | FormSet, |
IN HII_FORM * | Form, | ||
IN OUT HII_STATEMENT * | Question, | ||
IN GET_SET_QUESTION_VALUE_WITH | GetValueFrom | ||
) |
Get Question's current Value.
[in] | FormSet | FormSet data structure. |
[in] | Form | Form data structure. |
[in,out] | Question | Question to be initialized. |
[in] | GetValueFrom | Where to get value, may from editbuffer, buffer or hii driver. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Formset, Form or Question is NULL. |
Definition at line 1460 of file HiiUtilityInternal.c.
BOOLEAN GetQuestionValueFromForm | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, |
IN EFI_HII_HANDLE | InputHiiHandle, | ||
IN EFI_GUID * | FormSetGuid, | ||
IN EFI_QUESTION_ID | QuestionId, | ||
OUT EFI_HII_VALUE * | Value | ||
) |
Get question value from the predefined formset.
[in] | DevicePath | The driver's device path which produce the formset data. |
[in] | InputHiiHandle | The hii handle associate with the formset data. |
[in] | FormSetGuid | The formset guid which include the question. |
[in] | QuestionId | The question id which need to get value from. |
[out] | Value | The return data about question's value. |
TRUE | Get the question value success. |
FALSE | Get the question value failed. |
Definition at line 3715 of file HiiUtilityInternal.c.
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.
EFI_STATUS GetValueByName | ( | IN HII_FORMSET_STORAGE * | Storage, |
IN CHAR16 * | Name, | ||
IN OUT CHAR16 ** | Value | ||
) |
Get Value for given Name from a NameValue Storage.
[in] | Storage | The NameValue Storage. |
[in] | Name | The Name. |
[in,out] | Value | The returned Value. |
EFI_SUCCESS | Value found for given Name. |
EFI_NOT_FOUND | No such Name found in NameValue storage. |
EFI_INVALID_PARAMETER | Storage or Value is NULL. |
Definition at line 1417 of file HiiUtilityInternal.c.
EFI_STATUS HiiStatementValueToHiiValue | ( | IN HII_STATEMENT_VALUE * | StatementValue, |
OUT EFI_HII_VALUE * | HiiValue | ||
) |
Covert HII_STATEMENT_VALUE to EFI_HII_VALUE.
The HiiValue->Buffer is allocated from EFI boot services memory. It is the responsibility of the caller to free the memory allocated.
[in] | StatementValue | Source to be converted. |
[out] | HiiValue | The buffer that is converted from StatementValue |
EFI_SUCCESS | Convert successfully. |
EFI_INVALID_PARAMETER | StatementValue is NULL or HiiValue is NULL. |
Definition at line 3842 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.
UINT64 HiiValueToUINT64 | ( | IN EFI_HII_VALUE * | Value | ) |
Get UINT64 type value.
[in] | Value | Input Hii value. |
UINT64 | Return the UINT64 type value. |
Definition at line 1955 of file HiiUtilityInternal.c.
EFI_STATUS IfrCatenate | ( | IN HII_FORMSET * | FormSet, |
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_CATENATE.
[in] | FormSet | Formset which contains this opcode. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 2606 of file HiiUtilityInternal.c.
EFI_STATUS IfrFind | ( | IN HII_FORMSET * | FormSet, |
IN UINT8 | Format, | ||
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_FIND.
[in] | FormSet | Formset which contains this opcode. |
[in] | Format | Case sensitive or insensitive. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 2984 of file HiiUtilityInternal.c.
EFI_STATUS IfrMatch | ( | IN HII_FORMSET * | FormSet, |
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_MATCH.
[in] | FormSet | Formset which contains this opcode. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 2724 of file HiiUtilityInternal.c.
EFI_STATUS IfrMatch2 | ( | IN HII_FORMSET * | FormSet, |
IN EFI_GUID * | SyntaxType, | ||
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_MATCH2.
[in] | FormSet | Formset which contains this opcode. |
[in] | SyntaxType | Syntax type for match2. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 2798 of file HiiUtilityInternal.c.
EFI_STATUS IfrMid | ( | IN HII_FORMSET * | FormSet, |
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_MID.
[in] | FormSet | Formset which contains this opcode. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 3087 of file HiiUtilityInternal.c.
EFI_STATUS IfrSpan | ( | IN HII_FORMSET * | FormSet, |
IN UINT8 | Flags, | ||
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_SPAN.
[in] | FormSet | Formset which contains this opcode. |
[in] | Flags | FIRST_MATCHING or FIRST_NON_MATCHING. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 3314 of file HiiUtilityInternal.c.
VOID IfrStrToUpper | ( | IN CHAR16 * | String | ) |
Convert the input Unicode character to upper.
[in] | String | Th Unicode character to be converted. |
Definition at line 1789 of file HiiUtilityInternal.c.
EFI_STATUS IfrToken | ( | IN HII_FORMSET * | FormSet, |
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_TOKEN.
[in] | FormSet | Formset which contains this opcode. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 3194 of file HiiUtilityInternal.c.
EFI_STATUS IfrToString | ( | IN HII_FORMSET * | FormSet, |
IN UINT8 | Format, | ||
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_TO_STRING.
[in] | FormSet | Formset which contains this opcode. |
[in] | Format | String format in EFI_IFR_TO_STRING. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 2417 of file HiiUtilityInternal.c.
EFI_STATUS IfrToUint | ( | IN HII_FORMSET * | FormSet, |
OUT EFI_HII_VALUE * | Result | ||
) |
Evaluate opcode EFI_IFR_TO_UINT.
[in] | FormSet | Formset which contains this opcode. |
[out] | Result | Evaluation result for this opcode. |
EFI_SUCCESS | Opcode evaluation success. |
Other | Opcode evaluation failed. |
Definition at line 2527 of file HiiUtilityInternal.c.
VOID InitializeFormSet | ( | IN OUT HII_FORMSET * | FormSet | ) |
Initialize a Formset and get current setting for Questions.
[in,out] | FormSet | FormSet data structure. |
Initialize a Formset and get current setting for Questions.
FormSet | FormSet data structure. |
Definition at line 114 of file HiiUtilityLib.c.
EFI_STATUS InitializeUnicodeCollationProtocol | ( | VOID | ) |
Locate the Unicode Collation Protocol interface for later use.
EFI_SUCCESS | Protocol interface initialize success. |
Other | Protocol interface initialize failed. |
Definition at line 3472 of file HiiUtilityInternal.c.
BOOLEAN IsFormsetGuidInHiiHandle | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN EFI_GUID * | FormSetGuid | ||
) |
Check whether the formset guid is in this Hii package list.
[in] | HiiHandle | The HiiHandle for this HII package list. |
[in] | FormSetGuid | The formset guid for the request formset. |
TRUE | Find the formset guid. |
FALSE | Not found the formset guid. |
Definition at line 3506 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.
BOOLEAN IsTypeInBuffer | ( | IN EFI_HII_VALUE * | Value | ) |
Check whether this value type can be transfer to EFI_IFR_TYPE_BUFFER type.
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare.
[in] | Value | Expression value to compare on. |
TRUE | This value type can be transferred to EFI_IFR_TYPE_BUFFER type. |
FALSE | This value type can't be transferred to EFI_IFR_TYPE_BUFFER type. |
Definition at line 1819 of file HiiUtilityInternal.c.
BOOLEAN IsTypeInUINT64 | ( | IN EFI_HII_VALUE * | Value | ) |
Check whether this value type can be transfer to EFI_IFR_TYPE_UINT64
[in] | Value | Expression value to compare on. |
TRUE | This value type can be transferred to EFI_IFR_TYPE_BUFFER type. |
FALSE | This value type can't be transferred to EFI_IFR_TYPE_BUFFER type. |
Definition at line 1849 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 concatenate Source on the end of Destination.
Dest | String to added to the end of. |
Src | String to concatenate. |
Definition at line 534 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 PopExpression | ( | OUT EFI_HII_VALUE * | Value | ) |
Pop an Expression value from the stack.
[out] | Value | Expression value to pop. |
EFI_SUCCESS | The value was popped onto the stack. |
EFI_ACCESS_DENIED | The pop operation underflowed the stack |
EFI_INVALID_PARAMETER | Value is NULL. |
Definition at line 2359 of file HiiUtilityInternal.c.
EFI_STATUS PopStack | ( | IN EFI_HII_VALUE * | Stack, |
IN OUT EFI_HII_VALUE ** | StackPtr, | ||
OUT EFI_HII_VALUE * | Data | ||
) |
Pop an element from the stack.
Stack | On input: old stack |
StackPtr | On input: old stack pointer; On output: new stack pointer |
Data | Data to pop. |
EFI_SUCCESS | The value was popped onto the stack. |
EFI_ACCESS_DENIED | The pop operation underflowed the stack |
Definition at line 170 of file Expression.c.
EFI_STATUS PushExpression | ( | IN EFI_HII_VALUE * | Value | ) |
Push an Expression value onto the Stack
[in] | Value | Expression value to push. |
EFI_SUCCESS | The value was pushed onto the stack. |
EFI_OUT_OF_RESOURCES | There is not enough system memory to grow the stack. |
EFI_INVALID_PARAMETER | Value is NULL. |
Definition at line 2332 of file HiiUtilityInternal.c.
EFI_STATUS PushStack | ( | IN OUT EFI_HII_VALUE ** | Stack, |
IN OUT EFI_HII_VALUE ** | StackPtr, | ||
IN OUT EFI_HII_VALUE ** | StackEnd, | ||
IN EFI_HII_VALUE * | Data | ||
) |
Push an element onto the Boolean Stack.
Stack | On input: old stack; On output: new stack |
StackPtr | On input: old stack pointer; On output: new stack pointer |
StackEnd | On input: old stack end; On output: new stack end |
Data | Data to push. |
EFI_SUCCESS | Push stack success. |
Definition at line 122 of file Expression.c.
HII_STATEMENT * QuestionIdInForm | ( | IN HII_FORM * | Form, |
IN UINT16 | QuestionId | ||
) |
Search a Question in Form scope using its QuestionId.
[in] | Form | The form which contains this Question. |
[in] | QuestionId | Id of this Question. |
Pointer | The Question. |
NULL | Specified Question not found in the form. |
Definition at line 2232 of file HiiUtilityInternal.c.
HII_STATEMENT * QuestionIdInFormset | ( | IN HII_FORMSET * | FormSet, |
IN HII_FORM * | Form, | ||
IN UINT16 | QuestionId | ||
) |
Search a Question in Formset scope using its QuestionId.
[in] | FormSet | The formset which contains this form. |
[in] | Form | The form which contains this Question. |
[in] | QuestionId | Id of this Question. |
Pointer | The Question. |
NULL | Specified Question not found in the form. |
Definition at line 2273 of file HiiUtilityInternal.c.
EFI_STATUS ReleaseHiiValue | ( | IN EFI_HII_VALUE * | HiiValue | ) |
Release the buffer in EFI_HII_VALUE if the buffer is not NULL.
[in] | HiiValue | The buffer to be released. |
EFI_SUCCESS | release HiiValue successfully. |
EFI_INVALID_PARAMETER | HiiValue is NULL. |
Definition at line 3874 of file HiiUtilityInternal.c.
VOID RestoreExpressionEvaluationStackOffset | ( | UINTN | StackOffset | ) |
Restore stack offset based on input stack offset
[in] | StackOffset | Offset to stack start. |
Definition at line 2398 of file HiiUtilityInternal.c.
HII_EXPRESSION * RuleIdToExpression | ( | IN HII_FORM * | Form, |
IN UINT8 | RuleId | ||
) |
Get Expression given its RuleId.
[in] | Form | The form which contains this Expression. |
[in] | RuleId | Id of this Expression. |
Pointer | The Expression. |
NULL | Specified Expression not found in the form. |
Definition at line 3438 of file HiiUtilityInternal.c.
UINTN SaveExpressionEvaluationStackOffset | ( | VOID | ) |
Get current stack offset from stack start.
Definition at line 2380 of file HiiUtilityInternal.c.
Set value of a data element in an Array by its Index.
[in] | Array | The data array. |
[in] | Type | Type of the data in this array. |
[in] | Index | Zero based index for data in this array. |
[in] | Value | The value to be set. |
Definition at line 5166 of file HiiUtilityInternal.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.
HII_QUESTION_OPTION * ValueToOption | ( | IN HII_STATEMENT * | Question, |
IN HII_STATEMENT_VALUE * | OptionValue | ||
) |
Search an Option of a Question by its value.
[in] | Question | The Question |
[in] | OptionValue | Value for Option to be searched. |
Pointer | Pointer to the found Option. |
NULL | Option not found. |
Definition at line 5208 of file HiiUtilityInternal.c.
CHAR16* gEmptyString = L"" |
Definition at line 15 of file HiiUtilityInternal.c.
EFI_HII_VALUE* mExpressionEvaluationStack = NULL |
Definition at line 17 of file HiiUtilityInternal.c.
EFI_HII_VALUE* mExpressionEvaluationStackEnd = NULL |
Definition at line 18 of file HiiUtilityInternal.c.
UINTN mExpressionEvaluationStackOffset = 0 |
Definition at line 20 of file HiiUtilityInternal.c.
EFI_HII_VALUE* mExpressionEvaluationStackPointer = NULL |
Definition at line 19 of file HiiUtilityInternal.c.
EFI_UNICODE_COLLATION_PROTOCOL* mUnicodeCollation = NULL |
Definition at line 25 of file HiiUtilityInternal.c.
CHAR16* mUnknownString = L"!" |
Definition at line 14 of file HiiUtilityInternal.c.
EFI_USER_MANAGER_PROTOCOL* mUserManager = NULL |
Definition at line 26 of file HiiUtilityInternal.c.