BaseTools/VfrCompile: Remove framework VFR support
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464 Currently there is no usage of framework VFR, remove the support from VfrCompile. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
Vfr common library functions.
|
||||
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
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;
|
||||
|
Reference in New Issue
Block a user