From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 40ED374004A for ; Tue, 12 Dec 2023 13:24:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=mYBA4+ZvusM8zG6Vm9XDNUbo1yhbNHWttMGQAQn8Uq4=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1702387461; v=1; b=Gh2jKgl8GEwHZmIkFP/5msJ2Kv/e6X94rtxvDccdKcr6RSrOGvFal81GNcN1m/S0XRWG0CYQ sKkP5n/8c3BXI1Ku6anoFTvPaivt/JdsGHhM/7rhcljW89pi8k69q8QpUBoJQOHamtzGcFxFNc3 Yv1HdpecTCUq4mgQVkQKx7DI= X-Received: by 127.0.0.2 with SMTP id oBWEYY7687511xmdDGmcVN31; Tue, 12 Dec 2023 05:24:20 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mx.groups.io with SMTP id smtpd.web10.12618.1702371688424019269 for ; Tue, 12 Dec 2023 01:01:28 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="1612069" X-IronPort-AV: E=Sophos;i="6.04,269,1695711600"; d="scan'208";a="1612069" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 01:01:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="946692274" X-IronPort-AV: E=Sophos;i="6.04,269,1695711600"; d="scan'208";a="946692274" X-Received: from sh0701bl-hv01.ccr.corp.intel.com ([10.239.220.156]) by orsmga005.jf.intel.com with ESMTP; 12 Dec 2023 01:01:25 -0800 From: "Yuting Yang" To: devel@edk2.groups.io Cc: Rebecca Cran , Liming Gao , Bob Feng , Christine Chen Subject: [edk2-devel] [Patch V2] BaseTools: VfrCompiler Adds DefaultValueError Feature Date: Tue, 12 Dec 2023 01:01:19 -0800 Message-Id: <20231212090119.1150-1-yuting2.yang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yuting2.yang@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 7r2k8jXyYUSpE0y2yzvnSVrUx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Gh2jKgl8; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Add --catch_default option Raise a DefaultValueError when encountering VFR default definitions to help remove default variables. Add --except_list option Exclude packages that don't require enabling the catch_default function. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Christine Chen Cc: Yuting Yang Signed-off-by: Yuting Yang --- BaseTools/Source/C/VfrCompile/VfrCompiler.cpp | 40 ++- BaseTools/Source/C/VfrCompile/VfrCompiler.h | 3 + BaseTools/Source/C/VfrCompile/VfrError.cpp | 3 +- BaseTools/Source/C/VfrCompile/VfrError.h | 3 +- BaseTools/Source/C/VfrCompile/VfrFormPkg.h | 1 + BaseTools/Source/C/VfrCompile/VfrSyntax.g | 238 ++++++++++-------- 6 files changed, 184 insertions(+), 104 deletions(-) diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp b/BaseTools/Sour= ce/C/VfrCompile/VfrCompiler.cpp index 5f4d262d85..e97cebff65 100644 --- a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp @@ -78,6 +78,9 @@ CVfrCompiler::OptionInitialization ( mOptions.WarningAsError =3D FALSE;=0D mOptions.AutoDefault =3D FALSE;=0D mOptions.CheckDefault =3D FALSE;=0D + mOptions.IsCatchDefaultEnable =3D FALSE;=0D + mOptions.ExceptionList =3D NULL;=0D + mOptions.ExceptionListSize =3D 0;=0D memset (&mOptions.OverrideClassGuid, 0, sizeof (EFI_GUID));=0D =0D if (Argc =3D=3D 1) {=0D @@ -95,6 +98,23 @@ CVfrCompiler::OptionInitialization ( Version ();=0D SET_RUN_STATUS (STATUS_DEAD);=0D return;=0D + } else if (stricmp(Argv[Index], "--catch_default") =3D=3D 0){=0D + mOptions.IsCatchDefaultEnable =3D TRUE;=0D + } else if (stricmp(Argv[Index], "--except_list") =3D=3D 0){=0D + INT32 Start =3D ++Index;=0D + if ((Start >=3D Argc) || (Argv[Start][0] =3D=3D '-')) {=0D + DebugError (NULL, 0, 1001, "Missing option", "-exception_list miss= ing except list");=0D + goto Fail;=0D + }=0D + while ((Argv[Index][0] !=3D '-') && (Index < Argc - 1)) {=0D + Index++;=0D + }=0D + INT32 End =3D Index--;=0D + mOptions.ExceptionListSize =3D End - Start;=0D + for (INT32 i =3D Start; i < End; i++) {=0D + mOptions.ExceptionList =3D (CHAR8**) realloc(mOptions.ExceptionLis= t, (i - Start + 1) * sizeof(CHAR8*));=0D + mOptions.ExceptionList[i-Start] =3D Argv[i];=0D + }=0D } else if (stricmp(Argv[Index], "-l") =3D=3D 0) {=0D mOptions.CreateRecordListFile =3D TRUE;=0D gCIfrRecordInfoDB.TurnOn ();=0D @@ -179,7 +199,11 @@ CVfrCompiler::OptionInitialization ( goto Fail;=0D }=0D strcpy (mOptions.VfrFileName, Argv[Index]);=0D -=0D + for (int i =3D 0; i < mOptions.ExceptionListSize; i++) {=0D + if (strstr(mOptions.VfrFileName, mOptions.ExceptionList[i]) !=3D NUL= L) {=0D + mOptions.IsCatchDefaultEnable =3D FALSE;=0D + }=0D + }=0D if (mOptions.OutputDirectory =3D=3D NULL) {=0D mOptions.OutputDirectory =3D (CHAR8 *) malloc (1);=0D if (mOptions.OutputDirectory =3D=3D NULL) {=0D @@ -217,6 +241,11 @@ Fail: free (mOptions.VfrFileName);=0D mOptions.VfrFileName =3D NULL;=0D }=0D + if (mOptions.ExceptionList !=3D NULL) {=0D + free(mOptions.ExceptionList);=0D + mOptions.ExceptionList =3D NULL;=0D +=0D + }=0D if (mOptions.VfrBaseFileName !=3D NULL) {=0D free (mOptions.VfrBaseFileName);=0D mOptions.VfrBaseFileName =3D NULL;=0D @@ -496,6 +525,11 @@ CVfrCompiler::~CVfrCompiler ( mOptions.VfrBaseFileName =3D NULL;=0D }=0D =0D + if (mOptions.ExceptionList !=3D NULL) {=0D + free (mOptions.ExceptionList);=0D + mOptions.ExceptionList =3D NULL;=0D + }=0D +=0D if (mOptions.OutputDirectory !=3D NULL) {=0D free (mOptions.OutputDirectory);=0D mOptions.OutputDirectory =3D NULL;=0D @@ -679,7 +713,7 @@ CVfrCompiler::Compile ( DebugError (NULL, 0, 0001, "Error opening the input file", "%s", InFil= eName);=0D goto Fail;=0D }=0D -=0D + InputInfo.IsCatchDefaultEnable =3D mOptions.IsCatchDefaultEnable;=0D if (mOptions.HasOverrideClassGuid) {=0D InputInfo.OverrideClassGuid =3D &mOptions.OverrideClassGuid;=0D } else {=0D @@ -937,5 +971,3 @@ main ( =0D return GetUtilityStatus ();=0D }=0D -=0D -=0D diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.h b/BaseTools/Source= /C/VfrCompile/VfrCompiler.h index b6e207d2ce..39e0a89a29 100644 --- a/BaseTools/Source/C/VfrCompile/VfrCompiler.h +++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.h @@ -52,6 +52,9 @@ typedef struct { BOOLEAN WarningAsError;=0D BOOLEAN AutoDefault;=0D BOOLEAN CheckDefault;=0D + BOOLEAN IsCatchDefaultEnable;=0D + CHAR8** ExceptionList;=0D + INT16 ExceptionListSize;=0D } OPTIONS;=0D =0D typedef enum {=0D diff --git a/BaseTools/Source/C/VfrCompile/VfrError.cpp b/BaseTools/Source/= C/VfrCompile/VfrError.cpp index 65bb8e34fd..8a706f929b 100644 --- a/BaseTools/Source/C/VfrCompile/VfrError.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrError.cpp @@ -49,7 +49,8 @@ static SVFR_WARNING_HANDLE VFR_WARNING_HANDLE_TABLE [] = =3D { { VFR_WARNING_DEFAULT_VALUE_REDEFINED, ": default value re-defined with = different value"},=0D { VFR_WARNING_ACTION_WITH_TEXT_TWO, ": Action opcode should not have Tex= tTwo part"},=0D { VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE, ": Not recommend to use obsole= ted framework opcode"},=0D - { VFR_WARNING_CODEUNDEFINED, ": undefined Warning Code" }=0D + { VFR_WARNING_CODEUNDEFINED, ": undefined Warning Code" },=0D + { VFR_WARNING_UNSUPPORTED, ": pls remove the default values if necessary= " }=0D };=0D =0D CVfrErrorHandle::CVfrErrorHandle (=0D diff --git a/BaseTools/Source/C/VfrCompile/VfrError.h b/BaseTools/Source/C/= VfrCompile/VfrError.h index 7d16bd5f74..1b4bc173d2 100644 --- a/BaseTools/Source/C/VfrCompile/VfrError.h +++ b/BaseTools/Source/C/VfrCompile/VfrError.h @@ -47,7 +47,8 @@ typedef enum { VFR_WARNING_DEFAULT_VALUE_REDEFINED =3D 0,=0D VFR_WARNING_ACTION_WITH_TEXT_TWO,=0D VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,=0D - VFR_WARNING_CODEUNDEFINED=0D + VFR_WARNING_CODEUNDEFINED,=0D + VFR_WARNING_UNSUPPORTED=0D } EFI_VFR_WARNING_CODE;=0D =0D typedef struct _SVFR_ERROR_HANDLE {=0D diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/= C/VfrCompile/VfrFormPkg.h index 9ef6f07787..d8fada3bcb 100644 --- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h +++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h @@ -96,6 +96,7 @@ struct SBufferNode { =0D typedef struct {=0D EFI_GUID *OverrideClassGuid;=0D + BOOLEAN IsCatchDefaultEnable;=0D } INPUT_INFO_TO_SYNTAX;=0D =0D class CFormPkg {=0D diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C= /VfrCompile/VfrSyntax.g index 55fd067f8a..5daf1c423c 100644 --- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g +++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g @@ -50,6 +50,7 @@ VfrParserStart ( {=0D ParserBlackBox VfrParser(File);= =0D VfrParser.parser()->SetOverrideClassGuid (InputInfo->OverrideClassGuid);= =0D + VfrParser.parser()->SetIsCatchDefaultEnable(InputInfo->IsCatchDefaultEna= ble);=0D return VfrParser.parser()->vfrProgram();=0D }=0D >>=0D @@ -386,8 +387,8 @@ dataStructField32 [BOOLEAN FieldInUnion]: ;=0D =0D dataStructField16 [BOOLEAN FieldInUnion]:=0D - << =0D - UINT32 ArrayNum =3D 0; =0D + <<=0D + UINT32 ArrayNum =3D 0;=0D >>=0D ("UINT16" | "CHAR16")=0D N:StringIdentifier=0D @@ -737,7 +738,7 @@ vfrFormSetList : ;=0D =0D vfrStatementExtension:=0D - << =0D + <<=0D EFI_GUID Guid;=0D CIfrGuid *GuidObj =3D NULL;=0D CHAR8 *TypeName =3D NULL;=0D @@ -751,7 +752,7 @@ vfrStatementExtension: >>=0D L:GuidOp=0D Uuid "=3D" guidDefinition[Guid]=0D - {"," DataType "=3D" =0D + {"," DataType "=3D"=0D (=0D U64:"UINT64" {OpenBracket AN1:Number CloseBracket <getText(), AN1->getLine());>>}=0D << TypeName =3D U64-= >getText(); LineNum =3D U64->getLine(); >>=0D @@ -770,7 +771,7 @@ vfrStatementExtension: | T:"EFI_HII_TIME" {OpenBracket AN8:Number CloseBracket <getText(), AN8->getLine());>>}=0D << TypeName =3D T->g= etText(); LineNum =3D T->getLine(); IsStruct =3D TRUE;>>=0D | R:"EFI_HII_REF" {OpenBracket AN9:Number CloseBracket <getText(), AN9->getLine());>>}=0D - << TypeName =3D R->g= etText(); LineNum =3D R->getLine(); IsStruct =3D TRUE;>> = =0D + << TypeName =3D R->g= etText(); LineNum =3D R->getLine(); IsStruct =3D TRUE;>>=0D | TN:StringIdentifier {OpenBracket AN10:Number CloseBracket <getText(), AN10->getLine());>>}=0D << TypeName =3D TN->= getText(); LineNum =3D TN->getLine(); IsStruct =3D TRUE;>>=0D )=0D @@ -875,19 +876,19 @@ vfrExtensionData[UINT8 *DataBuff, UINT32 Size, CHAR8 = *TypeName, UINT32 TypeSize, memcpy (ByteOffset, &Data_U64, TypeSize);=0D }else if (strcmp ("UINT32", TypeName) =3D=3D 0) {=0D Data_U32 =3D _STOU32(RD->getText(), RD->getLine());=0D - memcpy (ByteOffset, &Data_U32, TypeSize); = =0D + memcpy (ByteOffset, &Data_U32, TypeSize);=0D }else if (strcmp ("UINT16", TypeName) =3D=3D 0) {=0D Data_U16 =3D _STOU16(RD->getText(), RD->getLine());=0D - memcpy (ByteOffset, &Data_U16, TypeSize); = =0D + memcpy (ByteOffset, &Data_U16, TypeSize);=0D }else if (strcmp ("UINT8", TypeName) =3D=3D 0) {=0D Data_U8 =3D _STOU8(RD->getText(), RD->getLine());=0D - memcpy (ByteOffset, &Data_U8, TypeSize); = =0D + memcpy (ByteOffset, &Data_U8, TypeSize);=0D }else if (strcmp ("BOOLEAN", TypeName)=3D=3D 0) {=0D Data_BL =3D _STOU8(RD->getText(), RD->getLine());=0D - memcpy (ByteOffset, &Data_BL, TypeSize); = =0D + memcpy (ByteOffset, &Data_BL, TypeSize);=0D }else if (strcmp ("EFI_STRING_ID", TypeName) =3D=3D 0) {=0D Data_SID =3D _STOSID(RD->getText(), RD->getLine());=0D - memcpy (ByteOffset, &Data_SID, TypeSize); = =0D + memcpy (ByteOffset, &Data_SID, TypeSize);=0D }=0D } else {=0D gCVfrVarDataTypeDB.GetDataFieldInfo(TFName, FieldOffset, Fie= ldType, FieldSize, BitField);=0D @@ -975,7 +976,15 @@ vfrExtensionData[UINT8 *DataBuff, UINT32 Size, CHAR8 *= TypeName, UINT32 TypeSize, =0D vfrStatementDefaultStore :=0D << UINT16 DefaultId =3D EFI_HII_DEFAULT_CLASS_STANDARD; >>=0D - D:DefaultStore N:StringIdentifier ","=0D + D:DefaultStore N:StringIdentifier "," <<=0D + if (mIsCatchDefaultE= nable) {=0D + gCVfrErrorHandle.Han= dleWarning (=0D + VFR_WARNING_UNSU= PPORTED,=0D + D->getLine(),=0D + D->getText()=0D + );=0D + }=0D + >>=0D Prompt "=3D" "STRING_TOKEN" "\(" S:Number "\)"=0D {=0D "," Attribute "=3D" A:Number << DefaultId =3D _ST= OU16(A->getText(), A->getLine()); >>=0D @@ -1074,7 +1083,7 @@ vfrStatementVarStoreEfi : | U64:"UINT64" "," << TypeName =3D U64->g= etText(); LineNum =3D U64->getLine(); >>=0D | D:"EFI_HII_DATE" "," << TypeName =3D D->get= Text(); LineNum =3D D->getLine(); >>=0D | T:"EFI_HII_TIME" "," << TypeName =3D T->get= Text(); LineNum =3D T->getLine(); >>=0D - | R:"EFI_HII_REF" "," << TypeName =3D R->get= Text(); LineNum =3D R->getLine(); >> =0D + | R:"EFI_HII_REF" "," << TypeName =3D R->get= Text(); LineNum =3D R->getLine(); >>=0D )=0D {=0D VarId "=3D" ID:Number "," <<=0D @@ -1092,8 +1101,8 @@ vfrStatementVarStoreEfi : (=0D Name "=3D" SN:StringIdentifier "," << StoreName =3D SN-= >getText(); >>=0D |=0D - Name "=3D" "STRING_TOKEN" "\(" VN:Number "\)" "," =0D - VarSize "=3D" N:Number "," << =0D + Name "=3D" "STRING_TOKEN" "\(" VN:Number "\)" ","=0D + VarSize "=3D" N:Number "," <<=0D IsUEFI23EfiVarstore= =3D FALSE;=0D StoreName =3D gCVfr= StringDB.GetVarStoreNameFormStringId(_STOSID(VN->getText(), VN->getLine()))= ;=0D if (StoreName =3D= =3D NULL) {=0D @@ -1116,7 +1125,7 @@ vfrStatementVarStoreEfi : break;=0D case 8:=0D TypeName =3D (CHAR= 8 *) "UINT64";=0D - break; =0D + break;=0D default:=0D _PCATCH (VFR_RETUR= N_UNSUPPORTED, N);=0D break;=0D @@ -1124,7 +1133,7 @@ vfrStatementVarStoreEfi : >>=0D )=0D =0D - Uuid "=3D" guidDefinition[Guid] << =0D + Uuid "=3D" guidDefinition[Guid] <<=0D if (IsUEFI23EfiVars= tore) {=0D _PCATCH(gCVfrDataSt= orage.DeclareBufferVarStore (=0D = StoreName,=0D @@ -1150,7 +1159,7 @@ vfrStatementVarStoreEfi : }=0D VSEObj.SetGuid (&Gu= id);=0D VSEObj.SetVarStoreI= d (VarStoreId);=0D - =0D +=0D VSEObj.SetSize ((UI= NT16) Size);=0D VSEObj.SetName (Sto= reName);=0D if (IsUEFI23EfiVars= tore =3D=3D FALSE && StoreName !=3D NULL) {=0D @@ -1184,7 +1193,7 @@ vfrStatementVarStoreNameValue : >>=0D }=0D (=0D - Name "=3D" "STRING_TOKEN" "\(" N:Number "\)" "," << =0D + Name "=3D" "STRING_TOKEN" "\(" N:Number "\)" "," <<=0D if (!Created) {=0D _PCATCH(gCVfrData= Storage.DeclareNameVarStoreBegin (SN->getText(), VarStoreId), SN);=0D Created =3D TRUE;= =0D @@ -1245,12 +1254,12 @@ vfrStatementDisableIfFormSet : vfrStatementSuppressIfFormSet :=0D << CIfrSuppressIf SIObj;>>=0D L:SuppressIf <<=0D - SIObj.SetLineNo= (L->getLine()); =0D + SIObj.SetLineNo= (L->getLine());=0D >>=0D { FLAGS "=3D" flagsField ( "\|" flagsField )* "," }=0D vfrStatementExpression[0] ";"=0D vfrFormSetList=0D - E: EndIf =0D + E: EndIf=0D ";" << CRT_END_OP (E); = >>=0D ;=0D =0D @@ -1491,7 +1500,7 @@ vfrQuestionDataFieldName [EFI_QUESTION_ID &QId, UINT3= 2 &Mask, CHAR8 *&VarIdStr, (=0D SN2:StringIdentifier << _STRCAT (&VarIdStr,= SN2->getText()); LineNo =3D SN2->getLine(); >>=0D (=0D - "." << =0D + "." <<=0D _STRCAT (&VarIdStr,= ".");=0D if (mConstantOnlyIn= Expression) {=0D _PCATCH(VFR_RETUR= N_CONSTANT_ONLY, LineNo);=0D @@ -1518,7 +1527,7 @@ vfrQuestionDataFieldName [EFI_QUESTION_ID &QId, UINT3= 2 &Mask, CHAR8 *&VarIdStr, ;=0D =0D vfrConstantValueField[UINT8 Type, EFI_IFR_TYPE_VALUE &Value, BOOLEAN &List= Type] :=0D - << =0D + <<=0D EFI_GUID Guid;=0D BOOLEAN Negative =3D FALSE;=0D BOOLEAN IntDecStyle =3D FALSE;=0D @@ -1634,11 +1643,11 @@ vfrConstantValueField[UINT8 Type, EFI_IFR_TYPE_VALU= E &Value, BOOLEAN &ListType] | Z:Zero << $Value.u8 =3D _= STOU8(Z->getText(), Z->getLine()); >>=0D | HOUR:Number ":" MINUTE:Number ":" SECOND:Number << $Value.time =3D _= STOT(HOUR->getText(), MINUTE->getText(),SECOND->getText(), HOUR->getLine())= ; >>=0D | YEAR:Number "/" MONTH:Number "/" DAY:Number << $Value.date =3D _= STOD(YEAR->getText(), MONTH->getText(), DAY->getText(), YEAR->getLine()); >= >=0D - | QI:Number";" FI:Number";" guidDefinition[Guid] ";" "STRING_TOKEN" "\("= DP:Number "\)" =0D + | QI:Number";" FI:Number";" guidDefinition[Guid] ";" "STRING_TOKEN" "\("= DP:Number "\)"=0D << $Value.ref =3D _= STOR(QI->getText(), FI->getText(), &Guid, DP->getText(), QI->getLine()); >>= =0D | "STRING_TOKEN" "\(" S1:Number "\)" << $Value.string =3D _= STOSID(S1->getText(), S1->getLine()); >>=0D | "\{" << ListType =3D TRUE; = >>=0D - L1:Number << =0D + L1:Number <<=0D switch (Type) {=0D case EFI_IFR_TYPE= _NUM_SIZE_8 :=0D Type8[Index] = =3D _STOU8(L1->getText(), L1->getLine());=0D @@ -1658,8 +1667,8 @@ vfrConstantValueField[UINT8 Type, EFI_IFR_TYPE_VALUE = &Value, BOOLEAN &ListType] Index++;=0D >>=0D (=0D - "," =0D - L2:Number << =0D + ","=0D + L2:Number <<=0D switch (Type) {=0D case EFI_IFR_TYPE= _NUM_SIZE_8 :=0D Type8[Index] = =3D _STOU8(L2->getText(), L2->getLine());=0D @@ -1679,7 +1688,7 @@ vfrConstantValueField[UINT8 Type, EFI_IFR_TYPE_VALUE = &Value, BOOLEAN &ListType] Index++;=0D >>=0D )*=0D - "\}" =0D + "\}"=0D ;=0D =0D //************************************************************************= *****=0D @@ -1714,7 +1723,7 @@ vfrFormDefinition : ;=0D =0D vfrFormMapDefinition :=0D - << =0D + <<=0D CIfrFormMap *FMapObj =3D NULL;=0D UINT32 FormMapMethodNumber =3D 0;=0D EFI_GUID Guid;=0D @@ -1775,11 +1784,15 @@ vfrStatementDefault : CIfrNumeric *NumericQst =3D NULL;=0D =0D >>=0D - D:Default =0D + D:Default <<=0D + if (mIsCatchDefaul= tEnable) {=0D + DefaultValueErro= r(VFR_RETURN_UNSUPPORTED, D->getLine());=0D + }=0D + >>=0D (=0D (=0D - "=3D" vfrConstantValueField[_GET_CURRQEST_DATATYPE(), *Val, ArrayTyp= e] "," =0D - << =0D + "=3D" vfrConstantValueField[_GET_CURRQEST_DATATYPE(), *Val, ArrayTyp= e] ","=0D + <<=0D if (gCurrentMinMax= Data !=3D NULL && gCurrentMinMaxData->IsNumericOpcode()) {=0D //check default = value is valid for Numeric Opcode=0D NumericQst =3D (= CIfrNumeric *) gCurrentQuestion;=0D @@ -1888,14 +1901,14 @@ vfrStatementDefault : vfrStatementValue "," << CIfrEnd EndObj1; En= dObj1.SetLineNo(D->getLine()); >>=0D )=0D {=0D - DefaultStore "=3D" SN:StringIdentifier "," << =0D + DefaultStore "=3D" SN:StringIdentifier "," <<=0D _PCATCH(gCVfrDefau= ltStore.GetDefaultId (SN->getText(), &DefaultId), SN);=0D if (DObj !=3D NULL= ) {=0D - DObj->SetDefault= Id (DefaultId); =0D - } =0D + DObj->SetDefault= Id (DefaultId);=0D + }=0D =0D if (DObj2 !=3D NUL= L) {=0D - DObj2->SetDefaul= tId (DefaultId); =0D + DObj2->SetDefaul= tId (DefaultId);=0D }=0D >>=0D }=0D @@ -1917,8 +1930,8 @@ vfrStatementDefault : );=0D }=0D }=0D - if (DObj !=3D NULL= ) {delete DObj;} =0D - if (DObj2 !=3D NULL= ) {delete DObj2;} =0D + if (DObj !=3D NULL= ) {delete DObj;}=0D + if (DObj2 !=3D NULL= ) {delete DObj2;}=0D >>=0D )=0D ;=0D @@ -1970,11 +1983,15 @@ vfrStatementInvalid : ;=0D =0D flagsField :=0D - Number =0D - | InteractiveFlag =0D - | ManufacturingFlag =0D - | DefaultFlag =0D - | ResetRequiredFlag =0D + Number=0D + | InteractiveFlag=0D + | ManufacturingFlag=0D + | D:DefaultFlag <<=0D + if (mIsCatchDefa= ultEnable) {=0D + DefaultValueEr= ror(VFR_RETURN_UNSUPPORTED, D->getLine());=0D + }=0D + >>=0D + | ResetRequiredFlag=0D | ReconnectRequiredFlag=0D | N:NVAccessFlag <<=0D gCVfrErrorHandle= .HandleWarning (=0D @@ -1989,7 +2006,7 @@ flagsField : L->getLine(),= =0D L->getText()=0D );=0D - >> =0D + >>=0D ;=0D =0D vfrStatementValue :=0D @@ -2001,13 +2018,13 @@ vfrStatementValue : vfrStatementRead :=0D << CIfrRead RObj; >>=0D R:Read << RObj.SetLineNo(R= ->getLine()); >>=0D - vfrStatementExpression[0] ";" =0D + vfrStatementExpression[0] ";"=0D ;=0D =0D vfrStatementWrite :=0D << CIfrWrite WObj; >>=0D W:Write << WObj.SetLineNo(W= ->getLine()); >>=0D - vfrStatementExpression[0] ";" =0D + vfrStatementExpression[0] ";"=0D ;=0D =0D vfrStatementSubTitle :=0D @@ -2140,7 +2157,7 @@ vfrStatementGoto : FormId "=3D" F3:Number "," << RefType =3D 2;= FId =3D _STOFID(F3->getText(), F3->getLine()); >>=0D Question "=3D"=0D (=0D - QN3:StringIdentifier "," << =0D + QN3:StringIdentifier "," <<=0D mCVfrQuestionDB.= GetQuestionId (QN3->getText (), NULL, QId, BitMask);=0D if (QId =3D=3D E= FI_QUESTION_ID_INVALID) {=0D _PCATCH(VFR_RE= TURN_UNDEFINED, QN3);=0D @@ -2222,7 +2239,7 @@ vfrStatementGoto : "," Key "=3D" KN:Number << AssignQuestion= Key (*QHObj, KN); >>=0D }=0D {=0D - E:"," =0D + E:","=0D vfrStatementQuestionOptionList << OHObj->SetScope(= 1); CRT_END_OP (E);>>=0D }=0D ";" << if (R1Obj !=3D N= ULL) {delete R1Obj;} if (R2Obj !=3D NULL) {delete R2Obj;} if (R3Obj !=3D NU= LL) {delete R3Obj;} if (R4Obj !=3D NULL) {delete R4Obj;} if (R5Obj !=3D NUL= L) {delete R5Obj;}>>=0D @@ -2511,20 +2528,20 @@ minMaxDateStepDefault[EFI_HII_DATE & D, UINT8 KeyVa= lue] : {=0D "default" "=3D" N:Number "," <<=0D switch (KeyValue= ) {=0D - case 0: =0D + case 0:=0D D.Year =3D _S= TOU16(N->getText(), N->getLine());=0D if (D.Year < _= STOU16 (MinN->getText(), MinN->getLine()) || D.Year > _STOU16 (MaxN->getTex= t(), MaxN->getLine())) {=0D _PCATCH (VFR= _RETURN_INVALID_PARAMETER, N->getLine(), "Year default value must be betwee= n Min year and Max year.");=0D }=0D break;=0D - case 1: =0D - D.Month =3D _S= TOU8(N->getText(), N->getLine()); =0D + case 1:=0D + D.Month =3D _S= TOU8(N->getText(), N->getLine());=0D if (D.Month < = 1 || D.Month > 12) {=0D _PCATCH (VFR= _RETURN_INVALID_PARAMETER, N->getLine(), "Month default value must be betwe= en 1 and 12.");=0D }=0D break;=0D - case 2: =0D - D.Day =3D _STO= U8(N->getText(), N->getLine()); =0D + case 2:=0D + D.Day =3D _STO= U8(N->getText(), N->getLine());=0D if (D.Day < 1 = || D.Day > 31) {=0D _PCATCH (VFR= _RETURN_INVALID_PARAMETER, N->getLine(), "Day default value must be between= 1 and 31.");=0D }=0D @@ -2570,7 +2587,7 @@ vfrSetMinMaxStep[CIfrMinMaxStepData & MMSDObj] : BOOLEAN MinNegative =3D FALSE;=0D BOOLEAN MaxNegative =3D FALSE;=0D >>=0D - Minimum "=3D" =0D + Minimum "=3D"=0D {=0D "\-" << MinNegative =3D = TRUE; >>=0D }=0D @@ -2659,8 +2676,8 @@ vfrSetMinMaxStep[CIfrMinMaxStepData & MMSDObj] : }=0D }=0D >>=0D - Maximum "=3D" =0D - { =0D + Maximum "=3D"=0D + {=0D "\-" << MaxNegative =3D = TRUE; >>=0D }=0D A:Number "," <<=0D @@ -2889,7 +2906,7 @@ vfrStatementNumeric : }=0D >>=0D vfrStatementQuestionOptionList=0D - E:EndNumeric << =0D + E:EndNumeric <<=0D CRT_END_OP (E);= =0D if (GuidObj !=3D= NULL) {=0D GuidObj->SetSc= ope(1);=0D @@ -3131,7 +3148,7 @@ vfrStatementString : {=0D Key "=3D" KN:Number "," << AssignQuestion= Key (SObj, KN); >>=0D }=0D - MinSize "=3D" MIN:Number "," << =0D + MinSize "=3D" MIN:Number "," <<=0D VarArraySize =3D= _GET_CURRQEST_ARRAY_SIZE();=0D StringMinSize = =3D _STOU8(MIN->getText(), MIN->getLine());=0D if (_STOU64(MIN-= >getText(), MIN->getLine()) > StringMinSize) {=0D @@ -3141,7 +3158,7 @@ vfrStatementString : }=0D SObj.SetMinSize = (StringMinSize);=0D >>=0D - MaxSize "=3D" MAX:Number "," << =0D + MaxSize "=3D" MAX:Number "," <<=0D StringMaxSize = =3D _STOU8(MAX->getText(), MAX->getLine());=0D if (_STOU64(MAX-= >getText(), MAX->getLine()) > StringMaxSize) {=0D _PCATCH (VFR_R= ETURN_INVALID_PARAMETER, MAX->getLine(), "String MaxSize takes only one byt= e, which can't be larger than 0xFF.");=0D @@ -3185,7 +3202,7 @@ vfrStatementPassword : {=0D Key "=3D" KN:Number "," << AssignQuestion= Key (PObj, KN); >>=0D }=0D - MinSize "=3D" MIN:Number "," << =0D + MinSize "=3D" MIN:Number "," <<=0D VarArraySize =3D= _GET_CURRQEST_ARRAY_SIZE();=0D PasswordMinSize = =3D _STOU16(MIN->getText(), MIN->getLine());=0D if (_STOU64(MIN-= >getText(), MIN->getLine()) > PasswordMinSize) {=0D @@ -3195,7 +3212,7 @@ vfrStatementPassword : }=0D PObj.SetMinSize = (PasswordMinSize);=0D >>=0D - MaxSize "=3D" MAX:Number "," << =0D + MaxSize "=3D" MAX:Number "," <<=0D PasswordMaxSize = =3D _STOU16(MAX->getText(), MAX->getLine());=0D if (_STOU64(MAX-= >getText(), MAX->getLine()) > PasswordMaxSize) {=0D _PCATCH (VFR_R= ETURN_INVALID_PARAMETER, MAX->getLine(), "Password MaxSize takes only two b= yte, which can't be larger than 0xFFFF.");=0D @@ -3230,12 +3247,12 @@ vfrStatementOrderedList : >>=0D L:OrderedList << OLObj.SetLineNo(= L->getLine()); gIsOrderedList =3D TRUE;>>=0D vfrQuestionHeader[OLObj] ","=0D - << =0D + <<=0D VarArraySize =3D= _GET_CURRQEST_ARRAY_SIZE();=0D OLObj.SetMaxCont= ainers ((UINT8) (VarArraySize > 0xFF ? 0xFF : VarArraySize));=0D >>=0D {=0D - MaxContainers "=3D" M:Number "," << =0D + MaxContainers "=3D" M:Number "," <<=0D if (_STOU64(M->g= etText(), M->getLine()) > _STOU8(M->getText(), M->getLine())) {=0D _PCATCH (VFR_R= ETURN_INVALID_PARAMETER, M->getLine(), "OrderedList MaxContainers takes onl= y one byte, which can't be larger than 0xFF.");=0D } else if (VarAr= raySize !=3D 0 && _STOU8(M->getText(), M->getLine()) > VarArraySize) {=0D @@ -3328,19 +3345,19 @@ minMaxTimeStepDefault[EFI_HII_TIME & T, UINT8 KeyVa= lue] : {=0D "default" "=3D" N:Number "," <<=0D switch (KeyValue= ) {=0D - case 0: =0D - T.Hour =3D _= STOU8(N->getText(), N->getLine()); =0D + case 0:=0D + T.Hour =3D _= STOU8(N->getText(), N->getLine());=0D if (T.Hour > 2= 3) {=0D _PCATCH (VFR= _RETURN_INVALID_PARAMETER, N->getLine(), "Hour default value must be betwee= n 0 and 23.");=0D }=0D break;=0D - case 1: =0D - T.Minute =3D _= STOU8(N->getText(), N->getLine()); =0D + case 1:=0D + T.Minute =3D _= STOU8(N->getText(), N->getLine());=0D if (T.Minute >= 59) {=0D _PCATCH (VFR= _RETURN_INVALID_PARAMETER, N->getLine(), "Minute default value must be betw= een 0 and 59.");=0D }=0D break;=0D - case 2: =0D + case 2:=0D T.Second =3D _= STOU8(N->getText(), N->getLine());=0D if (T.Second >= 59) {=0D _PCATCH (VFR= _RETURN_INVALID_PARAMETER, N->getLine(), "Second default value must be betw= een 0 and 59.");=0D @@ -3419,11 +3436,11 @@ vfrStatementStatListOld : ;=0D =0D vfrStatementDisableIfStat :=0D - << =0D - CIfrDisableIf DIObj; =0D + <<=0D + CIfrDisableIf DIObj;=0D >>=0D L:DisableIf << DIObj.SetLineNo(= L->getLine()); >>=0D - vfrStatementExpression[0] ";" =0D + vfrStatementExpression[0] ";"=0D ( vfrStatementStatList )*=0D E:EndIf << CRT_END_OP (E); = >>=0D ";"=0D @@ -3548,8 +3565,8 @@ vfrStatementWarningIf : ;=0D =0D vfrStatementDisableIfQuest :=0D - << =0D - CIfrDisableIf DIObj; =0D + <<=0D + CIfrDisableIf DIObj;=0D >>=0D L:DisableIf << DIObj.SetLineNo(= L->getLine()); >>=0D vfrStatementExpression[0] ";"=0D @@ -3616,15 +3633,15 @@ vfrStatementOneOfOption : UINT32 *Type32 =3D (UINT32 *) ValueList;=0D UINT64 *Type64 =3D (UINT64 *) ValueList;=0D >>=0D - L:Option << =0D + L:Option <<=0D if (_GET_CURRQES= T_DATATYPE() =3D=3D EFI_IFR_TYPE_OTHER) {=0D _PCATCH (VFR_R= ETURN_FATAL_ERROR, L->getLine(), "Get data type error.");=0D }=0D =0D >>=0D - Text "=3D" "STRING_TOKEN" "\(" S:Number "\)" "," =0D + Text "=3D" "STRING_TOKEN" "\(" S:Number "\)" ","=0D Value "=3D" vfrConstantValueField[_GET_CURRQEST_DATATYPE(), *Val, ArrayT= ype] ","=0D - << =0D + <<=0D if (gCurrentMinM= axData !=3D NULL) {=0D //set min/max = value for oneof opcode=0D UINT64 Step = =3D gCurrentMinMaxData->GetStepData(_GET_CURRQEST_DATATYPE(), _GET_CURRQEST= _VARTINFO().mIsBitVar);=0D @@ -3696,7 +3713,7 @@ vfrStatementOneOfOption : Size +=3D OFFSET= _OF (EFI_IFR_ONE_OF_OPTION, Value);=0D OOOObj =3D new C= IfrOneOfOption((UINT8)Size);=0D OOOObj->SetLineN= o(L->getLine());=0D - OOOObj->SetOptio= n (_STOSID(S->getText(), S->getLine())); =0D + OOOObj->SetOptio= n (_STOSID(S->getText(), S->getLine()));=0D if (ArrayType) {= =0D OOOObj->SetTyp= e (EFI_IFR_TYPE_BUFFER);=0D } else {=0D @@ -3706,7 +3723,7 @@ vfrStatementOneOfOption : OOOObj->SetT= ype (_GET_CURRQEST_DATATYPE());=0D }=0D }=0D - OOOObj->SetValue= (*Val); =0D + OOOObj->SetValue= (*Val);=0D >>=0D F:FLAGS "=3D" vfrOneOfOptionFlags[*OOOObj, F->getLine()]=0D <<=0D @@ -3790,7 +3807,12 @@ oneofoptionFlagsField [UINT8 & HFlags, UINT8 & LFlag= s] : | RestStyleFlag << $HFlags |=3D 0x2= 0; >>=0D | ReconnectRequiredFlag << $HFlags |=3D 0x4= 0; >>=0D | ManufacturingFlag << $LFlags |=3D 0x2= 0; >>=0D - | DefaultFlag << $LFlags |=3D 0x1= 0; >>=0D + | D:DefaultFlag <<=0D + $LFlags |=3D 0x1= 0;=0D + if (mIsCatchDefa= ultEnable) {=0D + DefaultValueEr= ror(VFR_RETURN_UNSUPPORTED, D->getLine());=0D + }=0D + >>=0D | A:NVAccessFlag <<=0D gCVfrErrorHandle= .HandleWarning (=0D VFR_WARNING_OB= SOLETED_FRAMEWORK_OPCODE,=0D @@ -3963,7 +3985,7 @@ vfrStatementExpression [UINT32 RootLevel, UINT32 ExpO= pCount =3D 0] : }=0D }=0D }=0D - =0D +=0D if ($RootLevel = =3D=3D 0) {=0D _CLEAR_SAVED_O= PHDR ();=0D mCIfrOpHdrInde= x --;=0D @@ -4405,10 +4427,10 @@ ideqvallistExp[UINT32 & RootLevel, UINT32 & ExpOpCo= unt] : for (Index =3D= 0; Index < ListLen; Index++) {=0D EILObj.SetVa= lueList (Index, ValueList[Index]);=0D }=0D - =0D +=0D EILObj.UpdateI= frBuffer();=0D - _SAVE_OPHDR_CO= ND (EILObj, ($ExpOpCount =3D=3D 0), L->getLine()); = =0D - =0D + _SAVE_OPHDR_CO= ND (EILObj, ($ExpOpCount =3D=3D 0), L->getLine());=0D +=0D if (QId =3D=3D= EFI_QUESTION_ID_INVALID) {=0D EILObj.SetQu= estionId (QId, VarIdStr, LineNo);=0D }=0D @@ -4458,9 +4480,9 @@ stringref1Exp[UINT32 & RootLevel, UINT32 & ExpOpCount= ] : >>=0D L:StringRef=0D "\("=0D - ( =0D + (=0D "STRING_TOKEN"=0D - "\(" =0D + "\("=0D S:Number << RefStringId =3D _STOSID(S->getText(), S->getLine());= >>=0D "\)"=0D | I:Number << RefStringId =3D _STOSID(I->getText(), I->getLine());= >>=0D @@ -4499,10 +4521,10 @@ getExp[UINT32 & RootLevel, UINT32 & ExpOpCount] : Info.mVarStoreId =3D 0;=0D >>=0D L:Get=0D - "\(" =0D + "\("=0D vfrStorageVarId[Info, VarIdStr, FALSE]=0D {"\|" FLAGS "=3D" numericVarStoreType [VarType] }=0D - "\)" << =0D + "\)" <<=0D {=0D if (Info.mVarS= toreId =3D=3D 0) {=0D // support D= ate/Time question=0D @@ -4549,9 +4571,9 @@ getExp[UINT32 & RootLevel, UINT32 & ExpOpCount] : _PCATCH(VF= R_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode don't support data arra= y");=0D }=0D }=0D - CIfrGet GObj(L= ->getLine()); =0D - _SAVE_OPHDR_CO= ND (GObj, ($ExpOpCount =3D=3D 0), L->getLine()); =0D - GObj.SetVarInf= o (&Info); =0D + CIfrGet GObj(L= ->getLine());=0D + _SAVE_OPHDR_CO= ND (GObj, ($ExpOpCount =3D=3D 0), L->getLine());=0D + GObj.SetVarInf= o (&Info);=0D delete[] VarId= Str;=0D $ExpOpCount++;= =0D }=0D @@ -4608,7 +4630,7 @@ question23refExp[UINT32 & RootLevel, UINT32 & ExpOpCo= unt] : {=0D Uuid "=3D" guidDefinition[Guid] "," << Type = =3D 0x3; >>=0D }=0D - vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount] =0D + vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]=0D "\)"=0D <<=0D switch (Type) {= =0D @@ -4675,9 +4697,9 @@ setExp[UINT32 & RootLevel, UINT32 & ExpOpCount] : "\("=0D vfrStorageVarId[Info, VarIdStr, FALSE]=0D {"\|" FLAG "=3D" numericVarStoreType [VarType] }=0D - "," vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount] =0D + "," vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]=0D "\)"=0D - << =0D + <<=0D {=0D if (Info.mVarS= toreId =3D=3D 0) {=0D // support D= ate/Time question=0D @@ -4724,8 +4746,8 @@ setExp[UINT32 & RootLevel, UINT32 & ExpOpCount] : _PCATCH(VF= R_RETURN_UNSUPPORTED, L->getLine(), "Get/Set opcode don't support data arra= y");=0D }=0D }=0D - CIfrSet TSObj(= L->getLine()); =0D - TSObj.SetVarIn= fo (&Info); =0D + CIfrSet TSObj(= L->getLine());=0D + TSObj.SetVarIn= fo (&Info);=0D delete[] VarId= Str;=0D $ExpOpCount++;= =0D }=0D @@ -4808,9 +4830,9 @@ spanExp[UINT32 & RootLevel, UINT32 & ExpOpCount] : ;=0D =0D vfrExpressionMap [UINT32 & RootLevel, UINT32 & ExpOpCount]:=0D - L:Map =0D - "\(" =0D - vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount] =0D + L:Map=0D + "\("=0D + vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]=0D ":" << { CIfrMap MOb= j(L->getLine()); } >>=0D (=0D vfrStatementExpression[0]=0D @@ -4837,6 +4859,7 @@ spanFlags [UINT8 & Flags] : class EfiVfrParser {=0D <<=0D private:=0D + BOOLEAN mIsCatchDefaultEnable;=0D UINT8 mParserStatus;=0D BOOLEAN mConstantOnlyInExpression;=0D =0D @@ -4880,6 +4903,7 @@ public: VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN ANTLRTokenPtr);= =0D VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32);=0D VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32, IN CONST= CHAR8 *);=0D + VOID DefaultValueError (IN EFI_VFR_RETURN_CODE, IN UINT32= );=0D =0D VOID syn (ANTLRAbstractToken *, ANTLRChar *, SetWord= Type *, ANTLRTokenType, INT32);=0D =0D @@ -4909,6 +4933,7 @@ public: VOID IdEqIdDoSpecial (IN UINT32 &, IN UINT32, IN EF= I_QUESTION_ID, IN CHAR8 *, IN UINT32, IN EFI_QUESTION_ID, IN CHAR8 *, IN UI= NT32, IN EFI_COMPARE_TYPE);=0D VOID IdEqListDoSpecial (IN UINT32 &, IN UINT32, IN EF= I_QUESTION_ID, IN CHAR8 *, IN UINT32, IN UINT16, IN UINT16 *);=0D VOID SetOverrideClassGuid (IN EFI_GUID *);=0D + VOID SetIsCatchDefaultEnable (BOOLEAN IsCatchDefaultEnabl= e);=0D >>=0D }=0D =0D @@ -5086,6 +5111,17 @@ EfiVfrParser::_PCATCH ( mParserStatus =3D mParserStatus + gCVfrErrorHandle.HandleError (ReturnCo= de, LineNum, (CHAR8 *) ErrorMsg);=0D }=0D =0D +VOID=0D +EfiVfrParser::DefaultValueError (=0D + IN EFI_VFR_RETURN_CODE ReturnCode,=0D + IN UINT32 LineNum=0D + )=0D +{=0D + CHAR8 ErrorMsg[100];=0D + sprintf(ErrorMsg, "please remove the default value / defaultstore in lin= e %d", LineNum);=0D + mParserStatus =3D mParserStatus + gCVfrErrorHandle.HandleError (ReturnCo= de, LineNum, ErrorMsg);=0D +}=0D +=0D VOID=0D EfiVfrParser::syn (=0D ANTLRAbstractToken *Tok,=0D @@ -5682,12 +5718,18 @@ EfiVfrParser::IdEqListDoSpecial ( }=0D }=0D =0D -VOID =0D +VOID=0D EfiVfrParser::SetOverrideClassGuid (IN EFI_GUID *OverrideClassGuid)=0D {=0D mOverrideClassGuid =3D OverrideClassGuid;=0D }=0D =0D +VOID=0D +EfiVfrParser::SetIsCatchDefaultEnable (BOOLEAN IsCatchDefaultEnable)=0D +{=0D + mIsCatchDefaultEnable =3D IsCatchDefaultEnable;=0D +}=0D +=0D VOID=0D EfiVfrParser::CheckDuplicateDefaultValue (=0D IN EFI_DEFAULT_ID DefaultId,=0D --=20 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112434): https://edk2.groups.io/g/devel/message/112434 Mute This Topic: https://groups.io/mt/103126873/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-