TianoCore EDK2 master
|
#include "HiiInternal.h"
Go to the source code of this file.
The implementation of HII IFR parser.
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 HiiIfrParse.c.
Convert Ascii string to Unicode.
This is an internal function.
[in] | AsciiString | The Ascii string to be converted. |
[out] | UnicodeString | The Unicode string retrieved. |
Definition at line 297 of file HiiIfrParse.c.
VOID CountOpCodes | ( | IN HII_FORMSET * | FormSet, |
IN OUT UINT16 * | NumberOfStatement, | ||
IN OUT UINT16 * | NumberOfExpression | ||
) |
Calculate number of Statements(Questions) and Expression OpCodes.
[in] | FormSet | The FormSet to be counted. |
[in,out] | NumberOfStatement | Number of Statements(Questions) |
[in,out] | NumberOfExpression | Number of Expression OpCodes |
Definition at line 943 of file HiiIfrParse.c.
HII_EXPRESSION * CreateExpression | ( | IN OUT HII_FORM * | Form, |
IN UINT8 * | OpCode | ||
) |
Allocate a HII_EXPRESSION node.
[in,out] | Form | The Form associated with this Expression |
[in] | OpCode | The binary opcode data. |
Definition at line 230 of file HiiIfrParse.c.
HII_STATEMENT * CreateQuestion | ( | IN UINT8 * | OpCodeData, |
IN OUT HII_FORMSET * | FormSet, | ||
IN OUT HII_FORM * | Form | ||
) |
Initialize Question's members.
[in] | OpCodeData | Pointer of the raw OpCode data. |
[in,out] | FormSet | Pointer of the current FormSet. |
[in,out] | Form | Pointer of the current Form. |
Definition at line 108 of file HiiIfrParse.c.
HII_STATEMENT * CreateStatement | ( | IN UINT8 * | OpCodeData, |
IN OUT HII_FORMSET * | FormSet, | ||
IN OUT HII_FORM * | Form | ||
) |
Initialize Statement header members.
[in] | OpCodeData | Pointer of the raw OpCode data. |
[in,out] | FormSet | Pointer of the current FormSet. |
[in,out] | Form | Pointer of the current Form. |
Definition at line 25 of file HiiIfrParse.c.
HII_FORMSET_STORAGE * CreateStorage | ( | IN HII_FORMSET * | FormSet, |
IN UINT8 | StorageType, | ||
IN UINT8 * | OpCodeData | ||
) |
Allocate a HII_FORMSET_STORAGE data structure and insert to FormSet Storage List.
[in] | FormSet | Pointer of the current FormSet |
[in] | StorageType | Storage type. |
[in] | OpCodeData | Binary data for this opcode. |
Definition at line 324 of file HiiIfrParse.c.
EFI_STATUS DeleteString | ( | IN EFI_STRING_ID | StringId, |
IN EFI_HII_HANDLE | HiiHandle | ||
) |
Delete a string from HII Package List.
[in] | StringId | Id of the string in HII database. |
[in] | HiiHandle | The HII package list handle. |
EFI_SUCCESS | The string was deleted successfully. |
Definition at line 675 of file HiiIfrParse.c.
VOID DestroyExpression | ( | IN HII_EXPRESSION * | Expression | ) |
Free resources of a Expression.
[in] | FormSet | Pointer of the Expression |
Definition at line 625 of file HiiIfrParse.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 DestroyStatement | ( | IN HII_FORMSET * | FormSet, |
IN OUT HII_STATEMENT * | Statement | ||
) |
Free resources of a Statement.
[in] | FormSet | Pointer of the FormSet |
[in,out] | Statement | Pointer of the Statement |
Definition at line 695 of file HiiIfrParse.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 InitializeConfigHdr | ( | IN HII_FORMSET * | FormSet, |
IN OUT HII_FORMSET_STORAGE * | Storage | ||
) |
Create ConfigHdr string for a storage.
[in] | FormSet | Pointer of the current FormSet |
[in,out] | Storage | Pointer of the storage |
EFI_SUCCESS | Initialize ConfigHdr success |
Definition at line 259 of file HiiIfrParse.c.
EFI_STATUS InitializeRequestElement | ( | IN OUT HII_FORMSET * | FormSet, |
IN OUT HII_STATEMENT * | Question, | ||
IN OUT HII_FORM * | Form | ||
) |
Initialize Request Element of a Question. <RequestElement> ::= '&'<BlockName> | '&'<Label>
[in,out] | FormSet | Pointer of the current FormSet. |
[in,out] | Question | The Question to be initialized. |
[in,out] | Form | Pointer of the current form. |
EFI_SUCCESS | Function success. |
EFI_INVALID_PARAMETER | No storage associated with the Question. |
Definition at line 458 of file HiiIfrParse.c.
BOOLEAN IsExpressionOpCode | ( | IN UINT8 | Operand | ) |
Tell whether this Operand is an Expression OpCode or not
[in] | Operand | Operand of an IFR OpCode. |
TRUE | This is an Expression OpCode. |
FALSE | Not an Expression OpCode. |
Definition at line 861 of file HiiIfrParse.c.
BOOLEAN IsStatementOpCode | ( | IN UINT8 | Operand | ) |
Tell whether this Operand is an Statement OpCode.
[in] | Operand | Operand of an IFR OpCode. |
TRUE | This is an Statement OpCode. |
FALSE | Not an Statement OpCode. |
Definition at line 892 of file HiiIfrParse.c.
BOOLEAN IsUnKnownOpCode | ( | IN UINT8 | Operand | ) |
Tell whether this Operand is an known OpCode.
[in] | Operand | Operand of an IFR OpCode. |
TRUE | This is an Statement OpCode. |
FALSE | Not an Statement OpCode. |
Definition at line 927 of file HiiIfrParse.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.