From nobody Fri May 17 03:54:30 2024 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+86389+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+86389+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1643967553; cv=none; d=zohomail.com; s=zohoarc; b=CkYLIknyPrLScQZPT+XO8lqQAjGtkCTUQKPLseC0Baex/73b5fKn4CRDGhn7eu34/KaBOAuYN63iZ45L8I6RYaBq0w6fo/QyfbxIjKNM8r+CvxhIMrioEyErIv6ZEvrmvv+vluKw+qu1tH9LyC7RnUZ2I7QW8gxyT/Wbd14KO8o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643967553; h=Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=7ag1v9mg+XXbjitD6hf3wXSz9HcsOpzlm47fGAhu/V4=; b=YYMBC2zUvCG5aW7aPRLw6jabZY5YFdCxVVYvfQBRRhc3vjpC5bJTntmnLP1WH5sKanTptbobS3ytmN80tqjnybVQW6WrRG3YPRXOoWM85+qybNkYHVmMV437VlmNB3e7PcZlPU1qEPaG+YHygMIS/LkUvQdxFKDY+DegjF7Q6ck= 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+86389+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 1643967553668766.4306147152705; Fri, 4 Feb 2022 01:39:13 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id xT59YY1788612xofhm3hDZm6; Fri, 04 Feb 2022 01:39:13 -0800 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.7336.1643967552025427598 for ; Fri, 04 Feb 2022 01:39:12 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10247"; a="334735078" X-IronPort-AV: E=Sophos;i="5.88,342,1635231600"; d="scan'208";a="334735078" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 01:39:11 -0800 X-IronPort-AV: E=Sophos;i="5.88,342,1635231600"; d="scan'208";a="620787952" X-Received: from tedkuo1-win10.gar.corp.intel.com ([10.5.215.13]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 01:39:10 -0800 From: "Kuo, Ted" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Make GetFspm(s)UpdDataAddress reusable Date: Fri, 4 Feb 2022 17:38:46 +0800 Message-Id: <648cbd06784d5fe7cebcfb6802a5a441f66bbbc4.1643966188.git.ted.kuo@intel.com> 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: 5y29PfwSq2pBo4T9HMyyd6Y6x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1643967553; bh=sP5AgRnC7sGlhs6NIGUS50mn40v8jV7YMlIH0rmCS+o=; h=Date:From:Reply-To:Subject:To; b=ldTjo651djWkOmmm2ngJC4uMdvSNVq1KOV8MDh0pA6m2lcJyINLY+QPfycsIyD8Xhar ykZhi45X/cLJc+MFFJ/ZNLzkIaZOkafDXksRs5z611cMjnyXCfg34pr1G6giD8vHaDR0s d3ZGDs97B7LojCZ4Cv6yIuQkgKlQ9mhjPrI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1643967554084100001 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=3D3821 Moved GetFspmUpdDataAddress and GetFspsUpdDataAddress to FspWrapperApiLib so that they can be consumed by other drivers. Signed-off-by: Ted Kuo --- .../FspmWrapperPeim/FspmWrapperPeim.c | 18 ----------- .../FspmWrapperPeim/FspmWrapperPeim.inf | 2 -- .../FspsWrapperPeim/FspsWrapperPeim.c | 18 ----------- .../FspsWrapperPeim/FspsWrapperPeim.inf | 2 -- .../Include/Library/FspWrapperApiLib.h | 22 +++++++++++++ .../BaseFspWrapperApiLib/BaseFspWrapperApiLib.inf | 5 +++ .../BaseFspWrapperApiLib/FspWrapperApiLib.c | 36 ++++++++++++++++++= ++++ 7 files changed, 63 insertions(+), 40 deletions(-) diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c b/IntelF= sp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c index b0c6b2f8a6..d119f0b710 100644 --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c @@ -38,24 +38,6 @@ =20 extern EFI_GUID gFspHobGuid; =20 -/** - Get the FSP M UPD Data address - - @return FSP-M UPD Data Address -**/ - -UINTN -GetFspmUpdDataAddress ( - VOID - ) -{ - if (PcdGet64 (PcdFspmUpdDataAddress64) !=3D 0) { - return (UINTN) PcdGet64 (PcdFspmUpdDataAddress64); - } else { - return (UINTN) PcdGet32 (PcdFspmUpdDataAddress); - } -} - /** Call FspMemoryInit API. =20 diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf b/Inte= lFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf index 5d0e021401..95317fb70d 100644 --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf @@ -56,11 +56,9 @@ =20 [Pcd] gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress ## CONSUMES - gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress ## CONSUMES gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## CONSUMES gIntelFsp2WrapperTokenSpaceGuid.PcdFsptBaseAddress ## CONSUMES gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig ## CONSUMES - gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress64 ## CONSUMES =20 [Sources] FspmWrapperPeim.c diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c b/IntelF= sp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c index fadadd40e6..d34de97c1b 100644 --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c @@ -181,24 +181,6 @@ FspSiliconInitDoneGetFspHobList ( } } =20 -/** - Get the FSP S UPD Data address - - @return FSP-S UPD Data Address -**/ - -UINTN -GetFspsUpdDataAddress ( - VOID - ) -{ - if (PcdGet64 (PcdFspsUpdDataAddress64) !=3D 0) { - return (UINTN) PcdGet64 (PcdFspsUpdDataAddress64); - } else { - return (UINTN) PcdGet32 (PcdFspsUpdDataAddress); - } -} - /** This function is for FSP dispatch mode to perform post FSP-S process. =20 diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf b/Inte= lFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf index da0049a654..50d33d0e0e 100644 --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf @@ -65,10 +65,8 @@ =20 [Pcd] gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## CONSUMES - gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress ## CONSUMES gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection ## CONSUMES gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig ## CONSUMES - gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress64 ## CONSUMES =20 [Guids] gFspHobGuid ## CONSUMES ## HOB diff --git a/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h b/Intel= Fsp2WrapperPkg/Include/Library/FspWrapperApiLib.h index d38582d3e5..4ae42ff180 100644 --- a/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h +++ b/IntelFsp2WrapperPkg/Include/Library/FspWrapperApiLib.h @@ -11,6 +11,28 @@ =20 #include =20 +/** + Get the FSP M UPD Data address + + @return FSP-M UPD Data Address +**/ +UINTN +EFIAPI +GetFspmUpdDataAddress ( + VOID + ); + +/** + Get the FSP S UPD Data address + + @return FSP-S UPD Data Address +**/ +UINTN +EFIAPI +GetFspsUpdDataAddress ( + VOID + ); + /** Find FSP header pointer. =20 diff --git a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrappe= rApiLib.inf b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapp= erApiLib.inf index 1e348b539f..82496eb300 100644 --- a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib= .inf +++ b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib= .inf @@ -63,3 +63,8 @@ [Pcd] gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress ## CONSUMES gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## CONSUMES + gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress ## CONSUMES + gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress64 ## CONSUMES + gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress ## CONSUMES + gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress64 ## CONSUMES + diff --git a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/FspWrapperApi= Lib.c b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/FspWrapperApiLib.c index 67faad927c..2d24c988b9 100644 --- a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/FspWrapperApiLib.c +++ b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/FspWrapperApiLib.c @@ -12,6 +12,42 @@ #include #include =20 +/** + Get the FSP M UPD Data address + + @return FSP-M UPD Data Address +**/ +UINTN +EFIAPI +GetFspmUpdDataAddress ( + VOID + ) +{ + if (PcdGet64 (PcdFspmUpdDataAddress64) !=3D 0) { + return (UINTN) PcdGet64 (PcdFspmUpdDataAddress64); + } else { + return (UINTN) PcdGet32 (PcdFspmUpdDataAddress); + } +} + +/** + Get the FSP S UPD Data address + + @return FSP-S UPD Data Address +**/ +UINTN +EFIAPI +GetFspsUpdDataAddress ( + VOID + ) +{ + if (PcdGet64 (PcdFspsUpdDataAddress64) !=3D 0) { + return (UINTN) PcdGet64 (PcdFspsUpdDataAddress64); + } else { + return (UINTN) PcdGet32 (PcdFspsUpdDataAddress); + } +} + /** Wrapper for a thunk to transition from long mode to compatibility mode = to execute 32-bit code and then transit back to long mode. --=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 (#86389): https://edk2.groups.io/g/devel/message/86389 Mute This Topic: https://groups.io/mt/88903464/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-