Only check the unsupported IFR opcode for framework HII form package.
authorlgao4 <lgao4@de2fecce-e211-0410-80a6-f3fac2684e05>
Thu, 31 Dec 2009 10:36:54 +0000 (10:36 +0000)
committerlgao4 <lgao4@de2fecce-e211-0410-80a6-f3fac2684e05>
Thu, 31 Dec 2009 10:36:54 +0000 (10:36 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@9659 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.c

index bfeb564..979d4be 100644 (file)
@@ -12,24 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <PiDxe.h>\r
-\r
-#include <Protocol/HiiConfigAccess.h>\r
-#include <Protocol/HiiConfigRouting.h>\r
-#include <Protocol/HiiDatabase.h>\r
-#include <Protocol/HiiString.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/HiiLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-\r
-#include <Guid/MdeModuleHii.h>\r
-\r
-#include "UefiIfrParser.h"\r
+#include "HiiDatabase.h"\r
 \r
 #include "UefiIfrParserExpression.h"\r
 \r
@@ -518,12 +501,14 @@ ParseOpCodes (
   ONE_OF_OPTION_MAP_ENTRY *OneOfOptionMapEntry;\r
   UINT8                   OneOfType;\r
   EFI_IFR_ONE_OF          *OneOfOpcode;\r
+  HII_THUNK_CONTEXT       *ThunkContext;\r
 \r
-  mInScopeSubtitle         = FALSE;\r
-  mInScopeSuppress         = FALSE;\r
-  mInScopeGrayOut          = FALSE;\r
-  CurrentDefault           = NULL;\r
-  CurrentOption            = NULL;\r
+  mInScopeSubtitle = FALSE;\r
+  mInScopeSuppress = FALSE;\r
+  mInScopeGrayOut  = FALSE;\r
+  CurrentDefault   = NULL;\r
+  CurrentOption    = NULL;\r
+  ThunkContext     = UefiHiiHandleToThunkContext ((CONST HII_THUNK_PRIVATE_DATA*) mHiiThunkPrivateData, FormSet->HiiHandle);\r
 \r
   //\r
   // Set to a invalid value.\r
@@ -631,8 +616,12 @@ ParseOpCodes (
       break;\r
 \r
     case EFI_IFR_VARSTORE_NAME_VALUE_OP:\r
-      ASSERT (FALSE);\r
-\r
+      //\r
+      // Framework IFR doesn't support Name/Value VarStore opcode\r
+      //\r
+      if (ThunkContext != NULL && ThunkContext->ByFrameworkHiiNewPack) {\r
+        ASSERT (FALSE);\r
+      }\r
       break;\r
 \r
     case EFI_IFR_VARSTORE_EFI_OP:\r
@@ -907,8 +896,12 @@ ParseOpCodes (
       break;\r
 \r
     case EFI_IFR_DISABLE_IF_OP:\r
-      ASSERT (FALSE);\r
-\r
+      //\r
+      // Framework IFR doesn't support DisableIf opcode\r
+      //\r
+      if (ThunkContext != NULL && ThunkContext->ByFrameworkHiiNewPack) {\r
+        ASSERT (FALSE);\r
+      }\r
 \r
     //\r
     // Expression\r