From nobody Sun May 5 01:37:41 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+71622+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+71622+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1613076146; cv=none; d=zohomail.com; s=zohoarc; b=d6ZTJTosuhKuLiSynpv0IhSc9rb60Ly2zUZWO59QUBPSCj2HoxJqN2OptKYAfJibRY0lDUW9hEjJ/d3QPSYyRau6blNkK/7Gb7wAdoNvwyAmBm0OGT1xCDfdHCdPT7FU90vp2+i9mhrfHqpzgOB83p1y4DpuHmjvofzfFUCaXoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613076146; 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=zbmHSDojOeRPV0CeoLGbvbqAYWUrl8WusvI7NaY/iPg=; b=IX0rVUPqfQK8zV3dxMKqmzlC8OJGNbdYG6irSUP5EKU37q6bVVdOTWM68Adz+hY/nU5QN74+Lhynz2mCCVgwWUQ/MMlWjJMiurZkUM91xNs36m4/zHlFxneA89y9EAygISqPueEBJN57KWpN52uXgTBcJ3ei73MUqYLvQZ5Xqt4= 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+71622+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 161307614632815.23844068957203; Thu, 11 Feb 2021 12:42:26 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id B6qgYY1788612x1BMltAhSti; Thu, 11 Feb 2021 12:42:26 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web12.2256.1613075966419927049 for ; Thu, 11 Feb 2021 12:39:26 -0800 X-Received: from localhost.localdomain (unknown [131.107.174.202]) by linux.microsoft.com (Postfix) with ESMTPSA id 0E95D20B6C40; Thu, 11 Feb 2021 12:39:26 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0E95D20B6C40 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [edk2-platforms][PATCH v2 1/3] MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE Date: Thu, 11 Feb 2021 12:38:53 -0800 Message-Id: <20210211203855.1656-2-mikuback@linux.microsoft.com> In-Reply-To: <20210211203855.1656-1-mikuback@linux.microsoft.com> References: <20210211203855.1656-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: hgHXCRL9xdCXCTNypjNRXPIGx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613076146; bh=yPmQQxtCgIxkzYtA44PsmqDkBaROKV3wFfjjCeW2eBQ=; h=Cc:Date:From:Reply-To:Subject:To; b=nv6jPxBbTkFqMKh+aMfRjjdoNxLmRgF/QXILT5JQVgdvhTqU+B+yINlhjfnNNLJhoOJ AGNd7A/E34c1zE0vxE6AgGI8wQ2iNB5PDpZYrHOD12roCQlHjWMkriMAEMBekeXWASXXS cAQbinEzQcn9DE0euoku+AcCAEHiAMaHHaM= 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 (#71622): https://edk2.groups.io/g/devel/message/71622 Mute This Topic: https://groups.io/mt/80567992/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 Sun May 5 01:37:41 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+71623+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+71623+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1613076083; cv=none; d=zohomail.com; s=zohoarc; b=MxAT3ZnpQCMDz6xkb+F80q4u8BO1zAILbz3W7JEif84MXXIX9BV0OP9m3tPBkWzNkKtiwNsCFovzuGyLrIBiZcsoYM+0XKhC0zLC4XTRIeZUGPSxj7C2RcS533YsafkdqYaMtxCf44UNPUSj6jH3a2QTNNUOY7oxYQX6H7b+OHE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613076083; 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=1dJUZcs8d31KpKqRsaLZ+q1+/x7d8odI08q4lM4PMWY=; b=TvUDLJ3/nC2bLYhui6u1JqXrbOtfyy75wC34j+506l7No2zKJeUa40XNUCEHu1+bEiYKFqezRFTfoQoM7Bjgm7+jAz2Syeekwq7zNhKSpROK02iz9pbQZn6tG7KJPxHWhWcqluEfzJDg9fW4k6Z1kP4xiTJZ8asOIALrb1arxoo= 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+71623+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 1613076082822876.8241096973517; Thu, 11 Feb 2021 12:41:22 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id dvYnYY1788612xP6vgb4zrS6; Thu, 11 Feb 2021 12:41:22 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.2236.1613075970847323067 for ; Thu, 11 Feb 2021 12:39:30 -0800 X-Received: from localhost.localdomain (unknown [131.107.174.202]) by linux.microsoft.com (Postfix) with ESMTPSA id 834FB20B6C40; Thu, 11 Feb 2021 12:39:30 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 834FB20B6C40 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [edk2-platforms][PATCH v2 2/3] MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE libraries Date: Thu, 11 Feb 2021 12:38:54 -0800 Message-Id: <20210211203855.1656-3-mikuback@linux.microsoft.com> In-Reply-To: <20210211203855.1656-1-mikuback@linux.microsoft.com> References: <20210211203855.1656-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: G8wwaCsJnBGufcxCXhiUdf7mx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613076082; bh=Ove48VCywEUl8YwgKDmjhavSTK7kOL6v9YWZBFVSMQs=; h=Cc:Date:From:Reply-To:Subject:To; b=LH0PR/F8thNdHhveyQzdHZkWPEf4rqbKMMGrI0mncuodPojX+SF1JfL0jdjisFnSmcU AClxFg1H82JVLCZ6sXabSr6ZyR7t0VcI56N1bVbGem8SYQdg4wIOLTp2FpYfY8/Ikc/QZ uDo9M4/HnH3j1GVryvnvbeP3hOr5JayLaG8= 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 (#71623): https://edk2.groups.io/g/devel/message/71623 Mute This Topic: https://groups.io/mt/80567995/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 Sun May 5 01:37:41 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+71624+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+71624+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1613076082; cv=none; d=zohomail.com; s=zohoarc; b=Sz4So6ISlrZlplwPEFBHL/4qTLKuOnWR4i2384kFNHJHR5fuStOhfWGXfYwukY2hs2h8fq3H6GtDq/ILJpmZPrO8Gd2v/pHWDRWr34qmisFeUcZFHTT3REng+xHhJ5Wx5dnCg3R0P+23l4QqmM3WK0tKsOritIW1Mp3dhNqO2dQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613076082; 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=PfK3iMxT/DzMnkkYwAs0sKzeHem/wciBm0upxUZ6K6k=; b=Jm6vsHQsiNA2EbnGd10GLYe5HWDho7L1oTkg3HtHEHVGuAbrvA+uP18p1fToWeg00oQzkZ+npsmyRE8cdvRfQkMYW7xxUNeZfQhmDSUMKeKoulHVFDrvdPvzCWvYpwQxGauKtLBKqZgAMC3MlaGOKPokpP4Zp177RABB5KOOzbI= 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+71624+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 1613076082577780.0899573360118; Thu, 11 Feb 2021 12:41:22 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id NuSvYY1788612xmx4Eox8pj4; Thu, 11 Feb 2021 12:41:21 -0800 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web09.2242.1613075975125543034 for ; Thu, 11 Feb 2021 12:39:35 -0800 X-Received: from localhost.localdomain (unknown [131.107.174.202]) by linux.microsoft.com (Postfix) with ESMTPSA id D4DD520B6C40; Thu, 11 Feb 2021 12:39:34 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D4DD520B6C40 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [edk2-platforms][PATCH v2 3/3] MinPlatformPkg/SpiFvbService: Add Standalone MM support Date: Thu, 11 Feb 2021 12:38:55 -0800 Message-Id: <20210211203855.1656-4-mikuback@linux.microsoft.com> In-Reply-To: <20210211203855.1656-1-mikuback@linux.microsoft.com> References: <20210211203855.1656-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: s37pindDFXWruSr0Tr4cFIk9x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613076081; bh=y4BzN3oaArB7/rmV4VCEyaE/FqhIJ1sN404syLt1QdY=; h=Cc:Date:From:Reply-To:Subject:To; b=uarvUAs+dg0a0zN50vpJm5wRoHLLcOTsk/WGBHH68XaP5et3TUjLoD4hfVPLfLG8aIs GTH4yA3TXhOjgcbkR3qsKcRaGlcR1lvvP5qS07mQoGMXTz1GkswjTSvLvpmSpaqPmDhoX xJKCkHHEXrOPrhkmlZZy0F76b2SmkVsfgZA= 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 Reviewed-by: Nate DeSimone --- 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} | 35 ++++++----------- 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, 130 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..016f19587c91 100644 --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Smm/SpiFvbServiceSm= m.c +++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c @@ -1,14 +1,16 @@ /** @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) 2017, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 #include "SpiFvbServiceCommon.h" -#include +#include +#include #include =20 /** @@ -74,7 +76,7 @@ InstallFvbProtocol ( // FvbHandle =3D NULL; =20 - Status =3D gSmst->SmmInstallProtocolInterface ( + Status =3D gMmst->MmInstallProtocolInterface ( &FvbHandle, &gEfiSmmFirmwareVolumeBlockProtocolGuid, EFI_NATIVE_INTERFACE, @@ -82,7 +84,7 @@ InstallFvbProtocol ( ); ASSERT_EFI_ERROR (Status); =20 - Status =3D gSmst->SmmInstallProtocolInterface ( + Status =3D gMmst->MmInstallProtocolInterface ( &FvbHandle, &gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE, @@ -92,22 +94,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 +212,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 +268,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 (#71624): https://edk2.groups.io/g/devel/message/71624 Mute This Topic: https://groups.io/mt/80567998/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-