From nobody Wed May 8 23:03:27 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+71383+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+71383+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1612570550; cv=none; d=zohomail.com; s=zohoarc; b=aqgy4yZ0zKg8IToLMiWQ4d8vPEJTiJDQKvREugKaFSy8+BPBv9oQWCOoQOe/QinYUDGGwEyiZsSBsICRzehPHBsWLArsra7O80kHx0tIUhETIFXzTF+CADDmga00KuMf7I/8vjNIFlqzo/ScVTPV5NwEF3YV2NaTKWwPMeRjeY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612570550; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=XYPX1F+e6XnX9ZT+WFBPCP71Zhx+FWo6yjPmpn0AspU=; b=GcnHF8SNoLB3yBRtT3ehf9eFb6Tn50OcWq0/SNkFZvWAF2zwyTcJCjAamr0aG4VF+N/ro1GjLoMYQlmeyYIzJuGmsc+k9wos9oqFRD2CsBUINhDhfBJ19L9B9SghcB8QmE7r1opm2kwNUBBt3sWxhGNKKaZgQ//nVUJssW2ZG7E= 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+71383+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1612570550330366.1874729315342; Fri, 5 Feb 2021 16:15:50 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id GctWYY1788612xz2m3pNNy0I; Fri, 05 Feb 2021 16:15:50 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.369.1612570544454701853 for ; Fri, 05 Feb 2021 16:15:44 -0800 X-Received: from localhost.localdomain (unknown [131.107.174.202]) by linux.microsoft.com (Postfix) with ESMTPSA id 22850205CF85; Fri, 5 Feb 2021 16:15:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 22850205CF85 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [edk2-platforms][PATCH v1 1/3] MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE Date: Fri, 5 Feb 2021 16:15:05 -0800 Message-Id: <20210206001507.1224-2-mikuback@linux.microsoft.com> In-Reply-To: <20210206001507.1224-1-mikuback@linux.microsoft.com> References: <20210206001507.1224-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,mikuback@linux.microsoft.com X-Gm-Message-State: qJkUxosxJPKCjHpECONrugVHx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1612570550; bh=8UqfUGJeYz/46FzAviDDTREBn/n0GwKPbvXmOUusl7o=; h=Cc:Date:From:Reply-To:Subject:To; b=lrfmN/BXlvIN5JpYW2yfrnj0ssKPRJVS3UTj1ehaL1bmRGdmljsZuYiDOEnN/jesN+s 9hVxzZ1MtMTgwwuuKtDEnOOwHlqAEkZYh3NfOjcfH7FQmtNM7tD5Sfgg6eU7M2RwjnCbF +Aq2Rl0OuKcd5ML0COmsK3mrz1gSBs9JxuQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Michael Kubacki This NULL library can be used to link against a MODULE_TYPE other than BASE and that would be useful as it is a NULL class instance. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki Reviewed-by: Nate DeSimone --- Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlash= CommonLibNull.inf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibN= ull/SpiFlashCommonLibNull.inf b/Platform/Intel/MinPlatformPkg/Flash/Library= /SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf index d4964681de3d..75ef1cb921df 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/Spi= FlashCommonLibNull.inf +++ b/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/Spi= FlashCommonLibNull.inf @@ -12,8 +12,8 @@ [Defines] BASE_NAME =3D SpiFlashCommonLibNull FILE_GUID =3D F35BBEE7-A681-443E-BB15-07AF9FABBDED VERSION_STRING =3D 1.0 - MODULE_TYPE =3D DXE_SMM_DRIVER - LIBRARY_CLASS =3D SpiFlashCommonLib|DXE_SMM_DRIVER + MODULE_TYPE =3D BASE + LIBRARY_CLASS =3D SpiFlashCommonLib # # The following information is for reference only and not required by the = build tools. # --=20 2.28.0.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 (#71383): https://edk2.groups.io/g/devel/message/71383 Mute This Topic: https://groups.io/mt/80420927/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- From nobody Wed May 8 23:03:27 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+71384+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+71384+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1612570556; cv=none; d=zohomail.com; s=zohoarc; b=DjTqPXsCPLFovd4dc859AnTj0jDLRORipIqSZLq9ppdi1PWMgzBb1XhyPVwADyJH/in+fm/On6ThEGl+Vp+EVLuwV4Odrf41IYgo/sb0v941LIpyLqmLinWY7xjx8ARDrJAcDdr2EQxi2nM+4+o0/LD/sZIWZUKuJcx/xpAgNv4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612570556; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Sb+JS7+5o+Ybm3Wr190zk9i9jTw5LBydy/nb+BzODR8=; b=B1FF3l6+TuiVLQLbslKOGtTL3m8qStGdZvaA6GK1LHcsH90Gdz+wyogfxlcmV31tlgMiPdM38NJlnJi+meVTMp3Agqig/7tO6YV04moWhmnpTFFaBSO/EQUre2LxsWEuN1Q42IGqpJ9BlC9d9o5tIv52a0JO5fJX9xtKYao8L0U= 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+71384+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 161257055699170.8716347165905; Fri, 5 Feb 2021 16:15:56 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id KRmNYY1788612xOikVajKM0o; Fri, 05 Feb 2021 16:15:55 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web09.382.1612570550277334628 for ; Fri, 05 Feb 2021 16:15:50 -0800 X-Received: from localhost.localdomain (unknown [131.107.174.202]) by linux.microsoft.com (Postfix) with ESMTPSA id C8AC1205CF86; Fri, 5 Feb 2021 16:15:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C8AC1205CF86 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [edk2-platforms][PATCH v1 2/3] MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE libraries Date: Fri, 5 Feb 2021 16:15:06 -0800 Message-Id: <20210206001507.1224-3-mikuback@linux.microsoft.com> In-Reply-To: <20210206001507.1224-1-mikuback@linux.microsoft.com> References: <20210206001507.1224-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,mikuback@linux.microsoft.com X-Gm-Message-State: eZeyV0yqXWa78486boyQv7xUx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1612570555; bh=2hWu1qDmbiDJcf4Gwpq9lu3E5usPgqZ5fLD09qc+uX4=; h=Cc:Date:From:Reply-To:Subject:To; b=QtalJ1EG6RB3BU+uvbjD/FhA4Akk0fte5X5fhprMbgY/9GtAS94CK5U/x2Hj3Hfa4Nk vnj674kBbzV/OvLwzIPvoIoz3X8KppBITNj9cLbzXsiLfUL7T5TQT+jLrKfoFVPUOBXYo ISVuVGV60kDsEY8O8DmSeFOEVIrKVRgnP98= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Michael Kubacki Adds a fundamental set of library instances that are needed to build MM_STANDALONE modules. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki Reviewed-by: Nate DeSimone --- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dsc index d0b559381720..5e88de43e08d 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -2,6 +2,7 @@ # Platform description. # # Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -112,6 +113,12 @@ [LibraryClasses.common.DXE_SMM_DRIVER] TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestP= ointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointLib.inf =20 +[LibraryClasses.common.MM_STANDALONE] + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf + MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocation= Lib/StandaloneMmMemoryAllocationLib.inf + MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/Standalon= eMmServicesTableLib.inf + StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint= /StandaloneMmDriverEntryPoint.inf + ##########################################################################= ######################### # # Components Section - list of the modules and components that will be pro= cessed by compilation --=20 2.28.0.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 (#71384): https://edk2.groups.io/g/devel/message/71384 Mute This Topic: https://groups.io/mt/80420929/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- From nobody Wed May 8 23:03:27 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+71385+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+71385+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1612570560; cv=none; d=zohomail.com; s=zohoarc; b=J2EtPvrpa9Rm8CFiayOsMUCKQoxgjHCimxmZW1/eGciHuMoe5IE8brYwmdAMGESEcE/rs3m2LJNkEe82a9Vwu0vynpUAru29fiQdIA54Q/maORvx2VlRO0oe9bIoTfweqT+W+YQdWJfRaCKn6g54OzXbWkky2LgSrlS/MCsBDYQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612570560; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=FDTRaLjC1KSk0y4S03veerO19J9Wg5oECDTdN3pwa5o=; b=JJJuR3HKz3CFcfO4fbZwPX1qEg4RG0fnRAWNK+3v46/N+sf5NI34GcJCUSFPTQUFbPhO/d/iUNSlFBQ8vu+lY6JVou5pFzJ+HGuxHHrKYp0dEVD72FxK0EWGciztVz7ntDUiPORLVKHT3EKK5eNm1iYELGsCAzQA42hTWJlw9Mk= 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+71385+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1612570560240192.48747940770556; Fri, 5 Feb 2021 16:16:00 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id soiVYY1788612xjFg6cFtveP; Fri, 05 Feb 2021 16:15:59 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.377.1612570554301121827 for ; Fri, 05 Feb 2021 16:15:54 -0800 X-Received: from localhost.localdomain (unknown [131.107.174.202]) by linux.microsoft.com (Postfix) with ESMTPSA id 021CD20B4909; Fri, 5 Feb 2021 16:15:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 021CD20B4909 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [edk2-platforms][PATCH v1 3/3] MinPlatformPkg/SpiFvbService: Add Standalone MM support Date: Fri, 5 Feb 2021 16:15:07 -0800 Message-Id: <20210206001507.1224-4-mikuback@linux.microsoft.com> In-Reply-To: <20210206001507.1224-1-mikuback@linux.microsoft.com> References: <20210206001507.1224-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,mikuback@linux.microsoft.com X-Gm-Message-State: 0HxuN9hhydiBkrCLW0EsRdt4x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1612570559; bh=sY6sXRoo2t8uCdu0ZrOG+A0Vhf+2wIYZH+6hg2B9yT4=; h=Cc:Date:From:Reply-To:Subject:To; b=KnhazDNt/5+vHNE6mZSmS8swUBC1Dxo+3RmNYSdkeXjVsJRy6rBKNrRj7Lgymrw8zod LocAnEVUSa2tSjy93KBpy+NImSgxumK1wpfIuKVU6jk6exnClSyZB0BiX7nKOGYFJIvoI rqClNsCW5+y56CVEXM9eKqLEpVnGDOPfsG8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Michael Kubacki Adds support for MM_STANDALONE. Retains the directory path to the SMM INF instance for backward compatibility with existing platforms. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =3D> }/FvbInfo.c= | 0 Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =3D> }/SpiFvbSer= viceCommon.c | 0 Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Smm/SpiFvbServiceSmm.c = =3D> SpiFvbServiceMm.c} | 34 +++++------------ Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneM= m.c | 32 ++++++++++++++++ Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditional= Mm.c | 32 ++++++++++++++++ Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =3D> }/SpiFvbSer= viceCommon.h | 4 -- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.h = | 22 +++++++++++ Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf = | 17 +++++---- Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{SpiFvbServiceSmm.inf = =3D> SpiFvbServiceStandaloneMm.inf} | 40 ++++++++++---------- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 2 + 10 files changed, 129 insertions(+), 54 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/FvbIn= fo.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c similarity index 100% rename from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/FvbInf= o.c rename to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFv= bServiceCommon.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvb= ServiceCommon.c similarity index 100% rename from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFvb= ServiceCommon.c rename to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCo= mmon.c diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Smm/SpiFvbSe= rviceSmm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eMm.c similarity index 89% rename from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Smm/SpiFvbSer= viceSmm.c rename to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm= .c index 251fcae30b90..3175f5f32e31 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Smm/SpiFvbServiceSm= m.c +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c @@ -1,14 +1,15 @@ /** @file - Common driver source for several Serial Flash devices + MM driver source for several Serial Flash devices which are compliant with the Intel(R) Serial Flash Interface Compatibili= ty Specification. =20 -Copyright (c) 2017, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent + Copyright (c) Microsoft Corporation.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 #include "SpiFvbServiceCommon.h" -#include +#include +#include #include =20 /** @@ -74,7 +75,7 @@ InstallFvbProtocol ( // FvbHandle =3D NULL; =20 - Status =3D gSmst->SmmInstallProtocolInterface ( + Status =3D gMmst->MmInstallProtocolInterface ( &FvbHandle, &gEfiSmmFirmwareVolumeBlockProtocolGuid, EFI_NATIVE_INTERFACE, @@ -82,7 +83,7 @@ InstallFvbProtocol ( ); ASSERT_EFI_ERROR (Status); =20 - Status =3D gSmst->SmmInstallProtocolInterface ( + Status =3D gMmst->MmInstallProtocolInterface ( &FvbHandle, &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, @@ -92,22 +93,13 @@ InstallFvbProtocol ( } =20 /** - The function does the necessary initialization work for Firmware Volume Block Driver. =20 - @param[in] ImageHandle The firmware allocated handle for the UEFI= image. - @param[in] SystemTable A pointer to the EFI system table. - - @retval EFI_SUCCESS This funtion always return EFI_SUCCESS. - It will ASSERT on errors. - **/ -EFI_STATUS -EFIAPI +VOID FvbInitialize ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + VOID ) { EFI_FVB_INSTANCE *FvbInstance; @@ -219,8 +211,7 @@ FvbInitialize ( mFvbModuleGlobal.FvbInstance =3D (EFI_FVB_INSTANCE *) AllocateRuntime= ZeroPool (BufferSize); if (mFvbModuleGlobal.FvbInstance =3D=3D NULL) { ASSERT (FALSE); - Status =3D EFI_OUT_OF_RESOURCES; - goto ERROR; + return; } =20 MaxLbaSize =3D 0; @@ -276,9 +267,4 @@ FvbInitialize ( =20 } } - - return EFI_SUCCESS; - -ERROR: - return Status; } diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eStandaloneMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbS= erviceStandaloneMm.c new file mode 100644 index 000000000000..252c818d6551 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStanda= loneMm.c @@ -0,0 +1,32 @@ +/** @file + MM driver source for several Serial Flash devices + which are compliant with the Intel(R) Serial Flash Interface Compatibili= ty Specification. + + Copyright (c) Microsoft Corporation.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "SpiFvbServiceCommon.h" +#include "SpiFvbServiceMm.h" + +/** + The driver Standalone MM entry point. + + @param[in] ImageHandle Image handle of this driver. + @param[in] MmSystemTable A pointer to the MM system table. + + @retval EFI_SUCCESS This function always returns EFI_SUCCESS. + +**/ +EFI_STATUS +EFIAPI +SpiFvbStandaloneMmInitialize ( + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *MmSystemTable + ) +{ + FvbInitialize (); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eTraditionalMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvb= ServiceTraditionalMm.c new file mode 100644 index 000000000000..1c2dac70e3c6 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTradit= ionalMm.c @@ -0,0 +1,32 @@ +/** @file + MM driver source for several Serial Flash devices + which are compliant with the Intel(R) Serial Flash Interface Compatibili= ty Specification. + + Copyright (c) Microsoft Corporation.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "SpiFvbServiceCommon.h" +#include "SpiFvbServiceMm.h" + +/** + The driver Traditional MM entry point. + + @param[in] ImageHandle Image handle of this driver. + @param[in] SystemTable A pointer to the EFI system table. + + @retval EFI_SUCCESS This function always returns EFI_SUCCESS. + +**/ +EFI_STATUS +EFIAPI +SpiFvbTraditionalMmInitialize ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + FvbInitialize (); + + return EFI_SUCCESS; +} diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFv= bServiceCommon.h b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvb= ServiceCommon.h similarity index 94% rename from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFvb= ServiceCommon.h rename to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCo= mmon.h index 6379fc86d52e..e9d69e985814 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFvbServic= eCommon.h +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon= .h @@ -15,9 +15,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include =20 -#include -#include -#include #include #include #include @@ -159,4 +156,3 @@ extern FV_INFO mPlatformFvBa= seAddress[]; extern FV_INFO mPlatformDefaultBaseAddress[]; =20 #endif - diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eMm.h b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.h new file mode 100644 index 000000000000..36af1130c8ee --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.h @@ -0,0 +1,22 @@ +/** @file + Definitions common to MM implementation in this driver. + + Copyright (c) Microsoft Corporation.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _SPI_FVB_SERVICE_MM_H_ +#define _SPI_FVB_SERVICE_MM_H_ + +/** + The function does the necessary initialization work for + Firmware Volume Block Driver. + +**/ +VOID +FvbInitialize ( + VOID + ); + +#endif diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eSmm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceS= mm.inf index d59c499b2e9e..10e51e11756f 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf @@ -2,6 +2,7 @@ # Component description file for the Serial Flash device Runtime driver. # # Copyright (c) 2017-2019, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -14,7 +15,8 @@ [Defines] VERSION_STRING =3D 1.0 MODULE_TYPE =3D DXE_SMM_DRIVER PI_SPECIFICATION_VERSION =3D 1.10 - ENTRY_POINT =3D FvbInitialize + ENTRY_POINT =3D SpiFvbTraditionalMmInitialize + # # The following information is for reference only and not required by the = build tools. # @@ -28,11 +30,10 @@ [LibraryClasses] BaseMemoryLib DebugLib BaseLib - UefiLib UefiBootServicesTableLib UefiDriverEntryPoint SpiFlashCommonLib - SmmServicesTableLib + MmServicesTableLib =20 [Packages] MdePkg/MdePkg.dec @@ -48,10 +49,12 @@ [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUM= ES =20 [Sources] - Common/SpiFvbServiceCommon.c - Common/FvbInfo.c - Common/SpiFvbServiceCommon.h - Smm/SpiFvbServiceSmm.c + FvbInfo.c + SpiFvbServiceCommon.h + SpiFvbServiceCommon.c + SpiFvbServiceMm.h + SpiFvbServiceMm.c + SpiFvbServiceTraditionalMm.c =20 [Protocols] gEfiDevicePathProtocolGuid ## PRODUCES diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServic= eSmm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceS= tandaloneMm.inf similarity index 64% copy from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSm= m.inf copy to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStan= daloneMm.inf index d59c499b2e9e..9f08d3673f41 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStanda= loneMm.inf @@ -1,20 +1,22 @@ ### @file -# Component description file for the Serial Flash device Runtime driver. +# Component description file for the Serial Flash device Standalone MM dri= ver. # # Copyright (c) 2017-2019, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # ### =20 [Defines] - INF_VERSION =3D 0x00010017 - BASE_NAME =3D SpiFvbServiceSmm - FILE_GUID =3D 68A10D85-6858-4402-B070-028B3EA21747 + INF_VERSION =3D 0x0001001B + BASE_NAME =3D SpiFvbServiceStandaloneMm + FILE_GUID =3D E6313655-8BD0-4EAB-B319-AD5E212CE6AB VERSION_STRING =3D 1.0 - MODULE_TYPE =3D DXE_SMM_DRIVER - PI_SPECIFICATION_VERSION =3D 1.10 - ENTRY_POINT =3D FvbInitialize + MODULE_TYPE =3D MM_STANDALONE + PI_SPECIFICATION_VERSION =3D 0x00010032 + ENTRY_POINT =3D SpiFvbStandaloneMmInitialize + # # The following information is for reference only and not required by the = build tools. # @@ -22,17 +24,15 @@ [Defines] # =20 [LibraryClasses] - PcdLib - MemoryAllocationLib - CacheMaintenanceLib + BaseLib BaseMemoryLib + CacheMaintenanceLib DebugLib - BaseLib - UefiLib - UefiBootServicesTableLib - UefiDriverEntryPoint + MemoryAllocationLib + PcdLib + MmServicesTableLib SpiFlashCommonLib - SmmServicesTableLib + StandaloneMmDriverEntryPoint =20 [Packages] MdePkg/MdePkg.dec @@ -48,10 +48,12 @@ [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUM= ES =20 [Sources] - Common/SpiFvbServiceCommon.c - Common/FvbInfo.c - Common/SpiFvbServiceCommon.h - Smm/SpiFvbServiceSmm.c + FvbInfo.c + SpiFvbServiceCommon.h + SpiFvbServiceCommon.c + SpiFvbServiceMm.h + SpiFvbServiceMm.c + SpiFvbServiceStandaloneMm.c =20 [Protocols] gEfiDevicePathProtocolGuid ## PRODUCES diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dsc index 5e88de43e08d..0460fd5a3206 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -117,6 +117,7 @@ [LibraryClasses.common.MM_STANDALONE] DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocation= Lib/StandaloneMmMemoryAllocationLib.inf MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/Standalon= eMmServicesTableLib.inf + SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/Spi= FlashCommonLibNull.inf StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint= /StandaloneMmDriverEntryPoint.inf =20 ##########################################################################= ######################### @@ -155,6 +156,7 @@ [Components] MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootMana= gerLib.inf =20 MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf + MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull= .inf =20 MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.inf --=20 2.28.0.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 (#71385): https://edk2.groups.io/g/devel/message/71385 Mute This Topic: https://groups.io/mt/80420930/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-