Sync BaseTool trunk (version r2610) into EDKII BaseTools.
Signed-off-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14856 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -136,6 +136,7 @@ VfrParserStart (
|
||||
#token MapTitle("maptitle") "maptitle"
|
||||
#token MapGuid("mapguid") "mapguid"
|
||||
#token Subtitle("subtitle") "subtitle"
|
||||
#token EndSubtitle("endsubtitle") "endsubtitle"
|
||||
#token Help("help") "help"
|
||||
#token Text("text") "text"
|
||||
#token Option("option") "option"
|
||||
@@ -1018,12 +1019,29 @@ vfrStatementVarStoreNameValue :
|
||||
<<
|
||||
EFI_GUID Guid;
|
||||
CIfrVarStoreNameValue VSNVObj;
|
||||
EFI_VARSTORE_ID VarStoreId;
|
||||
EFI_VARSTORE_ID VarStoreId = EFI_VARSTORE_ID_INVALID;
|
||||
BOOLEAN Created = FALSE;
|
||||
>>
|
||||
L:NameValueVarStore << VSNVObj.SetLineNo(L->getLine()); >>
|
||||
SN:StringIdentifier "," << _PCATCH(mCVfrDataStorage.DeclareNameVarStoreBegin (SN->getText()), SN); >>
|
||||
SN:StringIdentifier ","
|
||||
{
|
||||
VarId "=" ID:Number "," <<
|
||||
_PCATCH(
|
||||
(INTN)(VarStoreId = _STOU16(ID->getText())) != 0,
|
||||
(INTN)TRUE,
|
||||
ID,
|
||||
"varid 0 is not allowed."
|
||||
);
|
||||
>>
|
||||
}
|
||||
(
|
||||
Name "=" "STRING_TOKEN" "\(" N:Number "\)" "," << _PCATCH(mCVfrDataStorage.NameTableAddItem (_STOSID(N->getText())), SN); >>
|
||||
Name "=" "STRING_TOKEN" "\(" N:Number "\)" "," <<
|
||||
if (!Created) {
|
||||
_PCATCH(mCVfrDataStorage.DeclareNameVarStoreBegin (SN->getText(), VarStoreId), SN);
|
||||
Created = TRUE;
|
||||
}
|
||||
_PCATCH(mCVfrDataStorage.NameTableAddItem (_STOSID(N->getText())), SN);
|
||||
>>
|
||||
)+
|
||||
Uuid "=" guidDefinition[Guid] << _PCATCH(mCVfrDataStorage.DeclareNameVarStoreEnd (&Guid), SN); >>
|
||||
<<
|
||||
@@ -1628,8 +1646,14 @@ vfrStatementSubTitle :
|
||||
{
|
||||
"," FLAGS "=" vfrSubtitleFlags[SObj]
|
||||
}
|
||||
{ vfrStatementStatTagList "," }
|
||||
E:";" << CRT_END_OP (E); >>
|
||||
(
|
||||
{vfrStatementStatTagList "," }
|
||||
E:";" << CRT_END_OP (E); >>
|
||||
|
|
||||
{ "," vfrStatementStatTagList}
|
||||
{ "," (vfrStatementStat | vfrStatementQuestions)*}
|
||||
E: EndSubtitle ";" << CRT_END_OP (E); >>
|
||||
)
|
||||
;
|
||||
|
||||
vfrSubtitleFlags [CIfrSubtitle & SObj] :
|
||||
|
@@ -1512,21 +1512,30 @@ CVfrDataStorage::MarkVarStoreIdUnused (
|
||||
|
||||
EFI_VFR_RETURN_CODE
|
||||
CVfrDataStorage::DeclareNameVarStoreBegin (
|
||||
IN CHAR8 *StoreName
|
||||
IN CHAR8 *StoreName,
|
||||
IN EFI_VARSTORE_ID VarStoreId
|
||||
)
|
||||
{
|
||||
SVfrVarStorageNode *pNode = NULL;
|
||||
EFI_VARSTORE_ID VarStoreId;
|
||||
EFI_VARSTORE_ID TmpVarStoreId;
|
||||
|
||||
if (StoreName == NULL) {
|
||||
return VFR_RETURN_FATAL_ERROR;
|
||||
}
|
||||
|
||||
if (GetVarStoreId (StoreName, &VarStoreId) == VFR_RETURN_SUCCESS) {
|
||||
if (GetVarStoreId (StoreName, &TmpVarStoreId) == VFR_RETURN_SUCCESS) {
|
||||
return VFR_RETURN_REDEFINED;
|
||||
}
|
||||
|
||||
if (VarStoreId == EFI_VARSTORE_ID_INVALID) {
|
||||
VarStoreId = GetFreeVarStoreId (EFI_VFR_VARSTORE_NAME);
|
||||
} else {
|
||||
if (ChekVarStoreIdFree (VarStoreId) == FALSE) {
|
||||
return VFR_RETURN_VARSTOREID_REDEFINED;
|
||||
}
|
||||
MarkVarStoreIdUsed (VarStoreId);
|
||||
}
|
||||
|
||||
VarStoreId = GetFreeVarStoreId (EFI_VFR_VARSTORE_NAME);
|
||||
if ((pNode = new SVfrVarStorageNode (StoreName, VarStoreId)) == NULL) {
|
||||
return VFR_RETURN_UNDEFINED;
|
||||
}
|
||||
@@ -2619,6 +2628,14 @@ CVfrQuestionDB::RegisterNewDateQuestion (
|
||||
CHAR8 Index;
|
||||
|
||||
if (BaseVarId == NULL && Name == NULL) {
|
||||
if (QuestionId == EFI_QUESTION_ID_INVALID) {
|
||||
QuestionId = GetFreeQuestionId ();
|
||||
} else {
|
||||
if (ChekQuestionIdFree (QuestionId) == FALSE) {
|
||||
goto Err;
|
||||
}
|
||||
MarkQuestionIdUsed (QuestionId);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2787,6 +2804,14 @@ CVfrQuestionDB::RegisterNewTimeQuestion (
|
||||
CHAR8 Index;
|
||||
|
||||
if (BaseVarId == NULL && Name == NULL) {
|
||||
if (QuestionId == EFI_QUESTION_ID_INVALID) {
|
||||
QuestionId = GetFreeQuestionId ();
|
||||
} else {
|
||||
if (ChekQuestionIdFree (QuestionId) == FALSE) {
|
||||
goto Err;
|
||||
}
|
||||
MarkQuestionIdUsed (QuestionId);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -300,7 +300,7 @@ public:
|
||||
SVfrVarStorageNode * GetEfiVarStoreList () {
|
||||
return mEfiVarStoreList;
|
||||
}
|
||||
EFI_VFR_RETURN_CODE DeclareNameVarStoreBegin (CHAR8 *);
|
||||
EFI_VFR_RETURN_CODE DeclareNameVarStoreBegin (CHAR8 *, EFI_VARSTORE_ID);
|
||||
EFI_VFR_RETURN_CODE NameTableAddItem (EFI_STRING_ID);
|
||||
EFI_VFR_RETURN_CODE DeclareNameVarStoreEnd (EFI_GUID *);
|
||||
|
||||
|
Reference in New Issue
Block a user