From nobody Sat Feb 7 08:44:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+88399+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88399+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1649053411; cv=none; d=zohomail.com; s=zohoarc; b=FX2N1T1qVkQ00vsoP+CIPxgo0SWCgqijTe5lfZtATD3Zagyf8rKzphDXaJLv7nrENcLRZaUv32kleaFriF9ZkkRVG7cxdvn29fqE2JlGt7EPy4IhPXKERx0hHa557LNJpEmOdMAuQkWvsSnJSx5sbjdXZP2RESTWIMNG97+dxiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649053411; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=0mWlf8hSy7Fgj6h/kbw0FUrXeON9IaecnSwDNdQqpjc=; b=LRRhWU6ImTaYzOuT9sz3tyJiwFaNMKlYHyaMEUlzL/lpWBjInI9jOnATG9TnzFEt0xttq2tuul2PNKx7AJgDprTsD8Kz6tF/0jNCzoQAXWVLuPXRgb7C0B/SpvulFv/xsiYsOYAD0vt4gmEOwfxIheQFh8E7a9slCWt03Ss9wo4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88399+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1649053411146623.8722229180755; Sun, 3 Apr 2022 23:23:31 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id KqJlYY1788612xUnRrojodVZ; Sun, 03 Apr 2022 23:23:30 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.32299.1649053407401800519 for ; Sun, 03 Apr 2022 23:23:30 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10306"; a="321143239" X-IronPort-AV: E=Sophos;i="5.90,233,1643702400"; d="scan'208";a="321143239" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2022 23:23:29 -0700 X-IronPort-AV: E=Sophos;i="5.90,233,1643702400"; d="scan'208";a="696468709" X-Received: from tedkuo1-win10.gar.corp.intel.com ([10.5.215.13]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2022 23:23:28 -0700 From: "Kuo, Ted" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Star Zeng , Ashraf Ali S Subject: [edk2-devel][PATCH v2 6/8] IntelFsp2WrapperPkg: Adopt FSPM_UPD_COMMON_FSP24 for X64 Date: Mon, 4 Apr 2022 14:23:09 +0800 Message-Id: In-Reply-To: References: In-Reply-To: References: Precedence: Bulk List-Unsubscribe: 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,ted.kuo@intel.com X-Gm-Message-State: uat0Buw4FUbmDan6wbU1VrO5x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649053410; bh=g7eFVaD7/7GjLu5jinja3mYjxQ6DAcCmFkUL4k5ojXU=; h=Cc:Date:From:Reply-To:Subject:To; b=v+uMBu6Xy8Cf/3IcwueGOzOF85yBQeqEKSZ7dCws/0JZFJJUuEDXXTIxb4Aj6Ehw0Pd 04w7EB/rJVraJFgvrByQLRwOLLDll4AZ2HGBj0uLUqCL4wCArcAxlvar6a4a20/tQLgDO kkqSBF5405GzdAYUrivdNPOHO5hVpetExb4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649053413180100027 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3893 Adopt FSPM_UPD_COMMON_FSP24 in FspmWrapperPeim to support X64. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Star Zeng Cc: Ashraf Ali S Signed-off-by: Ted Kuo --- .../FspmWrapperPeim/FspmWrapperPeim.c | 25 ++++++++++++++----= ---- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c b/IntelF= sp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c index b0c6b2f8a6..62a34467e0 100644 --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c @@ -71,7 +71,7 @@ PeiFspMemoryInit ( UINT64 TimeStampCounterStart; VOID *FspHobListPtr; VOID *HobData; - FSPM_UPD_COMMON *FspmUpdDataPtr; + VOID *FspmUpdDataPtr; UINTN *SourceData; =20 DEBUG ((DEBUG_INFO, "PeiFspMemoryInit enter\n")); @@ -89,7 +89,7 @@ PeiFspMemoryInit ( // // Copy default FSP-M UPD data from Flash // - FspmUpdDataPtr =3D (FSPM_UPD_COMMON *)AllocateZeroPool ((UINTN)FspmHea= derPtr->CfgRegionSize); + FspmUpdDataPtr =3D AllocateZeroPool ((UINTN)FspmHeaderPtr->CfgRegionSi= ze); ASSERT (FspmUpdDataPtr !=3D NULL); SourceData =3D (UINTN *)((UINTN)FspmHeaderPtr->ImageBase + (UINTN)Fspm= HeaderPtr->CfgRegionOffset); CopyMem (FspmUpdDataPtr, SourceData, (UINTN)FspmHeaderPtr->CfgRegionSi= ze); @@ -97,17 +97,24 @@ PeiFspMemoryInit ( // // External UPD is ready, get the buffer from PCD pointer. // - FspmUpdDataPtr =3D (FSPM_UPD_COMMON *) GetFspmUpdDataAddress(); + FspmUpdDataPtr =3D (VOID *) GetFspmUpdDataAddress(); ASSERT (FspmUpdDataPtr !=3D NULL); } =20 DEBUG ((DEBUG_INFO, "UpdateFspmUpdData enter\n")); - UpdateFspmUpdData ((VOID *)FspmUpdDataPtr); - DEBUG ((DEBUG_INFO, " NvsBufferPtr - 0x%x\n", FspmUpdDataPtr->Fs= pmArchUpd.NvsBufferPtr)); - DEBUG ((DEBUG_INFO, " StackBase - 0x%x\n", FspmUpdDataPtr->Fs= pmArchUpd.StackBase)); - DEBUG ((DEBUG_INFO, " StackSize - 0x%x\n", FspmUpdDataPtr->Fs= pmArchUpd.StackSize)); - DEBUG ((DEBUG_INFO, " BootLoaderTolumSize - 0x%x\n", FspmUpdDataPtr->Fs= pmArchUpd.BootLoaderTolumSize)); - DEBUG ((DEBUG_INFO, " BootMode - 0x%x\n", FspmUpdDataPtr->Fs= pmArchUpd.BootMode)); + UpdateFspmUpdData (FspmUpdDataPtr); + if (((FSPM_UPD_COMMON *)FspmUpdDataPtr)->FspmArchUpd.Revision >=3D 3) { + DEBUG ((DEBUG_INFO, " StackBase - 0x%x\n", ((FSPM_UPD_COMMO= N_FSP24 *)FspmUpdDataPtr)->FspmArchUpd.StackBase)); + DEBUG ((DEBUG_INFO, " StackSize - 0x%x\n", ((FSPM_UPD_COMMO= N_FSP24 *)FspmUpdDataPtr)->FspmArchUpd.StackSize)); + DEBUG ((DEBUG_INFO, " BootLoaderTolumSize - 0x%x\n", ((FSPM_UPD_COMMO= N_FSP24 *)FspmUpdDataPtr)->FspmArchUpd.BootLoaderTolumSize)); + DEBUG ((DEBUG_INFO, " BootMode - 0x%x\n", ((FSPM_UPD_COMMO= N_FSP24 *)FspmUpdDataPtr)->FspmArchUpd.BootMode)); + } else { + DEBUG ((DEBUG_INFO, " NvsBufferPtr - 0x%x\n", ((FSPM_UPD_COMMO= N *)FspmUpdDataPtr)->FspmArchUpd.NvsBufferPtr)); + DEBUG ((DEBUG_INFO, " StackBase - 0x%x\n", ((FSPM_UPD_COMMO= N *)FspmUpdDataPtr)->FspmArchUpd.StackBase)); + DEBUG ((DEBUG_INFO, " StackSize - 0x%x\n", ((FSPM_UPD_COMMO= N *)FspmUpdDataPtr)->FspmArchUpd.StackSize)); + DEBUG ((DEBUG_INFO, " BootLoaderTolumSize - 0x%x\n", ((FSPM_UPD_COMMO= N *)FspmUpdDataPtr)->FspmArchUpd.BootLoaderTolumSize)); + DEBUG ((DEBUG_INFO, " BootMode - 0x%x\n", ((FSPM_UPD_COMMO= N *)FspmUpdDataPtr)->FspmArchUpd.BootMode)); + } DEBUG ((DEBUG_INFO, " HobListPtr - 0x%x\n", &FspHobListPtr)); =20 TimeStampCounterStart =3D AsmReadTsc (); --=20 2.16.2.windows.1 -=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 (#88399): https://edk2.groups.io/g/devel/message/88399 Mute This Topic: https://groups.io/mt/90235999/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-