From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.15932.1684736014855581591 for ; Sun, 21 May 2023 23:13:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=EHJnKFh2; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: ming.tan@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684736014; x=1716272014; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=46CqY7rdLSTyrYUUzqcpQJVZXRYPwCwOZTcfSNGMSYw=; b=EHJnKFh2EzyGasAXS2LwbrWh8u2fDioAMeVDKW0DP+DMUV2RAE0M9zK/ 0yZmViDbxFVvdpDM14QPVRvqlhK4yQAWv7MAeSq2mDRXIUCyVkaIVWjVl R8uTNLRoQ1QVlKeHWUfHF0S4nCFkKKRVL9sp2l7aqFVa3rcttXvMdvtsk wX2lXsHkD4VID8nYd1Yxj+BbF5396uEVAXErYOMh9TodgwglevyQcO0QX rW7+5jawixNxiIyFgB0Q5uIpBxxjnIo0uY1q6U9UCP6/vaLoJONrAkstN Oym27meUpU7iNnMJ5+LKM5l6lk9X1ZrsBJJVmKhm7J32w3RGXNElueHsP w==; X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="333201828" X-IronPort-AV: E=Sophos;i="6.00,183,1681196400"; d="scan'208";a="333201828" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2023 23:13:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="877644710" X-IronPort-AV: E=Sophos;i="6.00,183,1681196400"; d="scan'208";a="877644710" Received: from mingtan1-desk1.ccr.corp.intel.com ([10.239.153.149]) by orsmga005.jf.intel.com with ESMTP; 21 May 2023 23:13:33 -0700 From: "Tan, Ming" To: devel@edk2.groups.io Cc: Chasel Chiu , Duggapu Chinni B Subject: [PATCH] IntelFsp2WrapperPkg: Fix ASSERT when FSP-S/M use FFS3 Date: Mon, 22 May 2023 14:13:06 +0800 Message-Id: <20230522061306.11787-1-ming.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4458 Original code call PeiServicesInstallFvInfoPpi() with NULL for the FvFormat parameter, then PeiServicesInstallFvInfoPpi() will assume it use FFS2, then ASSERT if FSP-S/M use FFS3. Now set the FvFormat to the info got from FvHeader. Cc: Chasel Chiu Cc: Duggapu Chinni B Signed-off-by: Ming Tan --- IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c b/IntelF= sp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c index ea206a7960..ba0c742fea 100644 --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c @@ -217,7 +217,7 @@ FspmWrapperInit ( ASSERT_EFI_ERROR (Status);=0D =0D PeiServicesInstallFvInfoPpi (=0D - NULL,=0D + &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress)= )->FileSystemGuid,=0D (VOID *)(UINTN)PcdGet32 (PcdFspmBaseAddress),=0D (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseA= ddress))->FvLength,=0D NULL,=0D diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c b/IntelF= sp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c index 091ddb697a..08fe0fdb7e 100644 --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c @@ -438,7 +438,7 @@ FspsWrapperInitDispatchMode ( // FSP-S Wrapper running in Dispatch mode and reports FSP-S FV to PEI di= spatcher.=0D //=0D PeiServicesInstallFvInfoPpi (=0D - NULL,=0D + &((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspsBaseAddress))-= >FileSystemGuid,=0D (VOID *)(UINTN)PcdGet32 (PcdFspsBaseAddress),=0D (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspsBaseAdd= ress))->FvLength,=0D NULL,=0D --=20 2.31.1.windows.1