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