UINT16 mStatementIndex;\r
UINT16 mExpressionOpCodeIndex;\r
EFI_QUESTION_ID mUsedQuestionId;\r
-BOOLEAN mInScopeSubtitle;\r
extern LIST_ENTRY gBrowserStorageList;\r
/**\r
Initialize Statement header members.\r
InitializeListHead (&Statement->OptionListHead);\r
InitializeListHead (&Statement->InconsistentListHead);\r
InitializeListHead (&Statement->NoSubmitListHead);\r
+ InitializeListHead (&Statement->WarningListHead);\r
\r
Statement->Signature = FORM_BROWSER_STATEMENT_SIGNATURE;\r
\r
CopyMem (Statement->Expression->Expression, GetConditionalExpressionList(ExpressStatement), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));\r
}\r
\r
- Statement->InSubtitle = mInScopeSubtitle;\r
-\r
//\r
// Insert this Statement into current Form\r
//\r
Allocate a FORM_EXPRESSION node.\r
\r
@param Form The Form associated with this Expression\r
+ @param OpCode The binary opcode data.\r
\r
@return Pointer to a FORM_EXPRESSION data structure.\r
\r
**/\r
FORM_EXPRESSION *\r
CreateExpression (\r
- IN OUT FORM_BROWSER_FORM *Form\r
+ IN OUT FORM_BROWSER_FORM *Form,\r
+ IN UINT8 *OpCode\r
)\r
{\r
FORM_EXPRESSION *Expression;\r
ASSERT (Expression != NULL);\r
Expression->Signature = FORM_EXPRESSION_SIGNATURE;\r
InitializeListHead (&Expression->OpCodeListHead);\r
+ Expression->OpCode = (EFI_IFR_OP_HEADER *) OpCode;\r
\r
return Expression;\r
}\r
/**\r
Find the global storage link base on the input storate type, name and guid.\r
\r
+ For EFI_HII_VARSTORE_EFI_VARIABLE and EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER,\r
+ same guid + name = same storage\r
+\r
+ For EFI_HII_VARSTORE_NAME_VALUE:\r
+ same guid + HiiHandle = same storage\r
+\r
+ For EFI_HII_VARSTORE_BUFFER:\r
+ same guid + name + HiiHandle = same storage\r
+\r
@param StorageType Storage type.\r
@param StorageGuid Storage guid.\r
@param StorageName Storage Name.\r
+ @param HiiHandle HiiHandle for this varstore.\r
\r
@return Pointer to a GLOBAL_STORAGE data structure.\r
\r
FindStorageInList (\r
IN UINT8 StorageType,\r
IN EFI_GUID *StorageGuid,\r
- IN CHAR16 *StorageName\r
+ IN CHAR16 *StorageName,\r
+ IN EFI_HII_HANDLE HiiHandle\r
)\r
{\r
LIST_ENTRY *Link;\r
Link = GetFirstNode (&gBrowserStorageList);\r
while (!IsNull (&gBrowserStorageList, Link)) {\r
BrowserStorage = BROWSER_STORAGE_FROM_LINK (Link);\r
+ Link = GetNextNode (&gBrowserStorageList, Link);\r
\r
if ((BrowserStorage->Type == StorageType) && CompareGuid (&BrowserStorage->Guid, StorageGuid)) {\r
if (StorageType == EFI_HII_VARSTORE_NAME_VALUE) {\r
- return BrowserStorage;\r
+ if (BrowserStorage->HiiHandle == HiiHandle) {\r
+ return BrowserStorage;\r
+ }\r
+\r
+ continue;\r
}\r
\r
+ ASSERT (StorageName != NULL);\r
if (StrCmp (BrowserStorage->Name, StorageName) == 0) {\r
- return BrowserStorage;\r
+ if (StorageType == EFI_HII_VARSTORE_EFI_VARIABLE || StorageType == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {\r
+ return BrowserStorage;\r
+ } else if (StorageType == EFI_HII_VARSTORE_BUFFER && BrowserStorage->HiiHandle == HiiHandle) {\r
+ return BrowserStorage;\r
+ }\r
}\r
}\r
-\r
- //\r
- // Get Next Storage.\r
- //\r
- Link = GetNextNode (&gBrowserStorageList, Link);\r
}\r
\r
return NULL;\r
Storage->Signature = FORMSET_STORAGE_SIGNATURE;\r
InsertTailList (&FormSet->StorageListHead, &Storage->Link);\r
\r
- BrowserStorage = FindStorageInList(StorageType, StorageGuid, UnicodeString);\r
+ BrowserStorage = FindStorageInList(StorageType, StorageGuid, UnicodeString, FormSet->HiiHandle);\r
if (BrowserStorage == NULL) {\r
BrowserStorage = AllocateZeroPool (sizeof (BROWSER_STORAGE));\r
ASSERT (BrowserStorage != NULL);\r
BrowserStorage->Name = UnicodeString;\r
}\r
\r
+ BrowserStorage->HiiHandle = FormSet->HiiHandle;\r
InitializeConfigHdr (FormSet, BrowserStorage);\r
+\r
+ BrowserStorage->Initialized = FALSE;\r
}\r
- //\r
- // Add count because one formset storage use this global storage.\r
- //\r
- BrowserStorage->ReferenceCount++;\r
\r
Storage->BrowserStorage = BrowserStorage;\r
Storage->ConfigRequest = AllocateCopyPool (StrSize (BrowserStorage->ConfigHdr), BrowserStorage->ConfigHdr);\r
FreePool (Storage->ConfigRequest);\r
}\r
\r
- //\r
- // Minus the reference to the global storage.\r
- //\r
- ASSERT (Storage->BrowserStorage->ReferenceCount > 0);\r
- Storage->BrowserStorage->ReferenceCount--; \r
-\r
FreePool (Storage);\r
}\r
\r
DestroyExpression (Expression);\r
}\r
\r
+ //\r
+ // Free WarningIf List\r
+ //\r
+ while (!IsListEmpty (&Statement->WarningListHead)) {\r
+ Link = GetFirstNode (&Statement->WarningListHead);\r
+ Expression = FORM_EXPRESSION_FROM_LINK (Link);\r
+ RemoveEntryList (&Expression->Link);\r
+\r
+ DestroyExpression (Expression);\r
+ }\r
+\r
if (Statement->Expression != NULL) {\r
FreePool (Statement->Expression);\r
}\r
}\r
}\r
\r
+/**\r
+ Tell whether this Operand is an Statement OpCode.\r
+\r
+ @param Operand Operand of an IFR OpCode.\r
+\r
+ @retval TRUE This is an Statement OpCode.\r
+ @retval FALSE Not an Statement OpCode.\r
+\r
+**/\r
+BOOLEAN\r
+IsStatementOpCode (\r
+ IN UINT8 Operand\r
+ )\r
+{\r
+ if ((Operand == EFI_IFR_SUBTITLE_OP) ||\r
+ (Operand == EFI_IFR_TEXT_OP) ||\r
+ (Operand == EFI_IFR_RESET_BUTTON_OP) ||\r
+ (Operand == EFI_IFR_REF_OP) ||\r
+ (Operand == EFI_IFR_ACTION_OP) ||\r
+ (Operand == EFI_IFR_NUMERIC_OP) ||\r
+ (Operand == EFI_IFR_ORDERED_LIST_OP) ||\r
+ (Operand == EFI_IFR_CHECKBOX_OP) ||\r
+ (Operand == EFI_IFR_STRING_OP) ||\r
+ (Operand == EFI_IFR_PASSWORD_OP) ||\r
+ (Operand == EFI_IFR_DATE_OP) ||\r
+ (Operand == EFI_IFR_TIME_OP) ||\r
+ (Operand == EFI_IFR_GUID_OP) ||\r
+ (Operand == EFI_IFR_ONE_OF_OP)) {\r
+ return TRUE;\r
+ } else {\r
+ return FALSE;\r
+ }\r
+}\r
+\r
+/**\r
+ Tell whether this Operand is an known OpCode.\r
+\r
+ @param Operand Operand of an IFR OpCode.\r
+\r
+ @retval TRUE This is an Statement OpCode.\r
+ @retval FALSE Not an Statement OpCode.\r
+\r
+**/\r
+BOOLEAN\r
+IsUnKnownOpCode (\r
+ IN UINT8 Operand\r
+ )\r
+{\r
+ return Operand > EFI_IFR_WARNING_IF_OP ? TRUE : FALSE;\r
+}\r
\r
/**\r
Calculate number of Statemens(Questions) and Expression OpCodes.\r
EFI_STATUS Status;\r
FORM_BROWSER_FORM *CurrentForm;\r
FORM_BROWSER_STATEMENT *CurrentStatement;\r
+ FORM_BROWSER_STATEMENT *ParentStatement;\r
EXPRESSION_OPCODE *ExpressionOpCode;\r
FORM_EXPRESSION *CurrentExpression;\r
UINT8 Operand;\r
EFI_VARSTORE_ID TempVarstoreId;\r
BOOLEAN InScopeDisable;\r
INTN ConditionalExprCount;\r
+ BOOLEAN InUnknownScope;\r
+ UINT8 UnknownDepth;\r
\r
- mInScopeSubtitle = FALSE;\r
SuppressForQuestion = FALSE;\r
SuppressForOption = FALSE;\r
InScopeDisable = FALSE;\r
MapExpressionList = NULL;\r
TempVarstoreId = 0;\r
ConditionalExprCount = 0;\r
+ InUnknownScope = FALSE;\r
+ UnknownDepth = 0;\r
\r
//\r
// Get the number of Statements and Expressions\r
\r
CurrentForm = NULL;\r
CurrentStatement = NULL;\r
+ ParentStatement = NULL;\r
\r
ResetScopeStack ();\r
\r
Operand = ((EFI_IFR_OP_HEADER *) OpCodeData)->OpCode;\r
Scope = ((EFI_IFR_OP_HEADER *) OpCodeData)->Scope;\r
\r
+ if (InUnknownScope) {\r
+ if (Operand == EFI_IFR_END_OP) {\r
+ UnknownDepth --;\r
+\r
+ if (UnknownDepth == 0) {\r
+ InUnknownScope = FALSE;\r
+ }\r
+ } else {\r
+ if (Scope != 0) {\r
+ UnknownDepth ++;\r
+ }\r
+ }\r
+\r
+ continue;\r
+ }\r
+\r
+ if (IsUnKnownOpCode(Operand)) {\r
+ if (Scope != 0) {\r
+ InUnknownScope = TRUE;\r
+ UnknownDepth ++;\r
+ }\r
+\r
+ continue;\r
+ }\r
+\r
//\r
// If scope bit set, push onto scope stack\r
//\r
break;\r
\r
case EFI_IFR_THIS_OP:\r
- ASSERT (CurrentStatement != NULL);\r
- ExpressionOpCode->QuestionId = CurrentStatement->QuestionId;\r
+ ASSERT (ParentStatement != NULL);\r
+ ExpressionOpCode->QuestionId = ParentStatement->QuestionId;\r
break;\r
\r
case EFI_IFR_SECURITY_OP:\r
// Create sub expression nested in MAP opcode\r
//\r
if (CurrentExpression == NULL && MapScopeDepth > 0) {\r
- CurrentExpression = CreateExpression (CurrentForm);\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
ASSERT (MapExpressionList != NULL);\r
InsertTailList (MapExpressionList, &CurrentExpression->Link);\r
if (Scope == 0) {\r
return Status;\r
}\r
\r
- if (CurrentExpression->Result.Type != EFI_IFR_TYPE_BOOLEAN) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
- OpCodeDisabled = CurrentExpression->Result.Value.b;\r
+ OpCodeDisabled = IsTrue(&CurrentExpression->Result);\r
}\r
\r
CurrentExpression = NULL;\r
// Create a EFI variable Storage for this FormSet\r
//\r
if (OpCodeLength < sizeof (EFI_IFR_VARSTORE_EFI)) {\r
+ //\r
+ // Create efi varstore with format follow UEFI spec before 2.3.1.\r
+ //\r
Storage = CreateStorage (FormSet, EFI_HII_VARSTORE_EFI_VARIABLE, OpCodeData);\r
} else {\r
+ //\r
+ // Create efi varstore with format follow UEFI spec 2.3.1 and later.\r
+ //\r
Storage = CreateStorage (FormSet, EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER, OpCodeData);\r
}\r
CopyMem (&Storage->VarStoreId, &((EFI_IFR_VARSTORE_EFI *) OpCodeData)->VarStoreId, sizeof (EFI_VARSTORE_ID));\r
\r
CurrentStatement->Flags = ((EFI_IFR_SUBTITLE *) OpCodeData)->Flags;\r
CurrentStatement->FakeQuestionId = mUsedQuestionId++;\r
- if (Scope != 0) {\r
- mInScopeSubtitle = TRUE;\r
- }\r
break;\r
\r
case EFI_IFR_TEXT_OP:\r
//\r
// Insert to Default Value list of current Question\r
//\r
- InsertTailList (&CurrentStatement->DefaultListHead, &CurrentDefault->Link);\r
+ InsertTailList (&ParentStatement->DefaultListHead, &CurrentDefault->Link);\r
\r
if (Scope != 0) {\r
InScopeDefault = TRUE;\r
CopyMem (CurrentOption->SuppressExpression->Expression, GetConditionalExpressionList(ExpressOption), (UINTN) (sizeof (FORM_EXPRESSION *) * ConditionalExprCount));\r
}\r
\r
+ ASSERT (ParentStatement != NULL);\r
//\r
// Insert to Option list of current Question\r
//\r
- InsertTailList (&CurrentStatement->OptionListHead, &CurrentOption->Link);\r
-\r
+ InsertTailList (&ParentStatement->OptionListHead, &CurrentOption->Link);\r
//\r
// Now we know the Storage width of nested Ordered List\r
//\r
- ASSERT (CurrentStatement != NULL);\r
- if ((CurrentStatement->Operand == EFI_IFR_ORDERED_LIST_OP) && (CurrentStatement->BufferValue == NULL)) {\r
+ if ((ParentStatement->Operand == EFI_IFR_ORDERED_LIST_OP) && (ParentStatement->BufferValue == NULL)) {\r
Width = 1;\r
switch (CurrentOption->Value.Type) {\r
case EFI_IFR_TYPE_NUM_SIZE_8:\r
break;\r
}\r
\r
- CurrentStatement->StorageWidth = (UINT16) (CurrentStatement->MaxContainers * Width);\r
- CurrentStatement->BufferValue = AllocateZeroPool (CurrentStatement->StorageWidth);\r
- CurrentStatement->ValueType = CurrentOption->Value.Type;\r
- if (CurrentStatement->HiiValue.Type == EFI_IFR_TYPE_BUFFER) {\r
- CurrentStatement->HiiValue.Buffer = CurrentStatement->BufferValue;\r
- CurrentStatement->HiiValue.BufferLen = CurrentStatement->StorageWidth;\r
+ ParentStatement->StorageWidth = (UINT16) (ParentStatement->MaxContainers * Width);\r
+ ParentStatement->BufferValue = AllocateZeroPool (ParentStatement->StorageWidth);\r
+ ParentStatement->ValueType = CurrentOption->Value.Type;\r
+ if (ParentStatement->HiiValue.Type == EFI_IFR_TYPE_BUFFER) {\r
+ ParentStatement->HiiValue.Buffer = ParentStatement->BufferValue;\r
+ ParentStatement->HiiValue.BufferLen = ParentStatement->StorageWidth;\r
}\r
\r
- InitializeRequestElement (FormSet, CurrentStatement, CurrentForm);\r
+ InitializeRequestElement (FormSet, ParentStatement, CurrentForm);\r
}\r
break;\r
\r
//\r
// Create an Expression node\r
//\r
- CurrentExpression = CreateExpression (CurrentForm);\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
CopyMem (&CurrentExpression->Error, &((EFI_IFR_INCONSISTENT_IF *) OpCodeData)->Error, sizeof (EFI_STRING_ID));\r
\r
if (Operand == EFI_IFR_NO_SUBMIT_IF_OP) {\r
CurrentExpression->Type = EFI_HII_EXPRESSION_NO_SUBMIT_IF;\r
- InsertTailList (&CurrentStatement->NoSubmitListHead, &CurrentExpression->Link);\r
+ InsertTailList (&ParentStatement->NoSubmitListHead, &CurrentExpression->Link);\r
} else {\r
CurrentExpression->Type = EFI_HII_EXPRESSION_INCONSISTENT_IF;\r
- InsertTailList (&CurrentStatement->InconsistentListHead, &CurrentExpression->Link);\r
+ InsertTailList (&ParentStatement->InconsistentListHead, &CurrentExpression->Link);\r
}\r
\r
//\r
}\r
break;\r
\r
+ case EFI_IFR_WARNING_IF_OP:\r
+ //\r
+ // Create an Expression node\r
+ //\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
+ CopyMem (&CurrentExpression->Error, &((EFI_IFR_WARNING_IF *) OpCodeData)->Warning, sizeof (EFI_STRING_ID));\r
+ CurrentExpression->TimeOut = ((EFI_IFR_WARNING_IF *) OpCodeData)->TimeOut;\r
+ CurrentExpression->Type = EFI_HII_EXPRESSION_WARNING_IF;\r
+ InsertTailList (&ParentStatement->WarningListHead, &CurrentExpression->Link);\r
+\r
+ //\r
+ // Take a look at next OpCode to see whether current expression consists\r
+ // of single OpCode\r
+ //\r
+ if (((EFI_IFR_OP_HEADER *) (OpCodeData + OpCodeLength))->Scope == 0) {\r
+ SingleOpCodeExpression = TRUE;\r
+ }\r
+ break;\r
+\r
case EFI_IFR_SUPPRESS_IF_OP:\r
//\r
// Question and Option will appear in scope of this OpCode\r
//\r
- CurrentExpression = CreateExpression (CurrentForm);\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
CurrentExpression->Type = EFI_HII_EXPRESSION_SUPPRESS_IF;\r
\r
if (CurrentForm == NULL) {\r
//\r
// Questions will appear in scope of this OpCode\r
//\r
- CurrentExpression = CreateExpression (CurrentForm);\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
CurrentExpression->Type = EFI_HII_EXPRESSION_GRAY_OUT_IF;\r
InsertTailList (&CurrentForm->ExpressionListHead, &CurrentExpression->Link);\r
PushConditionalExpression(CurrentExpression, ExpressStatement);\r
// Expression\r
//\r
case EFI_IFR_VALUE_OP:\r
- CurrentExpression = CreateExpression (CurrentForm);\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
CurrentExpression->Type = EFI_HII_EXPRESSION_VALUE;\r
InsertTailList (&CurrentForm->ExpressionListHead, &CurrentExpression->Link);\r
\r
// If it is NULL, 1) ParseOpCodes functions may parse the IFR wrongly. Or 2) the IFR\r
// file is wrongly generated by tools such as VFR Compiler. There may be a bug in VFR Compiler.\r
//\r
- ASSERT (CurrentStatement != NULL);\r
- CurrentStatement->ValueExpression = CurrentExpression;\r
+ ASSERT (ParentStatement != NULL);\r
+ ParentStatement->ValueExpression = CurrentExpression;\r
}\r
\r
//\r
break;\r
\r
case EFI_IFR_RULE_OP:\r
- CurrentExpression = CreateExpression (CurrentForm);\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
CurrentExpression->Type = EFI_HII_EXPRESSION_RULE;\r
\r
CurrentExpression->RuleId = ((EFI_IFR_RULE *) OpCodeData)->RuleId;\r
break;\r
\r
case EFI_IFR_READ_OP:\r
- CurrentExpression = CreateExpression (CurrentForm);\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
CurrentExpression->Type = EFI_HII_EXPRESSION_READ;\r
InsertTailList (&CurrentForm->ExpressionListHead, &CurrentExpression->Link);\r
\r
// If it is NULL, 1) ParseOpCodes functions may parse the IFR wrongly. Or 2) the IFR\r
// file is wrongly generated by tools such as VFR Compiler. There may be a bug in VFR Compiler.\r
//\r
- ASSERT (CurrentStatement != NULL);\r
- CurrentStatement->ReadExpression = CurrentExpression;\r
+ ASSERT (ParentStatement != NULL);\r
+ ParentStatement->ReadExpression = CurrentExpression;\r
\r
//\r
// Take a look at next OpCode to see whether current expression consists\r
break;\r
\r
case EFI_IFR_WRITE_OP:\r
- CurrentExpression = CreateExpression (CurrentForm);\r
+ CurrentExpression = CreateExpression (CurrentForm, OpCodeData);\r
CurrentExpression->Type = EFI_HII_EXPRESSION_WRITE;\r
InsertTailList (&CurrentForm->ExpressionListHead, &CurrentExpression->Link);\r
\r
// If it is NULL, 1) ParseOpCodes functions may parse the IFR wrongly. Or 2) the IFR\r
// file is wrongly generated by tools such as VFR Compiler. There may be a bug in VFR Compiler.\r
//\r
- ASSERT (CurrentStatement != NULL);\r
- CurrentStatement->WriteExpression = CurrentExpression;\r
+ ASSERT (ParentStatement != NULL);\r
+ ParentStatement->WriteExpression = CurrentExpression;\r
\r
//\r
// Take a look at next OpCode to see whether current expression consists\r
// If it is NULL, 1) ParseOpCodes functions may parse the IFR wrongly. Or 2) the IFR\r
// file is wrongly generated by tools such as VFR Compiler.\r
//\r
- ASSERT (CurrentStatement != NULL);\r
- ImageId = &CurrentStatement->ImageId;\r
+ ASSERT (ParentStatement != NULL);\r
+ ImageId = &ParentStatement->ImageId;\r
break;\r
}\r
\r
// Refresh\r
//\r
case EFI_IFR_REFRESH_OP:\r
- ASSERT (CurrentStatement != NULL);\r
- CurrentStatement->RefreshInterval = ((EFI_IFR_REFRESH *) OpCodeData)->RefreshInterval;\r
+ ASSERT (ParentStatement != NULL);\r
+ ParentStatement->RefreshInterval = ((EFI_IFR_REFRESH *) OpCodeData)->RefreshInterval;\r
break;\r
\r
//\r
// Refresh guid.\r
//\r
case EFI_IFR_REFRESH_ID_OP:\r
- ASSERT (CurrentStatement != NULL);\r
- CopyMem (&CurrentStatement->RefreshGuid, &((EFI_IFR_REFRESH_ID *) OpCodeData)->RefreshEventGroupId, sizeof (EFI_GUID));\r
+ ASSERT (ParentStatement != NULL);\r
+ CopyMem (&ParentStatement->RefreshGuid, &((EFI_IFR_REFRESH_ID *) OpCodeData)->RefreshEventGroupId, sizeof (EFI_GUID));\r
break;\r
\r
//\r
break;\r
\r
default:\r
- ASSERT (CurrentStatement != NULL);\r
- CurrentStatement->Locked = TRUE;\r
+ ASSERT (ParentStatement != NULL);\r
+ ParentStatement->Locked = TRUE;\r
} \r
break;\r
\r
ResetScopeStack ();\r
return Status;\r
}\r
+ \r
+ //\r
+ // Parent statement end tag found, update ParentStatement info.\r
+ //\r
+ if (IsStatementOpCode(ScopeOpCode) && (ParentStatement != NULL) && (ParentStatement->Operand == ScopeOpCode)) {\r
+ ParentStatement = ParentStatement->ParentStatement;\r
+ }\r
\r
switch (ScopeOpCode) {\r
case EFI_IFR_FORM_SET_OP:\r
CurrentOption = NULL;\r
break;\r
\r
- case EFI_IFR_SUBTITLE_OP:\r
- mInScopeSubtitle = FALSE;\r
- break;\r
-\r
case EFI_IFR_NO_SUBMIT_IF_OP:\r
case EFI_IFR_INCONSISTENT_IF_OP:\r
+ case EFI_IFR_WARNING_IF_OP:\r
//\r
// Ignore end of EFI_IFR_NO_SUBMIT_IF and EFI_IFR_INCONSISTENT_IF\r
//\r
return Status;\r
}\r
\r
- if (CurrentExpression->Result.Type != EFI_IFR_TYPE_BOOLEAN) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
+ OpCodeDisabled = IsTrue (&CurrentExpression->Result);\r
\r
- OpCodeDisabled = CurrentExpression->Result.Value.b;\r
//\r
// DisableIf Expression is only used once and not queued, free it\r
//\r
default:\r
break;\r
}\r
+\r
+ if (IsStatementOpCode(Operand)) {\r
+ CurrentStatement->ParentStatement = ParentStatement;\r
+ if (Scope != 0) {\r
+ //\r
+ // Scope != 0, other statements or options may nest in this statement.\r
+ // Update the ParentStatement info.\r
+ //\r
+ ParentStatement = CurrentStatement;\r
+ }\r
+ }\r
}\r
\r
return EFI_SUCCESS;\r