]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
BaseTools/VfrCompile: Remove framework VFR support
[mirror_edk2.git] / BaseTools / Source / C / VfrCompile / VfrUtilityLib.cpp
index 9c9c4d40540f85de7583dbc1a6dd3edefd17cce5..2b9b5dbb1ca59b7eb93360f3e5f9744f12437b49 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Vfr common library functions.\r
 \r
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -759,17 +759,6 @@ CVfrVarDataTypeDB::GetFieldOffset (
     return VFR_RETURN_FATAL_ERROR;\r
   }\r
 \r
-  //\r
-  // Framework Vfr file Array Index is from 1.\r
-  // But Uefi Vfr file Array Index is from 0.\r
-  //\r
-  if (VfrCompatibleMode && ArrayIdx != INVALID_ARRAY_INDEX) {\r
-    if (ArrayIdx == 0) {\r
-      return VFR_RETURN_ERROR_ARRARY_NUM;\r
-    }\r
-    ArrayIdx = ArrayIdx - 1;\r
-  }\r
-\r
   if ((ArrayIdx != INVALID_ARRAY_INDEX) && ((Field->mArrayNum == 0) || (Field->mArrayNum <= ArrayIdx))) {\r
     return VFR_RETURN_ERROR_ARRARY_NUM;\r
   }\r
@@ -1683,17 +1672,7 @@ CVfrDataStorage::GetFreeVarStoreId (
 {\r
   UINT32  Index, Mask, Offset;\r
 \r
-  //\r
-  // Assign the different ID range for the different type VarStore to support Framework Vfr\r
-  //\r
   Index = 0;\r
-  if ((!VfrCompatibleMode) || (VarType == EFI_VFR_VARSTORE_BUFFER)) {\r
-    Index = 0;\r
-  } else if (VarType == EFI_VFR_VARSTORE_EFI) {\r
-    Index = 1;\r
-  } else if (VarType == EFI_VFR_VARSTORE_NAME) {\r
-    Index = 2;\r
-  }\r
 \r
   for (; Index < EFI_FREE_VARSTORE_ID_BITMAP_SIZE; Index++) {\r
     if (mFreeVarStoreIdBitMap[Index] != 0xFFFFFFFF) {\r
@@ -1915,13 +1894,6 @@ CVfrDataStorage::GetVarStoreByDataType (
   SVfrVarStorageNode    *pNode;\r
   SVfrVarStorageNode    *MatchNode;\r
 \r
-  //\r
-  // Framework VFR uses Data type name as varstore name, so don't need check again.\r
-  //\r
-  if (VfrCompatibleMode) {\r
-    return VFR_RETURN_UNDEFINED;\r
-  }\r
-\r
   MatchNode = NULL;\r
   for (pNode = mBufferVarStoreList; pNode != NULL; pNode = pNode->mNext) {\r
     if (strcmp (pNode->mStorageInfo.mDataType->mTypeName, DataTypeName) != 0) {\r
@@ -2289,16 +2261,6 @@ CVfrDataStorage::GetNameVarStoreInfo (
     return VFR_RETURN_GET_NVVARSTORE_ERROR;\r
   }\r
 \r
-  //\r
-  // Framework Vfr file Index is from 1, but Uefi Vfr file Index is from 0.\r
-  //\r
-  if (VfrCompatibleMode) {\r
-    if (Index == 0) {\r
-      return VFR_RETURN_ERROR_ARRARY_NUM;\r
-    }\r
-    Index --;\r
-  }\r
-\r
   Info->mInfo.mVarName = mCurrVarStorageNode->mStorageInfo.mNameSpace.mNameTable[Index];\r
 \r
   return VFR_RETURN_SUCCESS;\r
@@ -2861,10 +2823,7 @@ CVfrQuestionDB::RegisterQuestion (
   if (QuestionId == EFI_QUESTION_ID_INVALID) {\r
     QuestionId = GetFreeQuestionId ();\r
   } else {\r
-    //\r
-    // For Framework Vfr, don't check question ID conflict.\r
-    //\r
-    if (!VfrCompatibleMode && ChekQuestionIdFree (QuestionId) == FALSE) {\r
+    if (ChekQuestionIdFree (QuestionId) == FALSE) {\r
       delete pNode;\r
       return VFR_RETURN_QUESTIONID_REDEFINED;\r
     }\r
@@ -3368,10 +3327,7 @@ CVfrQuestionDB::UpdateQuestionId (
     return VFR_RETURN_SUCCESS;\r
   }\r
 \r
-  //\r
-  // For Framework Vfr, don't check question ID conflict.\r
-  //\r
-  if (!VfrCompatibleMode && ChekQuestionIdFree (NewQId) == FALSE) {\r
+  if (ChekQuestionIdFree (NewQId) == FALSE) {\r
     return VFR_RETURN_REDEFINED;\r
   }\r
 \r
@@ -3957,8 +3913,6 @@ CVfrStringDB::GetUnicodeStringTextSize (
   return StringSize;\r
 }\r
 \r
-BOOLEAN  VfrCompatibleMode = FALSE;\r
-\r
 CVfrVarDataTypeDB gCVfrVarDataTypeDB;\r
 CVfrDefaultStore  gCVfrDefaultStore;\r
 CVfrDataStorage  gCVfrDataStorage;\r