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 445687803DB for ; Thu, 28 Mar 2024 19:04:51 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=u4kMNjb4N5jU4LQ+vNOQLQKG61AQmzfnwzjyONz+8GE=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1711652689; v=1; b=Vowm7QJPmBMBE5msKmeTNb315JCaKONzvPlMiQPtdVskdYLIPVAI4rvHttw8I2DLGo2cZWdl gSxO/p9G+H7JI+R/EYZxsGCDmAvtFgWY828XJKef+w8iZHSto1IH3YrKf/i98glwIZroExCR6Hc ITx8V27JCA3MptrwRv6kRBaXNwqANM1S7ZAVhbWBlzFRoTVozsGeodpvtwnUvjHhgJ+P2kYlgGO 6i5Y8fX/i4t7Ei1WSAji8niQkC9OWwMWv9EnCOTNuVgITbGgYWVrnqcQ62cvQKdDlusbBYHXoBN aCDv3RuBzxRD6CV9xIXHxsTwRfakQaNJyniSwksNiKpEw== X-Received: by 127.0.0.2 with SMTP id QmvOYY7687511xheJKkNDtIF; Thu, 28 Mar 2024 12:04:49 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mx.groups.io with SMTP id smtpd.web11.10040.1711610921474673551 for ; Thu, 28 Mar 2024 00:28:41 -0700 X-CSE-ConnectionGUID: 49UPWrnmTV6cpcotMBcyJA== X-CSE-MsgGUID: 1v/0IojOTZmnqKYMOrPb/g== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="6877073" X-IronPort-AV: E=Sophos;i="6.07,161,1708416000"; d="scan'208";a="6877073" X-Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 00:28:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,161,1708416000"; d="scan'208";a="21056708" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Mar 2024 00:28:41 -0700 X-Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 28 Mar 2024 00:28:40 -0700 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 28 Mar 2024 00:28:40 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 28 Mar 2024 00:28:40 -0700 X-Received: from SN6PR11MB2815.namprd11.prod.outlook.com (2603:10b6:805:62::13) by IA0PR11MB7403.namprd11.prod.outlook.com (2603:10b6:208:431::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Thu, 28 Mar 2024 07:28:38 +0000 X-Received: from SN6PR11MB2815.namprd11.prod.outlook.com ([fe80::ad4f:d303:2f5e:7aeb]) by SN6PR11MB2815.namprd11.prod.outlook.com ([fe80::ad4f:d303:2f5e:7aeb%6]) with mapi id 15.20.7409.031; Thu, 28 Mar 2024 07:28:38 +0000 From: "Zhang, Zifeng" To: "Yang, Yuting2" , "devel@edk2.groups.io" , gaoliming CC: "Chen, Christine" , "Feng, Bob C" , "He, Haiyang" Subject: Re: [edk2-devel] [Patch V4] BaseTools: VfrCompiler Adds DefaultValueError Thread-Topic: [edk2-devel] [Patch V4] BaseTools: VfrCompiler Adds DefaultValueError Thread-Index: AQHae2IY4QyPjmJZW0+k+8Nkzl0EJbFB0izggArrqUA= Date: Thu, 28 Mar 2024 07:28:38 +0000 Message-ID: References: <17BEB716C0DD8A75.2828@groups.io> In-Reply-To: Accept-Language: en-US X-Mentions: gaoliming@byosoft.com.cn X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR11MB2815:EE_|IA0PR11MB7403:EE_ x-ms-office365-filtering-correlation-id: f81b1e2e-0f2d-4af4-9ce3-08dc4ef8af67 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: NEavL+Lw2aw1BVe+36u1wgAtYsxzjFN1yP2SCHpgdUPACcIdB9Sj6YttiSs2UA5Aqb7JYO5l/U8IFGmnT1/nPOncYSHOgIgh/BOwSD4J6RCb4zuFQ5X1W27jzce9Keo7ARKcNeku+3lKAg4wYvKFWDClSF/GwkiCWqpfDgA2hjj2nVujX7iWMQqB18qGNoBFoW3a9iMgWHCgNnbA4mXGS+f2sTLBSPCcth5O+4iKKsiFz19sGWSvCEnGHWUiw1anLX/Y1fWsA5XygqXcQcaJ9xmby8JipszQBqXmKwWe5W9ONhAseexcJctzk9gi/QwoAxEIryBcJeyTK6cGiFWy94GVtEec8EcNaPbHM1aCYehAgHa6w4FdRax9PwG6KQ8l6m/wsW7VnouTuRMTR4gFG4+7+gHPXApIW7BrbHO0Ll4hT02tD9m+cLJ8S5/J2o9Fx0cwQ3KpJ/sN73X4mRvCJced8SkPGBA2vwUzlrKqnzqs5RgO5SzqJI0gc3m/j4ygeTtrBxFBdQ2i9lBLgxlCx3U8AdFvF0xvWAzaClT6eJ3IXJAHyAy3VHAL78AFfdKxRQDxYsKm8l9AE3b6COBE+h5L9NwHiGNnpvVhxm5KWmksEXYuXhWl/FDEFW4JGlB3v/gJL0SWxEfWE5iUV3Hpt8sK9gA6vI99//6mlNrvaj0rvW6GlReZf1yBRnxvvEMd x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aQ4AegL3qYtjGsztu511o2nTeHb2zJJ6sP2WzpRD5/U9JrXnJOPue3w4DHqr?= =?us-ascii?Q?4Nv5sxX11Gc6VOFwzK4pkDtDrZjrmsshbbiQusvggpVhuQ4K1nNDofURwpG+?= =?us-ascii?Q?Fu1gp0t/rf2gVG1kJ5gFlHXlRI7z4MdjhZ2hUIZzYKzdBJVJyZNuhnlYtbRs?= =?us-ascii?Q?7uZv7UDC+teH3XXcKOWa8nXl1AO41vmMA1jzp1Az6sZRArVVngwK+mzNnQzt?= =?us-ascii?Q?4KEt40zEmnCkHl8ZbUIDDGQirs2qkwTsNfTGsFtA5jj+zYzCJldYfTblRa8Q?= =?us-ascii?Q?tFEqclv2rAslzDT9Xz3pFLDAyTMR5VQuZVxm+augKQqWd0w4pmZb6TTmooJ7?= =?us-ascii?Q?dafV7nOeD2H0WFTnixMAKcKuwqyqiGdlEz//u8gA/TMunF30D8dcfl+G5n0+?= =?us-ascii?Q?UXybJkVpghDnxd5xePMK6FKVFjGr2QsLMsVxTL0qrWahkD4866I8xncPqKOC?= =?us-ascii?Q?o5mZdBrSg2/FJMcjurZCsW3NEAPzo5G8rxYvD9d0ZcMYducsXx5RpqvRal8i?= =?us-ascii?Q?qWMDQNwkQVpSN1nS4JoazmJxJXVIFgLj2CPXrbl8HX/SyotZ1UR3cmKr7Zxr?= =?us-ascii?Q?6xVFVY2mzLJ1+7B3aHlVftfqcZce159lbcP6wSmKGsVU3/rPTINpO7a8rH9U?= =?us-ascii?Q?s5UfNDhU0wJKugx+T4hqhlo5e0ybrs9jJm8zkRjk+g8jYDqq8MuWq3UsIHHL?= =?us-ascii?Q?Wrobn1rIQ/5xD5xnz7lzK/1PNH9Pbzhq22LsCQcWBj5RnWF0psQ8zxhhkecV?= =?us-ascii?Q?XafpFu6jEROxekBN0hRMS14yUnP4uoQCbsW7UFdzc9IRxQqA7AD9TbQdEY8Q?= =?us-ascii?Q?pfJ2ey/2KOuvRctaQ/QuDfiYiqS+aAuxX5FdfK2+G2LyBd73BiUYkNQRIPPe?= =?us-ascii?Q?1nyv8iLk+bp3YOKHAiMolNWEKz0Kz5vUpa9Y0ByKXD5L62sowoRlVB8uAXqT?= =?us-ascii?Q?Ik/PBLQ+ilc5AJW3BnQaDZTZUrdSSmAplkXTm/OPZ7wIjUWszztB5Pa9J4WH?= =?us-ascii?Q?RcIqlPlwP4B9YUG+4uwgBVFrbk1dfVK8GNikYcyrtDMzd/GnamI1T1gmVNHx?= =?us-ascii?Q?Lkv8jZgj1uRVcnVjgdKRqPiQw3Yg4yuVFCULWqYAPU8ymqgV43GUZbkVWUSs?= =?us-ascii?Q?iY515V3Ck6dINVmGv1d2I+pkm4+7WOwz4fqzLekcN8ohj0lU3jDneeKYUBvd?= =?us-ascii?Q?F/uNvvi+10PHoSr1MDKVhaObEhljIT524IJh23uyABgYQF7ZhBi1L0AQK+xD?= =?us-ascii?Q?/GYjErFzIBK+cZbOfGEYM5pP2/4GaswaMeg+qG0C4jBoU08EXfntL6h76rBt?= =?us-ascii?Q?OCw9bOogLsn7tlwy/0YJK5D3lVftoXY4AH8JwfOM0gjLSdVYGKeV7kTee7pU?= =?us-ascii?Q?GwTamH42N5Z+ORP5H6k7uDhVCDAuDUBO4VuMqbzzQJdS02BAv8e+vrTS7d4P?= =?us-ascii?Q?p364AKfH/Wm+OmFi7klDeusQsi2w84QkvuRlEHmZOhmWR+2XSFwUyClvTuYc?= =?us-ascii?Q?3mzzc07QPnDi3d37J8CLeHEUHozX1ICQYL1ScbnwSol6+95FhXokq9ix+VPV?= =?us-ascii?Q?6LGizN/QwWqAt8TaQRSBG+84sw4R0gtcCaRXi834?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2815.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f81b1e2e-0f2d-4af4-9ce3-08dc4ef8af67 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2024 07:28:38.0873 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fBZujQ0ss4Kgq1QEo/eqeMh70B3L/TS2R+yuZGcTPoAwGYt8LqaU4vc18ErzuRiCrPc8YzWafIw4duyv0T+mFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7403 X-OriginatorOrg: intel.com 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 Resent-Date: Thu, 28 Mar 2024 12:04:49 -0700 Reply-To: devel@edk2.groups.io,zifeng.zhang@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: uq4yhHttQN866mQPlvKrBfWcx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=Vowm7QJP; 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 Thanks Yuting for patch update! Hi @gaoliming,=20 Would you like to review the V4 patch?=20 Hope to merge it asap to avoid blocking feature complete. Best Regards, Zifeng -----Original Message----- From: Yang, Yuting2 =20 Sent: Thursday, March 21, 2024 3:54 PM To: devel@edk2.groups.io; gaoliming Cc: Chen, Christine ; Zhang, Zifeng ; Feng, Bob C ; He, Haiyang Subject: RE: [edk2-devel] [Patch V4] BaseTools: VfrCompiler Adds DefaultVal= ueError Hi liming, Gentle reminder, we have removed the whitespace. Please help review the pat= ch~ Thanks, Yuting=20 -----Original Message----- From: devel@edk2.groups.io On Behalf Of Yuting Yang Sent: Thursday, March 21, 2024 3:30 PM To: devel@edk2.groups.io Cc: Rebecca Cran ; Liming Gao = ; Feng, Bob C ; Chen, Christine ; Zhang, Zifeng Subject: [edk2-devel] [Patch V4] BaseTools: VfrCompiler Adds DefaultValueEr= ror Add --catch_default option Raise a DefaultValueError when encountering VFR default definitions to help= remove default variables. Signed-off-by: Yuting Yang Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Christine Chen Cc: Zifeng Zhang --- BaseTools/Source/C/VfrCompile/VfrCompiler.cpp | 8 ++++---- BaseTools/Source/C/VfrCompile/VfrCompiler.h | 1 + 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 | 58 +++++++++++++++++++++++= +++++++++++++++++++++++++++-------- 6 files changed, 60 insertions(+), 14 deletions(-) diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp b/BaseTools/Sour= ce/C/VfrCompile/VfrCompiler.cpp index 5f4d262d85..4031af6e39 100644 --- a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp @@ -78,6 +78,7 @@ CVfrCompiler::OptionInitialization ( mOptions.WarningAsError =3D FALSE; mOptions.AutoDefault= =3D FALSE; mOptions.CheckDefault =3D = FALSE;+ mOptions.IsCatchDefaultEnable =3D FALSE; memset (&mOpti= ons.OverrideClassGuid, 0, sizeof (EFI_GUID)); if (Argc =3D=3D 1) {@@ -95= ,6 +96,8 @@ CVfrCompiler::OptionInitialization ( Version (); SET_RUN_STATUS (STATUS_DEAD); return;+ } = else if (stricmp(Argv[Index], "--catch_default") =3D=3D 0){+ mOptions.= IsCatchDefaultEnable =3D TRUE; } else if (stricmp(Argv[Index], "-l") = =3D=3D 0) { mOptions.CreateRecordListFile =3D TRUE; gCIfrRecord= InfoDB.TurnOn ();@@ -179,7 +182,6 @@ CVfrCompiler::OptionInitialization ( goto Fail; } strcpy (mOptions.VfrFileName, Argv[Index]);- = if (mOptions.OutputDirectory =3D=3D NULL) { mOptions.OutputDirector= y =3D (CHAR8 *) malloc (1); if (mOptions.OutputDirectory =3D=3D NULL)= {@@ -679,7 +681,7 @@ CVfrCompiler::Compile ( DebugError (NULL, 0, 0001, "Error opening the input file", "%s", InFil= eName); goto Fail; }-+ InputInfo.IsCatchDefaultEnable =3D mOptions.I= sCatchDefaultEnable; if (mOptions.HasOverrideClassGuid) { InputInfo.O= verrideClassGuid =3D &mOptions.OverrideClassGuid; } else {@@ -937,5 +939,= 3 @@ main ( return GetUtilityStatus (); }--diff --git a/BaseTools/Source/C/VfrCompi= le/VfrCompiler.h b/BaseTools/Source/C/VfrCompile/VfrCompiler.h index b6e207d2ce..974f37c4eb 100644 --- a/BaseTools/Source/C/VfrCompile/VfrCompiler.h +++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.h @@ -52,6 +52,7 @@ typedef struct { BOOLEAN WarningAsError; BOOLEAN AutoDefault; BOOLEAN CheckDefault;+ = BOOLEAN IsCatchDefaultEnable; } OPTIONS; typedef enum {diff --git a/BaseT= ools/Source/C/VfrCompile/VfrError.cpp b/BaseTools/Source/C/VfrCompile/VfrEr= ror.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"}, { VFR_WARNING_ACTION_WITH_TEXT_TWO, ": Action opcode s= hould not have TextTwo part"}, { VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE, = ": Not recommend to use obsoleted framework opcode"},- { VFR_WARNING_CODEU= NDEFINED, ": undefined Warning Code" }+ { VFR_WARNING_CODEUNDEFINED, ": un= defined Warning Code" },+ { VFR_WARNING_UNSUPPORTED, ": pls remove the def= ault values if necessary" } }; CVfrErrorHandle::CVfrErrorHandle (diff --gi= t a/BaseTools/Source/C/VfrCompile/VfrError.h b/BaseTools/Source/C/VfrCompil= e/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, VFR_WARNING_ACTION_WITH_TEX= T_TWO, VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,- VFR_WARNING_CODEUNDEFINE= D+ VFR_WARNING_CODEUNDEFINED,+ VFR_WARNING_UNSUPPORTED } EFI_VFR_WARNING_= CODE; typedef struct _SVFR_ERROR_HANDLE {diff --git a/BaseTools/Source/C/V= frCompile/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 { typedef struct { EFI_GUID *OverrideClassGuid;+ BOOLEAN IsCatchDefaultE= nable; } INPUT_INFO_TO_SYNTAX; class CFormPkg {diff --git a/BaseTools/Sour= ce/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g index 55fd067f8a..d7376122d8 100644 --- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g +++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g @@ -50,6 +50,7 @@ VfrParserStart ( { ParserBlackBox VfrParser(File)= ; VfrParser.parser()->SetOverrideClassGuid (InputInfo->OverrideClassGuid)= ;+ VfrParser.parser()->SetIsCatchDefaultEnable(InputInfo->IsCatchDefaultEn= able); return VfrParser.parser()->vfrProgram(); } >>@@ -975,7 +976,15 @@ = vfrExtensionData[UINT8 *DataBuff, UINT32 Size, CHAR8 *TypeName, UINT32 Type= Size, vfrStatementDefaultStore : << UINT16 DefaultId =3D EFI_HII_DEFAULT_CLA= SS_STANDARD; >>- D:DefaultStore N:StringIdentifier ","+ D:DefaultStore N:= StringIdentifier "," <<+ = if (mIsCatchDefaultEnable) {+ = gCVfrErrorHandle.HandleWarning (+ = VFR_WARNING_UNSUPPORTED,+ = D->getLine(),+ = D->getText()+ = );+ = }+ = >> Prompt "=3D" "STRING_TOKEN" "\(" S:Number "\)" { "," Attribute = "=3D" A:Number << DefaultId =3D _STOU16(A->getText(), = A->getLine()); >>@@ -1775,7 +1784,11 @@ vfrStatementDefault : CIfrNumeric *NumericQst =3D NULL; >>- D:Default = + D:Default = <<+ if = (mIsCatchDefaultEnable) {+ = DefaultValueError(VFR_RETURN_UNSUPPORTED, D->getLine());+ = }+ = >> ( ( "=3D" vfrConstantValueField[_G= ET_CURRQEST_DATATYPE(), *Val, ArrayType] "," @@ -1970,11 +1983,15 @@ vfrSt= atementInvalid : ; flagsField :- Number - | InteractiveFlag - | ManufacturingFlag - = | DefaultFlag - | ResetRequiredFlag + Number+ | InteractiveFlag+ | Manu= facturingFlag+ | D:DefaultFlag <<+ = if (mIsCatchDefaultE= nable) {+ Defaul= tValueError(VFR_RETURN_UNSUPPORTED, D->getLine());+ = }+ = >>+ | ResetRequiredFlag | ReconnectRequiredFlag | N:NV= AccessFlag << = gCVfrErrorHandle.HandleWarning (@@ -3790,7= +3807,12 @@ oneofoptionFlagsField [UINT8 & HFlags, UINT8 & LFlags] : | RestStyleFlag << $HFlags |=3D 0x2= 0; >> | ReconnectRequiredFlag << $HFlags |= =3D 0x40; >> | ManufacturingFlag << $LFl= ags |=3D 0x20; >>- | DefaultFlag <<= $LFlags |=3D 0x10; >>+ | D:DefaultFlag = <<+ $LFlags |= =3D 0x10;+ if (mIs= CatchDefaultEnable) {+ = DefaultValueError(VFR_RETURN_UNSUPPORTED, D->getLine());+ = }+ = >> | A:NVAccessFlag = << = gCVfrErrorHandle.HandleWarning ( = VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,@@ -4837,6 +4859,7= @@ spanFlags [UINT8 & Flags] : class EfiVfrParser { << private:+ BOOLEAN mIsCatchDefaultEnab= le; UINT8 mParserStatus; BOOLEAN mConstantOnl= yInExpression; @@ -4880,6 +4903,7 @@ public: VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN ANTLRTokenPtr); = VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32); VOID = _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32, IN CONST CHAR8 *)= ;+ VOID DefaultValueError (IN EFI_VFR_RETURN_CODE, IN UINT3= 2); VOID syn (ANTLRAbstractToken *, ANTLRChar *, Set= WordType *, ANTLRTokenType, INT32); @@ -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); VOID IdEqListDoSpecial (IN= UINT32 &, IN UINT32, IN EFI_QUESTION_ID, IN CHAR8 *, IN UINT32, IN UINT16,= IN UINT16 *); VOID SetOverrideClassGuid (IN EFI_GUID *);= + VOID SetIsCatchDefaultEnable (BOOLEAN IsCatchDefaultEnabl= e); >> } @@ -5086,6 +5111,17 @@ EfiVfrParser::_PCATCH ( mParserStatus =3D mParserStatus + gCVfrErrorHandle.HandleError (ReturnCo= de, LineNum, (CHAR8 *) ErrorMsg); } +VOID+EfiVfrParser::DefaultValueError (= + IN EFI_VFR_RETURN_CODE ReturnCode,+ IN UINT32 LineNum+ )+= {+ CHAR8 ErrorMsg[100];+ sprintf(ErrorMsg, "please remove the default val= ue / defaultstore in line %d", LineNum);+ mParserStatus =3D mParserStatus = + gCVfrErrorHandle.HandleError (ReturnCode, LineNum, ErrorMsg);+}+ VOID Efi= VfrParser::syn ( ANTLRAbstractToken *Tok,@@ -5688,6 +5724,12 @@ EfiVfrPa= rser::SetOverrideClassGuid (IN EFI_GUID *OverrideClassGuid) mOverrideClassGuid =3D OverrideClassGuid; } +VOID+EfiVfrParser::SetIsCat= chDefaultEnable (BOOLEAN IsCatchDefaultEnable)+{+ mIsCatchDefaultEnable = =3D IsCatchDefaultEnable;+}+ VOID EfiVfrParser::CheckDuplicateDefaultValue = ( IN EFI_DEFAULT_ID DefaultId,--=20 2.39.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116948): https://edk2.groups.io/g/devel/message/116948 Mute This Topic: https://groups.io/mt/105061128/7976666 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [yuting2.yang@intel.com] = -=3D-=3D-=3D-=3D-=3D-=3D -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117214): https://edk2.groups.io/g/devel/message/117214 Mute This Topic: https://groups.io/mt/105061128/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-