From 6d207823bff5686911d626e2ff1176ef00755a4e Mon Sep 17 00:00:00 2001 From: lgao4 Date: Thu, 31 Dec 2009 10:36:54 +0000 Subject: [PATCH] Only check the unsupported IFR opcode for framework HII form package. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9659 6f19259b-4bc3-4df7-8a09-765794883524 --- .../UefiIfrParser.c | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.c index bfeb564ba2..979d4be0a6 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.c @@ -12,24 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "UefiIfrParser.h" +#include "HiiDatabase.h" #include "UefiIfrParserExpression.h" @@ -518,12 +501,14 @@ ParseOpCodes ( ONE_OF_OPTION_MAP_ENTRY *OneOfOptionMapEntry; UINT8 OneOfType; EFI_IFR_ONE_OF *OneOfOpcode; + HII_THUNK_CONTEXT *ThunkContext; - mInScopeSubtitle = FALSE; - mInScopeSuppress = FALSE; - mInScopeGrayOut = FALSE; - CurrentDefault = NULL; - CurrentOption = NULL; + mInScopeSubtitle = FALSE; + mInScopeSuppress = FALSE; + mInScopeGrayOut = FALSE; + CurrentDefault = NULL; + CurrentOption = NULL; + ThunkContext = UefiHiiHandleToThunkContext ((CONST HII_THUNK_PRIVATE_DATA*) mHiiThunkPrivateData, FormSet->HiiHandle); // // Set to a invalid value. @@ -631,8 +616,12 @@ ParseOpCodes ( break; case EFI_IFR_VARSTORE_NAME_VALUE_OP: - ASSERT (FALSE); - + // + // Framework IFR doesn't support Name/Value VarStore opcode + // + if (ThunkContext != NULL && ThunkContext->ByFrameworkHiiNewPack) { + ASSERT (FALSE); + } break; case EFI_IFR_VARSTORE_EFI_OP: @@ -907,8 +896,12 @@ ParseOpCodes ( break; case EFI_IFR_DISABLE_IF_OP: - ASSERT (FALSE); - + // + // Framework IFR doesn't support DisableIf opcode + // + if (ThunkContext != NULL && ThunkContext->ByFrameworkHiiNewPack) { + ASSERT (FALSE); + } // // Expression -- 2.39.2