]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Only check the unsupported IFR opcode for framework HII form package.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 31 Dec 2009 10:36:54 +0000 (10:36 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 31 Dec 2009 10:36:54 +0000 (10:36 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9659 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParser.c

index bfeb564ba210bb0b9e5f9585321db8581fe76578..979d4be0a6ac1e339edfa806573f34be37e98eac 100644 (file)
@@ -12,24 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
 \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
 \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
   ONE_OF_OPTION_MAP_ENTRY *OneOfOptionMapEntry;\r
   UINT8                   OneOfType;\r
   EFI_IFR_ONE_OF          *OneOfOpcode;\r
+  HII_THUNK_CONTEXT       *ThunkContext;\r
 \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
 \r
   //\r
   // Set to a invalid value.\r
@@ -631,8 +616,12 @@ ParseOpCodes (
       break;\r
 \r
     case EFI_IFR_VARSTORE_NAME_VALUE_OP:\r
       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
       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
       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
 \r
     //\r
     // Expression\r