From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web08.614.1666736379171097362 for ; Tue, 25 Oct 2022 15:19:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=WQHz9UVf; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: nathaniel.l.desimone@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666736379; x=1698272379; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=jd+BuVCNB8Abce7eSz9JnuEenAClVKFIrOiVEQc/8Z0=; b=WQHz9UVfDhyXOnTFOIQl5R/ngmJ6brnRPiWdIWrLdzJoPZqO9bQ37k+u lnwZNTz9iK8WCTSjPvsnn5J7N3c68oCUghputqYL/82ch1/lQlDXun18O CdkZPYkyezlukpL/PQnGoh/mOLg+6OCBGTz4oJIRmWJwx5ZkzT0cKMrqx OuQ/dI+JAicGvl3R/cKDCOKpGNgL8W/3HL7KT7Bojrfy2UvE0J/mvTrS/ tKYllBl52IrZKnXvHhGwsUtAOVmi52ZMHLcSW6p1/Ht2NR/xlH8BtO6Uh Q6C4A7PNQNLygXdANsBJmuL29Jwp4ewq/xu/9l/191t5h9ghFD4jBqlY3 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10511"; a="287522278" X-IronPort-AV: E=Sophos;i="5.95,213,1661842800"; d="scan'208";a="287522278" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2022 15:19:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10511"; a="626581274" X-IronPort-AV: E=Sophos;i="5.95,213,1661842800"; d="scan'208";a="626581274" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 25 Oct 2022 15:19:30 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 25 Oct 2022 15:19:29 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 25 Oct 2022 15:19:29 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 25 Oct 2022 15:19:29 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 25 Oct 2022 15:19:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hlDG5Qdx7Iz8xMQqhdHgtBasXmPZMMXE0BeQ8w6Y/vgkBwla+LzNHwvLxMo58w6Ic6SamB/tnPLMzdgo4wY56shg2QQdpmWiMKNGe3SBF3Ta5nMJBVCeT/5vXb8AmgTa0P9jHV2cIEPcF03MedNk+b1xX15VhjYQPK0NGe6eokyEs/VoYxLpqeKm9dugPoVoWw+p3T366mvpG1W8UN0DEolntNmJXhV+NfeAptZBkQspcfJun6VOG7YkzBj2cbjeTKB9sSpdEjZBNFcalmHCXowk4kisVtulUc15oajYbRyygvDfO9LDCfV2L2RIpq69+Q0VgcAndZpfRablL9P1BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R39h1K5zo9699KZa13zgMyX9wfWMmm9n3hijqXGrrGo=; b=HboWMYHuR+gURqjuklfohu7cUlkmK8mJ6I47nNUgAxN+i6uj0QOPQCr1Gln51q8T1OU3LiPUPzQ3sqLBTYb8QaZ7YKNtMd23Ft+CF2CuEBl1xh1vaFLe/McvFd9laSV0hCOhhxr0aiEiRGT2CFuZ25OqVR3XA/hrD+mbB1LOpqyV4u1kmTD7AtnpeyfYHcjv6rUF1HRHbE46R+5i2TU4TCwF3V9lu6iwQUaZHI6GvCOfEABzWNwU/C8bah8ueI8UUbNBidTlTqLflLEQJDJXqIX3sPCEKnRxYCzDvxUfLbF6d3Rilb4ZJJC/9EadzfiMmE6XNGDHUjrk1opROovdeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5821.namprd11.prod.outlook.com (2603:10b6:303:184::5) by DS0PR11MB7508.namprd11.prod.outlook.com (2603:10b6:8:152::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Tue, 25 Oct 2022 22:19:26 +0000 Received: from MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::a748:40a8:78d3:38e6]) by MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::a748:40a8:78d3:38e6%3]) with mapi id 15.20.5746.028; Tue, 25 Oct 2022 22:19:26 +0000 From: "Nate DeSimone" To: "Chiu, Chasel" , "devel@edk2.groups.io" CC: "Zeng, Star" Subject: Re: [PATCH] IntelFsp2WrapprPkg: Check header revision for MultiPhase support. Thread-Topic: [PATCH] IntelFsp2WrapprPkg: Check header revision for MultiPhase support. Thread-Index: AQHY6LQpT8Yp9G4+a0mtAUEsjSs2u64frdpQ Date: Tue, 25 Oct 2022 22:19:26 +0000 Message-ID: References: <20221025205532.2247-1-chasel.chiu@intel.com> In-Reply-To: <20221025205532.2247-1-chasel.chiu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5821:EE_|DS0PR11MB7508:EE_ x-ms-office365-filtering-correlation-id: b9b11d4e-526f-472a-4af4-08dab6d6fa7d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6rYX4vU/vyLUQ3q72ElwZdRAGOe+uoTbz6fZlGFG0kHp54HVuZ3W87zG+5tfZ75VQX1PN2Swpg5JV6LKXulg1KCAZqkIDSilvIfmHdGahKggUgB5GgH6A3wHeiyoDmjHl0Y2cBUwWIfd6Jt1u1seGI0ZOXgM65/sjTl6byNnWnEFxvehgtjDIuQ0ycmHeTdftNi8gEqCvpj6Oczte3V/FH3utrh26byYkMbBjaCQMaH8bN6do1XvF2GyC/IVMgIOibglxqV8zSDLQ00xngZCyZ4yTgToC+rmPbuv+FX4R5qjeFtX4o1vhNdZSEno5IKF/rVWK6KNl7Mu3vSY1vkJQktitR1DtnSkNVbwlM2jjw2xZj6ilVSnWC9H8QOeIhU/kmVVWbooOOY8mXvOqA/UK0tNEeeI1s+XWoq7GihDn6Rl4hf8wqGTilcpcCaELmuDTsPFVH91rwO/ob3pyRq28rMTWOuCXF5xccQy67oxm6Uy8hsz5Bf5UazUfoqHTfvz4BVzP3fFj0BaPJEozGHEHLMrRNe8aqK5OrNnrUTjHgu8kQRhkJS18yUIzL5jSVdzT/duLYr9x0yrJ4lBxtIW6JG2qrLp/hJeO1SuC6oXNwfhcYHJjuuIKiK/g0QJszFho4nezmpEa1WKqPcGQ5YeTSonPL5NpSuL0rkl0semBVZE4hE8R57xKVlGb0xr37/285fI7i1OGRBpzgY8nisI1ZN4Av5rNT2C+jQNatzU9bjVBd4yTVAONXheYFU8IQb1QWTEg0FWinRjvPZW9SaW2ZRPLY61eblPIeiv2E8YBe78Z7c8kLF1l621hwLsnO+p x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5821.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(366004)(346002)(136003)(396003)(376002)(451199015)(110136005)(53546011)(186003)(8936002)(52536014)(5660300002)(8676002)(64756008)(26005)(66446008)(9686003)(76116006)(55016003)(33656002)(66946007)(66476007)(107886003)(122000001)(7696005)(6506007)(41300700001)(316002)(966005)(83380400001)(38100700002)(66556008)(4326008)(19627235002)(86362001)(478600001)(71200400001)(2906002)(38070700005)(82960400001)(44824005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dCXX4421pndQEMLRXJou8Dndq2YQ9Y/+M/NAsP6swQSh5edfE1MGMcPizR/O?= =?us-ascii?Q?S2Rx0NbYffaMBPoOm+hnicUYo2CA4a061BXVZIvNv6ypXRjk2Fe9D3T2RgkM?= =?us-ascii?Q?0VIMRTPFYPr0cWQqzYkOh6jxL9XetEDCzVCbzJsaeZWRBkzn4R9qQzmV86fx?= =?us-ascii?Q?ErQYSdio7nFZjxWlteKfQxBeCxoCxsT/HqXv0/4/2eDnoqTju9ozkFowasyk?= =?us-ascii?Q?KcWdE4oruZcwcllumMLZng36C9bh14ZbVjJF2jODnpH//TIH5Ycx72GGtnCT?= =?us-ascii?Q?GBok+hp8eaf7BuayIAXZFtwGQ/9Re0Wa2C6kg7CqiSf8/vqNbFZ3ZpKcW7Pl?= =?us-ascii?Q?4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JPsWrve81Qz?= =?us-ascii?Q?9GIJuXG+JfYtnkF2V+jDq23vmHMaOYNsoh+xR/a4wdGDgt3/CBm5O4UwQg20?= =?us-ascii?Q?Vjyi6JuHPAWLx9fnCOpAvPaPz1pf3/gzItJorTygINsMcP8WY93g4tFvcYLV?= =?us-ascii?Q?esy3rLbJ8+Lsh/YljcdUBEJ8qRgg20SLiaZWHAxew0QEc3Hcs7odENg9RmKf?= =?us-ascii?Q?ZvExEMeqy9LItRmzFUdq2BlK1/ctEAf9DvjNL+7tpsOBy2ZQe/iT34buxF1I?= =?us-ascii?Q?qDFRvmPuJyCKmcO/RlkDm5t0b1AplYtt41JmPn7c7NITB/NOiG/UNj/h7wGW?= =?us-ascii?Q?CjzR9BlbQi9/sGs8x2k7B0ut0BubMKgyaVLcliop/ZTaDm8yxXkUZnWkmXa7?= =?us-ascii?Q?Vg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9b11d4e-526f-472a-4af4-08dab6d6fa7d X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2022 22:19:26.7805 (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: St/gPvr2ZcR4dw0aNOmOBnVGyBl5NnOdGINB1WEa/3wCx8fTGQzIB/KbpGm7iEFxJDVLWDI+K1ur4fDbnPibMvVbK41zUYPBiNdW63pWB00= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7508 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Chasel, There is a spelling error in your commit message. IntelFsp2WrapprPkg should= be IntelFsp2WrapperPkg. Please fix this during the push. No need to send a= 2nd review. With that change... Reviewed-by: Nate DeSimone > -----Original Message----- > From: Chiu, Chasel > Sent: Tuesday, October 25, 2022 1:56 PM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > ; Zeng, Star > Subject: [PATCH] IntelFsp2WrapprPkg: Check header revision for MultiPhase > support. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4119 >=20 > Earlier version of FSP header may not have MultiPhase fields present in t= he > FspInfoHeader so the handler should verify header revision before accessi= ng > the MultiPhase fields from the header. >=20 > Cc: Nate DeSimone > Cc: Star Zeng > Signed-off-by: Chasel Chiu > --- > IntelFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/PeiFspWrapper= MultiPhaseProcessLib.c | 30 ++++++++++++++++++++++++------ > 1 file changed, 24 insertions(+), 6 deletions(-) >=20 > diff --git a/IntelFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/P= eiFspWrapperMultiPhaseProcessLib.c b/IntelFsp2WrapperPkg/Library/FspWrapper= MultiPhaseProcessLib/PeiFspWrapperMultiPhaseProcessLib.c > index 1248accf87..0f524910d5 100644 > --- a/IntelFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/PeiFspWr= apperMultiPhaseProcessLib.c > +++ b/IntelFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/PeiFspWr= apperMultiPhaseProcessLib.c > @@ -73,15 +73,27 @@ CallFspMultiPhaseEntry ( > // > // FSP_MULTI_PHASE_INIT and FSP_MULTI_PHASE_SI_INIT API functions havi= ng same prototype. > // > - UINTN FspMultiPhaseApiEntry; > - UINTN FspMultiPhaseApiOffset; > - EFI_STATUS Status; > - BOOLEAN InterruptState; > + UINTN FspMultiPhaseApiEntry; > + UINTN FspMultiPhaseApiOffset; > + EFI_STATUS Status; > + BOOLEAN InterruptState; > + BOOLEAN IsVariableServiceRequest; > + FSP_MULTI_PHASE_PARAMS *FspMultiPhaseParamsPtr; > + > + FspMultiPhaseParamsPtr =3D (FSP_MULTI_PHASE_PARAMS *)FspMultiPhasePa= rams; > + IsVariableServiceRequest =3D FALSE; > + if ((FspMultiPhaseParamsPtr->MultiPhaseAction =3D=3D EnumMultiPhaseGet= VariableRequestInfo) || > + (FspMultiPhaseParamsPtr->MultiPhaseAction =3D=3D EnumMultiPhaseCom= pleteVariableRequest)) > + { > + IsVariableServiceRequest =3D TRUE; > + } > =20 > if (ComponentIndex =3D=3D FspMultiPhaseMemInitApiIndex) { > FspHeader =3D (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32 (PcdFspm= BaseAddress)); > if (FspHeader =3D=3D NULL) { > return EFI_DEVICE_ERROR; > + } else if (FspHeader->SpecVersion < 0x24) { > + return EFI_UNSUPPORTED; > } > =20 > FspMultiPhaseApiOffset =3D FspHeader->FspMultiPhaseMemInitEntryOffse= t; > @@ -89,6 +101,10 @@ CallFspMultiPhaseEntry ( > FspHeader =3D (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32 (PcdFsps= BaseAddress)); > if (FspHeader =3D=3D NULL) { > return EFI_DEVICE_ERROR; > + } else if (FspHeader->SpecVersion < 0x22) { > + return EFI_UNSUPPORTED; > + } else if ((FspHeader->SpecVersion < 0x24) && (IsVariableServiceRequ= est =3D=3D TRUE)) { > + return EFI_UNSUPPORTED; > } > =20 > FspMultiPhaseApiOffset =3D FspHeader->FspMultiPhaseSiInitEntryOffset= ; > @@ -120,7 +136,8 @@ CallFspMultiPhaseEntry ( > @param[in] FspHobListPtr - Pointer to FSP HobList (valid after = FSP-M completed) > @param[in] ComponentIndex - FSP Component which executing MultiP= hase initialization. > =20 > - @retval EFI_UNSUPPORTED FSP Wrapper cannot support the specific vari= able request > + @retval EFI_UNSUPPORTED FSP Wrapper cannot support the specific vari= able request, > + or FSP does not support VariableService > @retval EFI_STATUS Return FSP returned status > =20 > **/ > @@ -287,7 +304,8 @@ FspWrapperVariableRequestHandler ( > @param[in] FspHobListPtr - Pointer to FSP HobList (valid after = FSP-M completed) > @param[in] ComponentIndex - FSP Component which executing MultiP= hase initialization. > =20 > - @retval EFI_STATUS Always return EFI_SUCCESS > + @retval EFI_UNSUPPORTED Specific MultiPhase action was not supported= . > + @retval EFI_SUCCESS MultiPhase action were completed successfull= y. > =20 > **/ > EFI_STATUS > --=20 > 2.35.0.windows.1