TianoCore EDK2 master
Loading...
Searching...
No Matches
Expression.c File Reference
#include "Setup.h"

Go to the source code of this file.

Functions

EFI_STATUS GrowStack (IN OUT EFI_HII_VALUE **Stack, IN OUT EFI_HII_VALUE **StackPtr, IN OUT EFI_HII_VALUE **StackEnd)
 
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)
 
EFI_STATUS PopStack (IN EFI_HII_VALUE *Stack, IN OUT EFI_HII_VALUE **StackPtr, OUT EFI_HII_VALUE *Data)
 
VOID ResetCurrentExpressionStack (VOID)
 
EFI_STATUS PushCurrentExpression (IN VOID *Pointer)
 
EFI_STATUS PopCurrentExpression (OUT VOID **Pointer)
 
VOID ResetMapExpressionListStack (VOID)
 
EFI_STATUS GrowConditionalStack (IN OUT FORM_EXPRESSION ***Stack, IN OUT FORM_EXPRESSION ***StackPtr, IN OUT FORM_EXPRESSION ***StackEnd, IN UINTN MemberSize)
 
EFI_STATUS PushConditionalStack (IN OUT FORM_EXPRESSION ***Stack, IN OUT FORM_EXPRESSION ***StackPtr, IN OUT FORM_EXPRESSION ***StackEnd, IN FORM_EXPRESSION **Data)
 
EFI_STATUS PopConditionalStack (IN FORM_EXPRESSION **Stack, IN OUT FORM_EXPRESSION ***StackPtr, OUT FORM_EXPRESSION **Data)
 
INTN GetConditionalExpressionCount (IN EXPRESS_LEVEL Level)
 
FORM_EXPRESSION ** GetConditionalExpressionList (IN EXPRESS_LEVEL Level)
 
EFI_STATUS PushConditionalExpression (IN FORM_EXPRESSION *Pointer, IN EXPRESS_LEVEL Level)
 
EFI_STATUS PopConditionalExpression (IN EXPRESS_LEVEL Level)
 
EFI_STATUS PushMapExpressionList (IN VOID *Pointer)
 
EFI_STATUS PopMapExpressionList (OUT VOID **Pointer)
 
VOID ResetScopeStack (VOID)
 
EFI_STATUS PushScope (IN UINT8 Operand)
 
EFI_STATUS PopScope (OUT UINT8 *Operand)
 
EFI_STATUS PushExpression (IN EFI_HII_VALUE *Value)
 
EFI_STATUS PopExpression (OUT EFI_HII_VALUE *Value)
 
UINTN SaveExpressionEvaluationStackOffset (VOID)
 
VOID RestoreExpressionEvaluationStackOffset (UINTN StackOffset)
 
FORM_BROWSER_FORMIdToForm (IN FORM_BROWSER_FORMSET *FormSet, IN UINT16 FormId)
 
FORM_BROWSER_STATEMENTIdToQuestion2 (IN FORM_BROWSER_FORM *Form, IN UINT16 QuestionId)
 
FORM_BROWSER_STATEMENTIdToQuestion (IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN UINT16 QuestionId)
 
FORM_EXPRESSIONRuleIdToExpression (IN FORM_BROWSER_FORM *Form, IN UINT8 RuleId)
 
EFI_STATUS InitializeUnicodeCollationProtocol (VOID)
 
VOID IfrStrToUpper (IN CHAR16 *String)
 
BOOLEAN IsTypeInBuffer (IN EFI_HII_VALUE *Value)
 
BOOLEAN IsTypeInUINT64 (IN EFI_HII_VALUE *Value)
 
UINT16 GetLengthForValue (IN EFI_HII_VALUE *Value)
 
UINT8 * GetBufferForValue (IN EFI_HII_VALUE *Value)
 
EFI_STATUS IfrToString (IN FORM_BROWSER_FORMSET *FormSet, IN UINT8 Format, OUT EFI_HII_VALUE *Result)
 
EFI_STATUS IfrToUint (IN FORM_BROWSER_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
 
EFI_STATUS IfrCatenate (IN FORM_BROWSER_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
 
EFI_STATUS IfrMatch (IN FORM_BROWSER_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
 
EFI_STATUS IfrMatch2 (IN FORM_BROWSER_FORMSET *FormSet, IN EFI_GUID *SyntaxType, OUT EFI_HII_VALUE *Result)
 
EFI_STATUS IfrFind (IN FORM_BROWSER_FORMSET *FormSet, IN UINT8 Format, OUT EFI_HII_VALUE *Result)
 
EFI_STATUS IfrMid (IN FORM_BROWSER_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
 
EFI_STATUS IfrToken (IN FORM_BROWSER_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
 
EFI_STATUS IfrSpan (IN FORM_BROWSER_FORMSET *FormSet, IN UINT8 Flags, OUT EFI_HII_VALUE *Result)
 
VOID ExtendValueToU64 (IN EFI_HII_VALUE *Value)
 
UINT64 HiiValueToUINT64 (IN EFI_HII_VALUE *Value)
 
EFI_STATUS CompareHiiValue (IN EFI_HII_VALUE *Value1, IN EFI_HII_VALUE *Value2, OUT INTN *Result, IN EFI_HII_HANDLE HiiHandle OPTIONAL)
 
BOOLEAN CheckUserPrivilege (IN EFI_GUID *Guid)
 
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)
 
EFI_STATUS EvaluateExpression (IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_EXPRESSION *Expression)
 
BOOLEAN IsTrue (IN EFI_HII_VALUE *Result)
 
EXPRESS_RESULT EvaluateExpressionList (IN FORM_EXPRESSION_LIST *ExpList, IN BOOLEAN Evaluate, IN FORM_BROWSER_FORMSET *FormSet OPTIONAL, IN FORM_BROWSER_FORM *Form OPTIONAL)
 

Variables

EFI_HII_VALUEmOpCodeScopeStack = NULL
 
EFI_HII_VALUEmOpCodeScopeStackEnd = NULL
 
EFI_HII_VALUEmOpCodeScopeStackPointer = NULL
 
EFI_HII_VALUEmExpressionEvaluationStack = NULL
 
EFI_HII_VALUEmExpressionEvaluationStackEnd = NULL
 
EFI_HII_VALUEmExpressionEvaluationStackPointer = NULL
 
UINTN mExpressionEvaluationStackOffset = 0
 
EFI_HII_VALUEmCurrentExpressionStack = NULL
 
EFI_HII_VALUEmCurrentExpressionEnd = NULL
 
EFI_HII_VALUEmCurrentExpressionPointer = NULL
 
EFI_HII_VALUEmMapExpressionListStack = NULL
 
EFI_HII_VALUEmMapExpressionListEnd = NULL
 
EFI_HII_VALUEmMapExpressionListPointer = NULL
 
FORM_EXPRESSION ** mFormExpressionStack = NULL
 
FORM_EXPRESSION ** mFormExpressionEnd = NULL
 
FORM_EXPRESSION ** mFormExpressionPointer = NULL
 
FORM_EXPRESSION ** mStatementExpressionStack = NULL
 
FORM_EXPRESSION ** mStatementExpressionEnd = NULL
 
FORM_EXPRESSION ** mStatementExpressionPointer = NULL
 
FORM_EXPRESSION ** mOptionExpressionStack = NULL
 
FORM_EXPRESSION ** mOptionExpressionEnd = NULL
 
FORM_EXPRESSION ** mOptionExpressionPointer = NULL
 
EFI_UNICODE_COLLATION_PROTOCOLmUnicodeCollation = NULL
 
EFI_USER_MANAGER_PROTOCOLmUserManager = NULL
 

Detailed Description

Utility functions for expression evaluation.

Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Expression.c.

Function Documentation

◆ CheckUserPrivilege()

BOOLEAN CheckUserPrivilege ( IN EFI_GUID Guid)

Check if current user has the privilege specified by the permissions GUID.

Parameters
[in]GuidA GUID specifying setup access permissions.
Return values
TRUECurrent user has the privilege.
FALSECurrent 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 2302 of file Expression.c.

◆ CompareHiiValue()

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.

Parameters
Value1Expression value to compare on left-hand.
Value2Expression value to compare on right-hand.
ResultReturn 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.
HiiHandleOnly required for string compare.
Return values
otherCould not perform compare on two values.
EFI_SUCCESSCompare the value success.

Definition at line 2201 of file Expression.c.

◆ EvaluateExpression()

EFI_STATUS EvaluateExpression ( IN FORM_BROWSER_FORMSET FormSet,
IN FORM_BROWSER_FORM Form,
IN OUT FORM_EXPRESSION Expression 
)

Evaluate the result of a HII expression.

If Expression is NULL, then ASSERT.

Parameters
FormSetFormSet associated with this expression.
FormForm associated with this expression.
ExpressionExpression to be evaluated.
Return values
EFI_SUCCESSThe expression evaluated successfuly
EFI_NOT_FOUNDThe Question which referenced by a QuestionId could not be found.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.
EFI_ACCESS_DENIEDThe pop operation underflowed the stack
EFI_INVALID_PARAMETERSyntax error with the Expression

Definition at line 2536 of file Expression.c.

◆ EvaluateExpressionList()

EXPRESS_RESULT EvaluateExpressionList ( IN FORM_EXPRESSION_LIST ExpList,
IN BOOLEAN  Evaluate,
IN FORM_BROWSER_FORMSET *FormSet  OPTIONAL,
IN FORM_BROWSER_FORM *Form  OPTIONAL 
)

Return the result of the expression list. Check the expression list and return the highest priority express result. Priority: DisableIf > SuppressIf > GrayOutIf > FALSE

Parameters
ExpListThe input expression list.
EvaluateWhether need to evaluate the expression first.
FormSetFormSet associated with this expression.
FormForm associated with this expression.
Return values
EXPRESS_RESULTReturn the higher priority express result. DisableIf > SuppressIf > GrayOutIf > FALSE

Definition at line 3732 of file Expression.c.

◆ ExtendValueToU64()

VOID ExtendValueToU64 ( IN EFI_HII_VALUE Value)

Zero extend integer/boolean/date/time to UINT64 for comparing.

Parameters
ValueHII Value to be converted.

Definition at line 2096 of file Expression.c.

◆ GetBufferForValue()

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.

Parameters
ValueExpression value to compare on.
Return values
BufReturn the buffer pointer.

Definition at line 1070 of file Expression.c.

◆ GetConditionalExpressionCount()

INTN GetConditionalExpressionCount ( IN EXPRESS_LEVEL  Level)

Get the expression list count.

Parameters
LevelWhich type this expression belong to. Form, statement or option?
Return values
>=0The expression count
-1Input parameter error.

Definition at line 423 of file Expression.c.

◆ GetConditionalExpressionList()

FORM_EXPRESSION ** GetConditionalExpressionList ( IN EXPRESS_LEVEL  Level)

Get the expression Buffer pointer.

Parameters
LevelWhich type this expression belong to. Form, statement or option?
Return values
Thestart pointer of the expression buffer or NULL.

Definition at line 450 of file Expression.c.

◆ GetLengthForValue()

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.

Parameters
ValueExpression value to compare on.
Return values
BufLenReturn the buffer length.

Definition at line 1036 of file Expression.c.

◆ GetQuestionValueFromForm()

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.

Parameters
DevicePathThe driver's device path which produece the formset data.
InputHiiHandleThe hii handle associate with the formset data.
FormSetGuidThe formset guid which include the question.
QuestionIdThe question id which need to get value from.
ValueThe return data about question's value.
Return values
TRUEGet the question value success.
FALSEGet the question value failed.

Definition at line 2414 of file Expression.c.

◆ GrowConditionalStack()

EFI_STATUS GrowConditionalStack ( IN OUT FORM_EXPRESSION ***  Stack,
IN OUT FORM_EXPRESSION ***  StackPtr,
IN OUT FORM_EXPRESSION ***  StackEnd,
IN UINTN  MemberSize 
)

Grow size of the stack.

This is an internal function.

Parameters
StackOn input: old stack; On output: new stack
StackPtrOn input: old stack pointer; On output: new stack pointer
StackEndOn input: old stack end; On output: new stack end
MemberSizeThe stack member size.
Return values
EFI_SUCCESSGrow stack success.
EFI_OUT_OF_RESOURCESNo enough memory for stack space.

Definition at line 289 of file Expression.c.

◆ GrowStack()

EFI_STATUS GrowStack ( IN OUT EFI_HII_VALUE **  Stack,
IN OUT EFI_HII_VALUE **  StackPtr,
IN OUT EFI_HII_VALUE **  StackEnd 
)

Grow size of the stack.

This is an internal function.

Parameters
StackOn input: old stack; On output: new stack
StackPtrOn input: old stack pointer; On output: new stack pointer
StackEndOn input: old stack end; On output: new stack end
Return values
EFI_SUCCESSGrow stack success.
EFI_OUT_OF_RESOURCESNo enough memory for stack space.

Definition at line 64 of file Expression.c.

◆ HiiValueToUINT64()

UINT64 HiiValueToUINT64 ( IN EFI_HII_VALUE Value)

Get UINT64 type value.

Parameters
ValueInput Hii value.
Return values
UINT64Return the UINT64 type value.

Definition at line 2144 of file Expression.c.

◆ IdToForm()

FORM_BROWSER_FORM * IdToForm ( IN FORM_BROWSER_FORMSET FormSet,
IN UINT16  FormId 
)

Get Form given its FormId.

Parameters
FormSetThe formset which contains this form.
FormIdId of this form.
Return values
PointerThe form.
NULLSpecified Form is not found in the formset.

Definition at line 767 of file Expression.c.

◆ IdToQuestion()

FORM_BROWSER_STATEMENT * IdToQuestion ( IN FORM_BROWSER_FORMSET FormSet,
IN FORM_BROWSER_FORM Form,
IN UINT16  QuestionId 
)

Search a Question in Formset scope using its QuestionId.

Parameters
FormSetThe formset which contains this form.
FormThe form which contains this Question.
QuestionIdId of this Question.
Return values
PointerThe Question.
NULLSpecified Question not found in the form.

Definition at line 841 of file Expression.c.

◆ IdToQuestion2()

FORM_BROWSER_STATEMENT * IdToQuestion2 ( IN FORM_BROWSER_FORM Form,
IN UINT16  QuestionId 
)

Search a Question in Form scope using its QuestionId.

Parameters
FormThe form which contains this Question.
QuestionIdId of this Question.
Return values
PointerThe Question.
NULLSpecified Question not found in the form.

Definition at line 800 of file Expression.c.

◆ IfrCatenate()

EFI_STATUS IfrCatenate ( IN FORM_BROWSER_FORMSET FormSet,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_CATENATE.

Parameters
FormSetFormset which contains this opcode.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1296 of file Expression.c.

◆ IfrFind()

EFI_STATUS IfrFind ( IN FORM_BROWSER_FORMSET FormSet,
IN UINT8  Format,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_FIND.

Parameters
FormSetFormset which contains this opcode.
FormatCase sensitive or insensitive.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1662 of file Expression.c.

◆ IfrMatch()

EFI_STATUS IfrMatch ( IN FORM_BROWSER_FORMSET FormSet,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_MATCH.

Parameters
FormSetFormset which contains this opcode.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1410 of file Expression.c.

◆ IfrMatch2()

EFI_STATUS IfrMatch2 ( IN FORM_BROWSER_FORMSET FormSet,
IN EFI_GUID SyntaxType,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_MATCH2.

Parameters
FormSetFormset which contains this opcode.
SyntaxTypeSyntax type for match2.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1480 of file Expression.c.

◆ IfrMid()

EFI_STATUS IfrMid ( IN FORM_BROWSER_FORMSET FormSet,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_MID.

Parameters
FormSetFormset which contains this opcode.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1761 of file Expression.c.

◆ IfrSpan()

EFI_STATUS IfrSpan ( IN FORM_BROWSER_FORMSET FormSet,
IN UINT8  Flags,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_SPAN.

Parameters
FormSetFormset which contains this opcode.
FlagsFIRST_MATCHING or FIRST_NON_MATCHING.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1980 of file Expression.c.

◆ IfrStrToUpper()

VOID IfrStrToUpper ( IN CHAR16 *  String)

Convert the input Unicode character to upper.

Parameters
StringTh Unicode character to be converted.

Definition at line 955 of file Expression.c.

◆ IfrToken()

EFI_STATUS IfrToken ( IN FORM_BROWSER_FORMSET FormSet,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_TOKEN.

Parameters
FormSetFormset which contains this opcode.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1864 of file Expression.c.

◆ IfrToString()

EFI_STATUS IfrToString ( IN FORM_BROWSER_FORMSET FormSet,
IN UINT8  Format,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_TO_STRING.

Parameters
FormSetFormset which contains this opcode.
FormatString format in EFI_IFR_TO_STRING.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1104 of file Expression.c.

◆ IfrToUint()

EFI_STATUS IfrToUint ( IN FORM_BROWSER_FORMSET FormSet,
OUT EFI_HII_VALUE Result 
)

Evaluate opcode EFI_IFR_TO_UINT.

Parameters
FormSetFormset which contains this opcode.
ResultEvaluation result for this opcode.
Return values
EFI_SUCCESSOpcode evaluation success.
OtherOpcode evaluation failed.

Definition at line 1219 of file Expression.c.

◆ InitializeUnicodeCollationProtocol()

EFI_STATUS InitializeUnicodeCollationProtocol ( VOID  )

Locate the Unicode Collation Protocol interface for later use.

Return values
EFI_SUCCESSProtocol interface initialize success.
OtherProtocol interface initialize failed.

Definition at line 925 of file Expression.c.

◆ IsTrue()

BOOLEAN IsTrue ( IN EFI_HII_VALUE Result)

Check whether the result is TRUE or FALSE.

For the EFI_HII_VALUE value type is numeric, return TRUE if the value is not 0.

Parameters
ResultInput the result data.
Return values
TRUEThe result is TRUE.
FALSEThe result is FALSE.

Definition at line 3692 of file Expression.c.

◆ IsTypeInBuffer()

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.

Parameters
ValueExpression value to compare on.
Return values
TRUEThis value type can be transter to EFI_IFR_TYPE_BUFFER type.
FALSEThis value type can't be transter to EFI_IFR_TYPE_BUFFER type.

Definition at line 981 of file Expression.c.

◆ IsTypeInUINT64()

BOOLEAN IsTypeInUINT64 ( IN EFI_HII_VALUE Value)

Check whether this value type can be transfer to EFI_IFR_TYPE_UINT64

Parameters
ValueExpression value to compare on.
Return values
TRUEThis value type can be transter to EFI_IFR_TYPE_BUFFER type.
FALSEThis value type can't be transter to EFI_IFR_TYPE_BUFFER type.

Definition at line 1007 of file Expression.c.

◆ PopConditionalExpression()

EFI_STATUS PopConditionalExpression ( IN EXPRESS_LEVEL  Level)

Pop the expression options from the Stack

Parameters
LevelWhich type this expression belong to. Form, statement or option?
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 523 of file Expression.c.

◆ PopConditionalStack()

EFI_STATUS PopConditionalStack ( IN FORM_EXPRESSION **  Stack,
IN OUT FORM_EXPRESSION ***  StackPtr,
OUT FORM_EXPRESSION **  Data 
)

Pop an element from the stack.

Parameters
StackOn input: old stack
StackPtrOn input: old stack pointer; On output: new stack pointer
DataData to pop.
Return values
EFI_SUCCESSThe value was popped onto the stack.
EFI_ACCESS_DENIEDThe pop operation underflowed the stack

Definition at line 391 of file Expression.c.

◆ PopCurrentExpression()

EFI_STATUS PopCurrentExpression ( OUT VOID **  Pointer)

Pop current expression from the Stack

Parameters
PointerPointer to current expression to be pop.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 243 of file Expression.c.

◆ PopExpression()

EFI_STATUS PopExpression ( OUT EFI_HII_VALUE Value)

Pop an Expression value from the stack.

Parameters
ValueExpression value to pop.
Return values
EFI_SUCCESSThe value was popped onto the stack.
EFI_ACCESS_DENIEDThe pop operation underflowed the stack

Definition at line 714 of file Expression.c.

◆ PopMapExpressionList()

EFI_STATUS PopMapExpressionList ( OUT VOID **  Pointer)

Pop the list of map expression from the Stack

Parameters
PointerPointer to the list of map expression to be pop.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 594 of file Expression.c.

◆ PopScope()

EFI_STATUS PopScope ( OUT UINT8 *  Operand)

Pop an Operand from the Stack

Parameters
OperandOperand to pop.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 663 of file Expression.c.

◆ PopStack()

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.

Parameters
StackOn input: old stack
StackPtrOn input: old stack pointer; On output: new stack pointer
DataData to pop.
Return values
EFI_SUCCESSThe value was popped onto the stack.
EFI_ACCESS_DENIEDThe pop operation underflowed the stack

Definition at line 170 of file Expression.c.

◆ PushConditionalExpression()

EFI_STATUS PushConditionalExpression ( IN FORM_EXPRESSION Pointer,
IN EXPRESS_LEVEL  Level 
)

Push the expression options onto the Stack.

Parameters
PointerPointer to the current expression.
LevelWhich type this expression belong to. Form, statement or option?
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 479 of file Expression.c.

◆ PushConditionalStack()

EFI_STATUS PushConditionalStack ( IN OUT FORM_EXPRESSION ***  Stack,
IN OUT FORM_EXPRESSION ***  StackPtr,
IN OUT FORM_EXPRESSION ***  StackEnd,
IN FORM_EXPRESSION **  Data 
)

Push an element onto the Stack.

Parameters
StackOn input: old stack; On output: new stack
StackPtrOn input: old stack pointer; On output: new stack pointer
StackEndOn input: old stack end; On output: new stack end
DataData to push.
Return values
EFI_SUCCESSPush stack success.

Definition at line 348 of file Expression.c.

◆ PushCurrentExpression()

EFI_STATUS PushCurrentExpression ( IN VOID *  Pointer)

Push current expression onto the Stack

Parameters
PointerPointer to current expression.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 216 of file Expression.c.

◆ PushExpression()

EFI_STATUS PushExpression ( IN EFI_HII_VALUE Value)

Push an Expression value onto the Stack

Parameters
ValueExpression value to push.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 692 of file Expression.c.

◆ PushMapExpressionList()

EFI_STATUS PushMapExpressionList ( IN VOID *  Pointer)

Push the list of map expression onto the Stack

Parameters
PointerPointer to the list of map expression to be pushed.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 567 of file Expression.c.

◆ PushScope()

EFI_STATUS PushScope ( IN UINT8  Operand)

Push an Operand onto the Stack

Parameters
OperandOperand to push.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 635 of file Expression.c.

◆ PushStack()

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.

Parameters
StackOn input: old stack; On output: new stack
StackPtrOn input: old stack pointer; On output: new stack pointer
StackEndOn input: old stack end; On output: new stack end
DataData to push.
Return values
EFI_SUCCESSPush stack success.

Definition at line 122 of file Expression.c.

◆ ResetCurrentExpressionStack()

VOID ResetCurrentExpressionStack ( VOID  )

Reset stack pointer to begin of the stack.

Definition at line 196 of file Expression.c.

◆ ResetMapExpressionListStack()

VOID ResetMapExpressionListStack ( VOID  )

Reset stack pointer to begin of the stack.

Definition at line 266 of file Expression.c.

◆ ResetScopeStack()

VOID ResetScopeStack ( VOID  )

Reset stack pointer to begin of the stack.

Definition at line 617 of file Expression.c.

◆ RestoreExpressionEvaluationStackOffset()

VOID RestoreExpressionEvaluationStackOffset ( UINTN  StackOffset)

Restore stack offset based on input stack offset

Parameters
StackOffsetOffset to stack start.

Definition at line 749 of file Expression.c.

◆ RuleIdToExpression()

FORM_EXPRESSION * RuleIdToExpression ( IN FORM_BROWSER_FORM Form,
IN UINT8  RuleId 
)

Get Expression given its RuleId.

Parameters
FormThe form which contains this Expression.
RuleIdId of this Expression.
Return values
PointerThe Expression.
NULLSpecified Expression not found in the form.

Definition at line 895 of file Expression.c.

◆ SaveExpressionEvaluationStackOffset()

UINTN SaveExpressionEvaluationStackOffset ( VOID  )

Get current stack offset from stack start.

Returns
Stack offset to stack start.

Definition at line 731 of file Expression.c.

Variable Documentation

◆ mCurrentExpressionEnd

EFI_HII_VALUE* mCurrentExpressionEnd = NULL

Definition at line 24 of file Expression.c.

◆ mCurrentExpressionPointer

EFI_HII_VALUE* mCurrentExpressionPointer = NULL

Definition at line 25 of file Expression.c.

◆ mCurrentExpressionStack

EFI_HII_VALUE* mCurrentExpressionStack = NULL

Definition at line 23 of file Expression.c.

◆ mExpressionEvaluationStack

EFI_HII_VALUE* mExpressionEvaluationStack = NULL

Definition at line 18 of file Expression.c.

◆ mExpressionEvaluationStackEnd

EFI_HII_VALUE* mExpressionEvaluationStackEnd = NULL

Definition at line 19 of file Expression.c.

◆ mExpressionEvaluationStackOffset

UINTN mExpressionEvaluationStackOffset = 0

Definition at line 21 of file Expression.c.

◆ mExpressionEvaluationStackPointer

EFI_HII_VALUE* mExpressionEvaluationStackPointer = NULL

Definition at line 20 of file Expression.c.

◆ mFormExpressionEnd

FORM_EXPRESSION** mFormExpressionEnd = NULL

Definition at line 32 of file Expression.c.

◆ mFormExpressionPointer

FORM_EXPRESSION** mFormExpressionPointer = NULL

Definition at line 33 of file Expression.c.

◆ mFormExpressionStack

FORM_EXPRESSION** mFormExpressionStack = NULL

Definition at line 31 of file Expression.c.

◆ mMapExpressionListEnd

EFI_HII_VALUE* mMapExpressionListEnd = NULL

Definition at line 28 of file Expression.c.

◆ mMapExpressionListPointer

EFI_HII_VALUE* mMapExpressionListPointer = NULL

Definition at line 29 of file Expression.c.

◆ mMapExpressionListStack

EFI_HII_VALUE* mMapExpressionListStack = NULL

Definition at line 27 of file Expression.c.

◆ mOpCodeScopeStack

EFI_HII_VALUE* mOpCodeScopeStack = NULL

Definition at line 14 of file Expression.c.

◆ mOpCodeScopeStackEnd

EFI_HII_VALUE* mOpCodeScopeStackEnd = NULL

Definition at line 15 of file Expression.c.

◆ mOpCodeScopeStackPointer

EFI_HII_VALUE* mOpCodeScopeStackPointer = NULL

Definition at line 16 of file Expression.c.

◆ mOptionExpressionEnd

FORM_EXPRESSION** mOptionExpressionEnd = NULL

Definition at line 40 of file Expression.c.

◆ mOptionExpressionPointer

FORM_EXPRESSION** mOptionExpressionPointer = NULL

Definition at line 41 of file Expression.c.

◆ mOptionExpressionStack

FORM_EXPRESSION** mOptionExpressionStack = NULL

Definition at line 39 of file Expression.c.

◆ mStatementExpressionEnd

FORM_EXPRESSION** mStatementExpressionEnd = NULL

Definition at line 36 of file Expression.c.

◆ mStatementExpressionPointer

FORM_EXPRESSION** mStatementExpressionPointer = NULL

Definition at line 37 of file Expression.c.

◆ mStatementExpressionStack

FORM_EXPRESSION** mStatementExpressionStack = NULL

Definition at line 35 of file Expression.c.

◆ mUnicodeCollation

EFI_UNICODE_COLLATION_PROTOCOL* mUnicodeCollation = NULL

Definition at line 46 of file Expression.c.

◆ mUserManager

Definition at line 47 of file Expression.c.