From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.1506.1666656545830692343 for ; Mon, 24 Oct 2022 17:09:06 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=MdQmtHrF; spf=pass (domain: intel.com, ip: 192.55.52.115, 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=1666656545; x=1698192545; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=VOnaAuLrZ8G1Q60QXsRQkTNPLuVr7RjYM4i3H8cRhxw=; b=MdQmtHrFmUt1h7QrjkMkvPXFxrrmue2v146z062uXBPuhr7vwwsf6S7d cUo+UTYtGWR8pFOEpJDOJqZJNINNdNhccAXMlDhy+DGBYauWKGPzJN84+ z0QTqYD6bm/zJOuZOcqtC6BcHy5FPCgwbXG5CWm7DVGk/ZCv6zq0JJtWh EtMKshcDImbjjLAWoqelHHgHKxV/CXLOGBeC5gM1qgrSsQM535A4Yyy+f VspV05mPCNb7d3UBH/bnSf3+9ChZC+h/F/Dw+Tc5u49trlfghlAHUrBuU louWGf3Eyz4vqEoeUqgEX6v8Bn943qk3FUVLElHjPXLfIjH0Yezvl/Nwl w==; X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="307542916" X-IronPort-AV: E=Sophos;i="5.95,210,1661842800"; d="scan'208";a="307542916" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2022 17:08:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="633894537" X-IronPort-AV: E=Sophos;i="5.95,210,1661842800"; d="scan'208";a="633894537" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga007.fm.intel.com with ESMTP; 24 Oct 2022 17:08:57 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.2375.31; Mon, 24 Oct 2022 17:08:56 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 24 Oct 2022 17:08:55 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 24 Oct 2022 17:08:55 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 24 Oct 2022 17:08:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mle9sUnwoGtz1riD40rRl2W/Ln6SOYIrtT8tefeGnMbvOwsG1295WIIsJTLsPUjFIsVP65DNM/0gVTKXCTqreoKM81+4bYmHieweUYNnvfEPRF4jJEfN1sBwti3s/bSnHDVuCZ0oTfBZjbPnt1qFGt3PyO/tXKsorYpUeH6HXrhWteGng0pbL8C9FWKnhj8wi6jyM6bEPJIew/lPqo5L2Yx7OsBAvz46r6dZkX2z67X+M8kmGY/EfqWPlm6vxKpM0XpjBsRTiDwEp0y64r0Gl94slpzt3XTnHqi06jZvUOKMIAv3VRQy9W6ay5/lmMOILgYDfv4qI4+arRrEmZ3nLQ== 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=JtWlLzjumuvNVSZloIkd81hTdgcB6InOYqf79uMhe40=; b=NkuSsoJGQNoAH19lEXttbj1KxVvtU6NqI1LX0NAIkRu2ftoOgHtC8NV0oVfMjtnA/bNThZ3mqpYlTYlJQrta7AKkOeW8o2sitBOoRrRZBtP5scBoyQ9vdEOiMpRwM7uy1in74HF3SlN+O8HRCs8qm59s8rhJKV1e2SKe54BX+wMKLK2P/ppFq8CArmG8j4ZsNPo7/jrKIZWeFkkwoTKYZtXpm63NPU/ZwbELkCcmzyoHuu0L+yZvOeua8ngi9GBoHW5alsj0hvZ8E5rMlC77ZTTMCRkiHtEcaw847kXwz4G47zrK9bxQxRycLXd1pooewZU0RprsIkbmyIPe9cNRmw== 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 PH7PR11MB6499.namprd11.prod.outlook.com (2603:10b6:510:1f0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Tue, 25 Oct 2022 00:08:47 +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.5723.033; Tue, 25 Oct 2022 00:08:47 +0000 From: "Nate DeSimone" To: "Chiu, Chasel" , "devel@edk2.groups.io" CC: "Zeng, Star" Subject: Re: [PATCH] IntelFsp2Pkg: FSP should support input UPD as NULL. Thread-Topic: [PATCH] IntelFsp2Pkg: FSP should support input UPD as NULL. Thread-Index: AQHY513cLIG65DAjAkG6NhaDJCsH5q4ePIAg Date: Tue, 25 Oct 2022 00:08:47 +0000 Message-ID: References: <20221024040511.2081-1-chasel.chiu@intel.com> In-Reply-To: <20221024040511.2081-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_|PH7PR11MB6499:EE_ x-ms-office365-filtering-correlation-id: f5342db9-d5a6-4376-e6b2-08dab61d168a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LM2+gNqew3+2TAEY/tx/oShGGfBacuOJGlH322/wZ8OCnCkkfnT4jgLxWRWShFx0FQTiRaJls66hSqx/MImWkd9jhBYPWYzzPWeYPrpH2SZfhjeSR3Q/dRX3htWOEi7yzXdN3sZKqbna6KSf6H0fYuFB9jBss61BoDCaHNMUzQZxwqwP/0emdIPEBy3v/otR+Tig4VblHh90dyvWsnEPT1w7PssJdr9gjC6P1kJeuIcjyDPdo2OlEIjzbvHDcM77JY8F8kvDo9PAWf4PYzA8Xnc2qBFPlPVHf57PzfxTNrzELTIIxHOpV8GyWQDcs8D7L5kNLd9RT1bco3mM8siSD4kXtN6wLFEzSjONcKwcuEYVe6Fc8DE99UzPbfwL3fQFmnsXyFgkClIwfJW5HWrrEmR3yx12GKWCLja7UqakL2WtvueItIzEhrmaoAJVjxjmtFscVgSPm/h504T9ItlcunYIU6hPKlJm/ZvQRPTMgdkCOO0IopSHBvDibZ6ARhz8n+SSA2DzpRN8zlT429ODUf19GG8LbyGdT4C9pTo3S/SkoZo6cS4LFVYSDTmr+v0TAlUnC9ykkVAWc5q0yPCynNcSW01O2drO4cXJHCocm1jeeQvJmtyPHnk7E1SpUU0t4P0rHBxDnM80EvLMX6lDc+q0Ascv1Ks+DmA/3xVnrQYVowLxYZGf0N2A6PaEfQSi6bLOvovDkg+jZW+xT8jVRV69jUUjUC8dOzjPhSKyuXtQkV8sr41QuZ+I1DHi37kdH/V95p7rMKY2xtGCKtOexrrxqVgMFvK0dT40zXFp9Jo= 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)(396003)(39860400002)(346002)(136003)(366004)(376002)(451199015)(19627235002)(107886003)(7696005)(26005)(83380400001)(53546011)(9686003)(478600001)(38070700005)(966005)(55016003)(186003)(6506007)(2906002)(4326008)(316002)(110136005)(71200400001)(8676002)(66946007)(52536014)(66556008)(5660300002)(66446008)(64756008)(66476007)(76116006)(41300700001)(8936002)(86362001)(33656002)(82960400001)(122000001)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RaYnDDmFRoFdGvemyrLb5ge9pAF0xwCVvZiPyrCmxcpF8IxLzw2UFrTy/KzV?= =?us-ascii?Q?acIS5nx9Yy4x+1JbXqeAvP9ccMmaP3iVLIpl7qpdqhHTRq0tlWRgQmcR79Ud?= =?us-ascii?Q?VSurmgLbTxmGwJ4GA0465Efh4Nh5w5DtigtVO3LDO55c314HkHm7qXYC2wbr?= =?us-ascii?Q?yGeo6iizoqhUoseqvOVRywFR2eohEpme5z2qcUFcYGX0E1vOdTWJ0RCen1xM?= =?us-ascii?Q?mlqo5g5GrIGhsz3+2nFgRZYnhJLhWK2hjNL2FM82RMBgU/0jW9gZhb/JtPwE?= =?us-ascii?Q?UffMrk+13twNb2qI2Ffk3mUw7j/YQqMjZQSLa+O9q2XqS1ZrGwVi/DZn9ypw?= =?us-ascii?Q?s4pJyqbO6dG2NpCtKQjudvZj9Mr3QAP32pVB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dSe4luNrE9qR8MdGWwnzAvqXryTaKyKqH+TB42wOI3DCYo?= =?us-ascii?Q?7iOOFcDMr/E3nnt+JCXJfZPJBHEnCFvHjFskStL2lgtaDocr6t7/KpHHkaEP?= =?us-ascii?Q?rCuE1e+0ONEMFXUHl1hH9kTPeOBGpyDrL2hn7p7d9rI85Pda4hU4CBAOmMau?= =?us-ascii?Q?M0+2GiKHj7z4uMywM7uQfXUfiOZFNqOWAPxDgvHKHbuZb4pEiBQOl3+FcZy2?= =?us-ascii?Q?BOhOThNZVdjlSXp6FijvCbBJaxoLk1x3vEEmA8LV5RJb/cLSylZ1Er6xEnDw?= =?us-ascii?Q?HDiFoCx02QxG4GXXPiVZhwIllvxEg6UzGxrkRTZuElVEIwBbQ1nXGy1GebfZ?= =?us-ascii?Q?yw=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: f5342db9-d5a6-4376-e6b2-08dab61d168a X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2022 00:08:47.4230 (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: cTTRRAY15jPEhJTo6HLtgmOoEhxlwG/wDoakcqEh4Xt+o7i/XvL1Ub/Clr27STmnHr1QKdoiLZV4v4oiblbSqJ9z8bEljhQqOYomptZqnzA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6499 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 Reviewed-by: Nate DeSimone -----Original Message----- From: Chiu, Chasel =20 Sent: Sunday, October 23, 2022 9:05 PM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Zeng, Star Subject: [PATCH] IntelFsp2Pkg: FSP should support input UPD as NULL. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4114 FSP specification supports input UPD as NULL cases which FSP will use built= -in UPD region instead. FSP should not return INVALID_PARAMETER in such cases. Cc: Nate DeSimone Cc: Star Zeng Signed-off-by: Chasel Chiu --- IntelFsp2Pkg/FspSecCore/SecFspApiChk.c | 11 +++++++++-- IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm | 8 -------- IntelFsp2Pkg= /FspSecCore/X64/FspApiEntryT.nasm | 7 ------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c b/IntelFsp2Pkg/FspSecCo= re/SecFspApiChk.c index a44fbf2a50..bfbdf70083 100644 --- a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c +++ b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c @@ -44,6 +44,8 @@ FspApiCallingCheck ( // if (((UINTN)FspData !=3D MAX_ADDRESS) && ((UINTN)FspData !=3D M= AX_UINT32)) { Status =3D EFI_UNSUPPORTED;+ } else if (ApiParam =3D= =3D NULL) {+ Status =3D EFI_SUCCESS; } else if (EFI_ERROR (FspUpdS= ignatureCheck (ApiIdx, ApiParam))) { Status =3D EFI_INVALID_PARAMETER= ; }@@ -67,9 +69,12 @@ FspApiCallingCheck ( } else { if (FspData->Signature !=3D FSP_GLOBAL_DATA_SIGNATURE) = { Status =3D EFI_UNSUPPORTED;- } else if (EFI_ERROR (FspUpdSig= natureCheck (FspSiliconInitApiIndex, ApiParam))) {- Status =3D EFI_I= NVALID_PARAMETER; } else if (ApiIdx =3D=3D FspSiliconInitApiIndex) {+= if (ApiParam =3D=3D NULL) {+ Status =3D EFI_SUCCESS;+ = } else if (EFI_ERROR (FspUpdSignatureCheck (FspSiliconInitApiIndex, ApiP= aram))) {+ Status =3D EFI_INVALID_PARAMETER;+ } // = // Reset MultiPhase NumberOfPhases to zero //@@ -89,6 +94,8= @@ FspApiCallingCheck ( } else { if (FspData->Signature !=3D FSP_GLOBAL_DATA_SIGNATURE) = { Status =3D EFI_UNSUPPORTED;+ } else if (ApiParam =3D=3D NULL= ) {+ Status =3D EFI_SUCCESS; } else if (EFI_ERROR (FspUpdSigna= tureCheck (FspSmmInitApiIndex, ApiParam))) { Status =3D EFI_INVALID= _PARAMETER; }diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.n= asm b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm index 61030a843b..52e1ff6f1f 100644 --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm @@ -555,14 +555,6 @@ ASM_PFX(TempRamInitApi): SAVE_EAX SAVE_EDX - ;- ; Check Parameter- ;- mov eax, dword = [esp + 4]- cmp eax, 0- mov eax, 80000002h- jz TempRam= InitExit- ; ; Sec Platform Init ;diff --git a/IntelFsp2Pkg/FspSecCore= /X64/FspApiEntryT.nasm b/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm index 7dd89c531a..23bb2b0481 100644 --- a/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm +++ b/IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm @@ -441,13 +441,6 @@ ASM_PFX(TempRamInitApi): or rax, rdx SAVE_TS rax - ;- ; Check Parameter- ;- cmp = rcx, 0- mov rcx, 08000000000000002h- jz TempRamInitExit-= ; ; Sec Platform Init ;--=20 2.35.0.windows.1