TianoCore EDK2 master
|
#include "Setup.h"
Go to the source code of this file.
Variables | |
UINTN | mStatementIndex |
UINTN | mExpressionOpCodeIndex |
EFI_QUESTION_ID | mUsedQuestionId |
LIST_ENTRY | gBrowserStorageList |
Parser for IFR binary encoding.
Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file IfrParse.c.
VOID CountOpCodes | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
OUT UINTN * | NumberOfStatement, | ||
OUT UINTN * | NumberOfExpression | ||
) |
Calculate number of Statemens(Questions) and Expression OpCodes.
FormSet | The FormSet to be counted. |
NumberOfStatement | Number of Statemens(Questions) |
NumberOfExpression | Number of Expression OpCodes |
Definition at line 1119 of file IfrParse.c.
FORM_EXPRESSION * CreateExpression | ( | IN OUT FORM_BROWSER_FORM * | Form, |
IN UINT8 * | OpCode | ||
) |
Allocate a FORM_EXPRESSION node.
Form | The Form associated with this Expression |
OpCode | The binary opcode data. |
Definition at line 210 of file IfrParse.c.
FORM_BROWSER_STATEMENT * CreateQuestion | ( | IN UINT8 * | OpCodeData, |
IN OUT FORM_BROWSER_FORMSET * | FormSet, | ||
IN OUT FORM_BROWSER_FORM * | Form | ||
) |
Initialize Question's members.
OpCodeData | Pointer of the raw OpCode data. |
FormSet | Pointer of the current FormSet. |
Form | Pointer of the current Form. |
Definition at line 101 of file IfrParse.c.
FORM_BROWSER_STATEMENT * CreateStatement | ( | IN UINT8 * | OpCodeData, |
IN OUT FORM_BROWSER_FORMSET * | FormSet, | ||
IN OUT FORM_BROWSER_FORM * | Form | ||
) |
Initialize Statement header members.
OpCodeData | Pointer of the raw OpCode data. |
FormSet | Pointer of the current FormSet. |
Form | Pointer of the current Form. |
Definition at line 27 of file IfrParse.c.
FORMSET_STORAGE * CreateStorage | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
IN UINT8 | StorageType, | ||
IN UINT8 * | OpCodeData | ||
) |
Allocate a FORMSET_STORAGE data structure and insert to FormSet Storage List.
FormSet | Pointer of the current FormSet |
StorageType | Storage type. |
OpCodeData | Binary data for this opcode. |
Definition at line 382 of file IfrParse.c.
VOID DestroyExpression | ( | IN FORM_EXPRESSION * | Expression | ) |
Free resources of a Expression.
FormSet | Pointer of the Expression |
Definition at line 710 of file IfrParse.c.
VOID DestroyForm | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
IN OUT FORM_BROWSER_FORM * | Form | ||
) |
Free resources of a Form.
FormSet | Pointer of the FormSet |
Form | Pointer of the Form. |
Definition at line 880 of file IfrParse.c.
VOID DestroyFormSet | ( | IN OUT FORM_BROWSER_FORMSET * | FormSet | ) |
Free resources allocated for a FormSet.
FormSet | Pointer of the FormSet |
Definition at line 943 of file IfrParse.c.
VOID DestroyStatement | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
IN OUT FORM_BROWSER_STATEMENT * | Statement | ||
) |
Free resources of a Statement.
FormSet | Pointer of the FormSet |
Statement | Pointer of the Statement |
Definition at line 778 of file IfrParse.c.
VOID DestroyStorage | ( | IN FORMSET_STORAGE * | Storage | ) |
Free resources of a storage.
Storage | Pointer of the storage |
Definition at line 755 of file IfrParse.c.
BROWSER_STORAGE * FindStorageInList | ( | IN UINT8 | StorageType, |
IN EFI_GUID * | StorageGuid, | ||
IN CHAR16 * | StorageName, | ||
IN EFI_HII_HANDLE | HiiHandle | ||
) |
Find the global storage link base on the input storate type, name and guid.
For EFI_HII_VARSTORE_EFI_VARIABLE and EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER, same guid + name = same storage
For EFI_HII_VARSTORE_NAME_VALUE: same guid + HiiHandle = same storage
For EFI_HII_VARSTORE_BUFFER: same guid + name + HiiHandle = same storage
StorageType | Storage type. |
StorageGuid | Storage guid. |
StorageName | Storage Name. |
HiiHandle | HiiHandle for this varstore. |
Definition at line 285 of file IfrParse.c.
FORMSET_STORAGE * GetFstStgFromBrsStg | ( | IN BROWSER_STORAGE * | Storage | ) |
Get Formset_storage base on the input browser storage.
More than one formsets may share the same browser storage, this function just get the first formset storage which share the browser storage.
Storage | browser storage info. |
Definition at line 510 of file IfrParse.c.
FORMSET_STORAGE * GetFstStgFromVarId | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
IN EFI_VARSTORE_ID | VarStoreId | ||
) |
Get Formset_storage base on the input varstoreid info.
FormSet | Pointer of the current FormSet. |
VarStoreId | Varstore ID info. |
Definition at line 467 of file IfrParse.c.
EFI_STATUS InitializeConfigHdr | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
IN OUT FORMSET_STORAGE * | Storage | ||
) |
Create ConfigHdr string for a storage.
FormSet | Pointer of the current FormSet |
Storage | Pointer of the storage |
EFI_SUCCESS | Initialize ConfigHdr success |
Definition at line 236 of file IfrParse.c.
EFI_STATUS InitializeRequestElement | ( | IN OUT FORM_BROWSER_FORMSET * | FormSet, |
IN OUT FORM_BROWSER_STATEMENT * | Question, | ||
IN OUT FORM_BROWSER_FORM * | Form | ||
) |
Initialize Request Element of a Question. <RequestElement> ::= '&'<BlockName> | '&'<Label>
FormSet | Pointer of the current FormSet. |
Question | The Question to be initialized. |
Form | Pointer of the current form. |
EFI_SUCCESS | Function success. |
EFI_INVALID_PARAMETER | No storage associated with the Question. |
Definition at line 559 of file IfrParse.c.
VOID IntializeBrowserStorage | ( | IN BROWSER_STORAGE * | BrowserStorage, |
IN UINT8 | StorageType, | ||
IN UINT8 * | OpCodeData | ||
) |
Intialize the Global Storage.
BrowserStorage | Pointer to the global storage. |
StorageType | Storage type. |
OpCodeData | Binary data for this opcode. |
Definition at line 332 of file IfrParse.c.
BOOLEAN IsExpressionOpCode | ( | IN UINT8 | Operand | ) |
Tell whether this Operand is an Expression OpCode or not
Operand | Operand of an IFR OpCode. |
TRUE | This is an Expression OpCode. |
FALSE | Not an Expression OpCode. |
Definition at line 1037 of file IfrParse.c.
BOOLEAN IsStatementOpCode | ( | IN UINT8 | Operand | ) |
Tell whether this Operand is an Statement OpCode.
Operand | Operand of an IFR OpCode. |
TRUE | This is an Statement OpCode. |
FALSE | Not an Statement OpCode. |
Definition at line 1068 of file IfrParse.c.
BOOLEAN IsUnKnownOpCode | ( | IN UINT8 | Operand | ) |
Tell whether this Operand is an known OpCode.
Operand | Operand of an IFR OpCode. |
TRUE | This is an Statement OpCode. |
FALSE | Not an Statement OpCode. |
Definition at line 1103 of file IfrParse.c.
EFI_STATUS ParseOpCodes | ( | IN FORM_BROWSER_FORMSET * | FormSet | ) |
Parse opcodes in the formset IFR binary.
FormSet | Pointer of the FormSet data structure. |
EFI_SUCCESS | Opcode parse success. |
Other | Opcode parse fail. |
Definition at line 1161 of file IfrParse.c.
|
extern |
UINTN mExpressionOpCodeIndex |
Definition at line 12 of file IfrParse.c.
UINTN mStatementIndex |
Definition at line 11 of file IfrParse.c.
EFI_QUESTION_ID mUsedQuestionId |
Definition at line 13 of file IfrParse.c.