* [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm
@ 2021-02-11 20:38 Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 1/3] MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE Michael Kubacki
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Michael Kubacki @ 2021-02-11 20:38 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
From: Michael Kubacki <michael.kubacki@microsoft.com>
Adds a new component called SpiFvbServiceStandaloneMm that serves
as a Standalone MM compatible SPI FVB service driver.
Note that a MM_STANDALONE version of SpiFlashCommonLib is being
prepared to be sent but for the time being the module can be added
to the MinPlatformPkg build and rely upon a NULL instance in the
build.
V2 changes:
1. Add Intel copyright to SpiFvbServiceMm.c
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Michael Kubacki (3):
MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE
MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE libraries
MinPlatformPkg/SpiFvbService: Add Standalone MM support
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/FvbInfo.c | 0
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/SpiFvbServiceCommon.c | 0
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Smm/SpiFvbServiceSmm.c => SpiFvbServiceMm.c} | 35 ++++++-----------
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c | 32 ++++++++++++++++
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c | 32 ++++++++++++++++
Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf | 4 +-
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/SpiFvbServiceCommon.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 => SpiFvbServiceStandaloneMm.inf} | 40 ++++++++++----------
Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 9 +++++
11 files changed, 139 insertions(+), 56 deletions(-)
rename Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/FvbInfo.c (100%)
rename Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/SpiFvbServiceCommon.c (100%)
rename Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Smm/SpiFvbServiceSmm.c => SpiFvbServiceMm.c} (89%)
create mode 100644 Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c
create mode 100644 Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c
rename Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/SpiFvbServiceCommon.h (94%)
create mode 100644 Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.h
copy Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{SpiFvbServiceSmm.inf => SpiFvbServiceStandaloneMm.inf} (64%)
--
2.28.0.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [edk2-platforms][PATCH v2 1/3] MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE
2021-02-11 20:38 [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Michael Kubacki
@ 2021-02-11 20:38 ` Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 2/3] MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE libraries Michael Kubacki
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michael Kubacki @ 2021-02-11 20:38 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
From: Michael Kubacki <michael.kubacki@microsoft.com>
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 <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf b/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf
index d4964681de3d..75ef1cb921df 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf
+++ b/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf
@@ -12,8 +12,8 @@ [Defines]
BASE_NAME = SpiFlashCommonLibNull
FILE_GUID = F35BBEE7-A681-443E-BB15-07AF9FABBDED
VERSION_STRING = 1.0
- MODULE_TYPE = DXE_SMM_DRIVER
- LIBRARY_CLASS = SpiFlashCommonLib|DXE_SMM_DRIVER
+ MODULE_TYPE = BASE
+ LIBRARY_CLASS = SpiFlashCommonLib
#
# The following information is for reference only and not required by the build tools.
#
--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [edk2-platforms][PATCH v2 2/3] MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE libraries
2021-02-11 20:38 [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 1/3] MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE Michael Kubacki
@ 2021-02-11 20:38 ` Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 3/3] MinPlatformPkg/SpiFvbService: Add Standalone MM support Michael Kubacki
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michael Kubacki @ 2021-02-11 20:38 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
From: Michael Kubacki <michael.kubacki@microsoft.com>
Adds a fundamental set of library instances that are needed to build
MM_STANDALONE modules.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/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.<BR>
+# Copyright (c) Microsoft Corporation.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -112,6 +113,12 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.inf
TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointLib.inf
+[LibraryClasses.common.MM_STANDALONE]
+ DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+ MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf
+ MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf
+ StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf
+
###################################################################################################
#
# Components Section - list of the modules and components that will be processed by compilation
--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [edk2-platforms][PATCH v2 3/3] MinPlatformPkg/SpiFvbService: Add Standalone MM support
2021-02-11 20:38 [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 1/3] MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 2/3] MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE libraries Michael Kubacki
@ 2021-02-11 20:38 ` Michael Kubacki
2021-02-12 22:32 ` [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Nate DeSimone
2021-02-12 22:44 ` Nate DeSimone
4 siblings, 0 replies; 6+ messages in thread
From: Michael Kubacki @ 2021-02-11 20:38 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
From: Michael Kubacki <michael.kubacki@microsoft.com>
Adds support for MM_STANDALONE. Retains the directory path to the
SMM INF instance for backward compatibility with existing platforms.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/FvbInfo.c | 0
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/SpiFvbServiceCommon.c | 0
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Smm/SpiFvbServiceSmm.c => SpiFvbServiceMm.c} | 35 ++++++-----------
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c | 32 ++++++++++++++++
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c | 32 ++++++++++++++++
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common => }/SpiFvbServiceCommon.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 => 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/FvbInfo.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c
similarity index 100%
rename from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/FvbInfo.c
rename to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFvbServiceCommon.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.c
similarity index 100%
rename from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFvbServiceCommon.c
rename to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.c
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Smm/SpiFvbServiceSmm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c
similarity index 89%
rename from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Smm/SpiFvbServiceSmm.c
rename to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c
index 251fcae30b90..016f19587c91 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Smm/SpiFvbServiceSmm.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 Compatibility Specification.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
+ Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) Microsoft Corporation.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include "SpiFvbServiceCommon.h"
-#include <Library/SmmServicesTableLib.h>
+#include <Library/MmServicesTableLib.h>
+#include <Library/UefiDriverEntryPoint.h>
#include <Protocol/SmmFirmwareVolumeBlock.h>
/**
@@ -74,7 +76,7 @@ InstallFvbProtocol (
//
FvbHandle = NULL;
- Status = gSmst->SmmInstallProtocolInterface (
+ Status = gMmst->MmInstallProtocolInterface (
&FvbHandle,
&gEfiSmmFirmwareVolumeBlockProtocolGuid,
EFI_NATIVE_INTERFACE,
@@ -82,7 +84,7 @@ InstallFvbProtocol (
);
ASSERT_EFI_ERROR (Status);
- Status = gSmst->SmmInstallProtocolInterface (
+ Status = gMmst->MmInstallProtocolInterface (
&FvbHandle,
&gEfiDevicePathProtocolGuid,
EFI_NATIVE_INTERFACE,
@@ -92,22 +94,13 @@ InstallFvbProtocol (
}
/**
-
The function does the necessary initialization work for
Firmware Volume Block Driver.
- @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 = (EFI_FVB_INSTANCE *) AllocateRuntimeZeroPool (BufferSize);
if (mFvbModuleGlobal.FvbInstance == NULL) {
ASSERT (FALSE);
- Status = EFI_OUT_OF_RESOURCES;
- goto ERROR;
+ return;
}
MaxLbaSize = 0;
@@ -276,9 +268,4 @@ FvbInitialize (
}
}
-
- return EFI_SUCCESS;
-
-ERROR:
- return Status;
}
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c
new file mode 100644
index 000000000000..252c818d6551
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c
@@ -0,0 +1,32 @@
+/** @file
+ MM driver source for several Serial Flash devices
+ which are compliant with the Intel(R) Serial Flash Interface Compatibility Specification.
+
+ Copyright (c) Microsoft Corporation.<BR>
+ 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/SpiFvbServiceTraditionalMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c
new file mode 100644
index 000000000000..1c2dac70e3c6
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c
@@ -0,0 +1,32 @@
+/** @file
+ MM driver source for several Serial Flash devices
+ which are compliant with the Intel(R) Serial Flash Interface Compatibility Specification.
+
+ Copyright (c) Microsoft Corporation.<BR>
+ 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/SpiFvbServiceCommon.h b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.h
similarity index 94%
rename from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFvbServiceCommon.h
rename to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.h
index 6379fc86d52e..e9d69e985814 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/Common/SpiFvbServiceCommon.h
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.h
@@ -15,9 +15,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Protocol/DevicePath.h>
#include <Protocol/FirmwareVolumeBlock.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
@@ -159,4 +156,3 @@ extern FV_INFO mPlatformFvBaseAddress[];
extern FV_INFO mPlatformDefaultBaseAddress[];
#endif
-
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.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.<BR>
+ 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/SpiFvbServiceSmm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.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.<BR>
+# Copyright (c) Microsoft Corporation.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -14,7 +15,8 @@ [Defines]
VERSION_STRING = 1.0
MODULE_TYPE = DXE_SMM_DRIVER
PI_SPECIFICATION_VERSION = 1.10
- ENTRY_POINT = FvbInitialize
+ ENTRY_POINT = 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
[Packages]
MdePkg/MdePkg.dec
@@ -48,10 +49,12 @@ [Pcd]
gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUMES
[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
[Protocols]
gEfiDevicePathProtocolGuid ## PRODUCES
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
similarity index 64%
copy from Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
copy to Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
index d59c499b2e9e..9f08d3673f41 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.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 driver.
#
# Copyright (c) 2017-2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) Microsoft Corporation.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
###
[Defines]
- INF_VERSION = 0x00010017
- BASE_NAME = SpiFvbServiceSmm
- FILE_GUID = 68A10D85-6858-4402-B070-028B3EA21747
+ INF_VERSION = 0x0001001B
+ BASE_NAME = SpiFvbServiceStandaloneMm
+ FILE_GUID = E6313655-8BD0-4EAB-B319-AD5E212CE6AB
VERSION_STRING = 1.0
- MODULE_TYPE = DXE_SMM_DRIVER
- PI_SPECIFICATION_VERSION = 1.10
- ENTRY_POINT = FvbInitialize
+ MODULE_TYPE = MM_STANDALONE
+ PI_SPECIFICATION_VERSION = 0x00010032
+ ENTRY_POINT = SpiFvbStandaloneMmInitialize
+
#
# The following information is for reference only and not required by the build tools.
#
@@ -22,17 +24,15 @@ [Defines]
#
[LibraryClasses]
- PcdLib
- MemoryAllocationLib
- CacheMaintenanceLib
+ BaseLib
BaseMemoryLib
+ CacheMaintenanceLib
DebugLib
- BaseLib
- UefiLib
- UefiBootServicesTableLib
- UefiDriverEntryPoint
+ MemoryAllocationLib
+ PcdLib
+ MmServicesTableLib
SpiFlashCommonLib
- SmmServicesTableLib
+ StandaloneMmDriverEntryPoint
[Packages]
MdePkg/MdePkg.dec
@@ -48,10 +48,12 @@ [Pcd]
gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize ## CONSUMES
[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
[Protocols]
gEfiDevicePathProtocolGuid ## PRODUCES
diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/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/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf
MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf
+ SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf
StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf
###################################################################################################
@@ -155,6 +156,7 @@ [Components]
MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
+ MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashCommonLibNull.inf
MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.inf
--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm
2021-02-11 20:38 [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Michael Kubacki
` (2 preceding siblings ...)
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 3/3] MinPlatformPkg/SpiFvbService: Add Standalone MM support Michael Kubacki
@ 2021-02-12 22:32 ` Nate DeSimone
2021-02-12 22:44 ` Nate DeSimone
4 siblings, 0 replies; 6+ messages in thread
From: Nate DeSimone @ 2021-02-12 22:32 UTC (permalink / raw)
To: mikuback@linux.microsoft.com, devel@edk2.groups.io
Cc: Chiu, Chasel, Liming Gao, Dong, Eric
For the series...
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> -----Original Message-----
> From: mikuback@linux.microsoft.com <mikuback@linux.microsoft.com>
> Sent: Thursday, February 11, 2021 12:39 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
> Subject: [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add
> SpiFvbServiceStandaloneMm
>
> From: Michael Kubacki <michael.kubacki@microsoft.com>
>
> Adds a new component called SpiFvbServiceStandaloneMm that serves as a
> Standalone MM compatible SPI FVB service driver.
>
> Note that a MM_STANDALONE version of SpiFlashCommonLib is being
> prepared to be sent but for the time being the module can be added to the
> MinPlatformPkg build and rely upon a NULL instance in the build.
>
> V2 changes:
> 1. Add Intel copyright to SpiFvbServiceMm.c
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
>
> Michael Kubacki (3):
> MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE
> MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE
> libraries
> MinPlatformPkg/SpiFvbService: Add Standalone MM support
>
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/FvbInfo.c | 0
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/SpiFvbServiceCommon.c | 0
>
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Smm/SpiFvbServiceSm
> m.c => SpiFvbServiceMm.c} | 35 ++++++-----------
>
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandalon
> eMm.c | 32 ++++++++++++++++
>
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditiona
> lMm.c | 32 ++++++++++++++++
>
> Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFla
> shCommonLibNull.inf | 4 +-
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/SpiFvbServiceCommon.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
> => SpiFvbServiceStandaloneMm.inf} | 40 ++++++++++----------
> Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> | 9 +++++
> 11 files changed, 139 insertions(+), 56 deletions(-) rename
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/FvbInfo.c (100%) rename
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/SpiFvbServiceCommon.c (100%) rename
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Smm/SpiFvbServiceSm
> m.c => SpiFvbServiceMm.c} (89%) create mode 100644
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandalon
> eMm.c
> create mode 100644
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditiona
> lMm.c
> rename Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/SpiFvbServiceCommon.h (94%) create mode 100644
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.h
> copy
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{SpiFvbServiceSmm.inf
> => SpiFvbServiceStandaloneMm.inf} (64%)
>
> --
> 2.28.0.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm
2021-02-11 20:38 [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Michael Kubacki
` (3 preceding siblings ...)
2021-02-12 22:32 ` [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Nate DeSimone
@ 2021-02-12 22:44 ` Nate DeSimone
4 siblings, 0 replies; 6+ messages in thread
From: Nate DeSimone @ 2021-02-12 22:44 UTC (permalink / raw)
To: mikuback@linux.microsoft.com, devel@edk2.groups.io
Cc: Chiu, Chasel, Liming Gao, Dong, Eric
The series has been pushed as 32cdbf3~..f62887c
Thanks,
Nate
> -----Original Message-----
> From: mikuback@linux.microsoft.com <mikuback@linux.microsoft.com>
> Sent: Thursday, February 11, 2021 12:39 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
> Subject: [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add
> SpiFvbServiceStandaloneMm
>
> From: Michael Kubacki <michael.kubacki@microsoft.com>
>
> Adds a new component called SpiFvbServiceStandaloneMm that serves as a
> Standalone MM compatible SPI FVB service driver.
>
> Note that a MM_STANDALONE version of SpiFlashCommonLib is being
> prepared to be sent but for the time being the module can be added to the
> MinPlatformPkg build and rely upon a NULL instance in the build.
>
> V2 changes:
> 1. Add Intel copyright to SpiFvbServiceMm.c
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
>
> Michael Kubacki (3):
> MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE
> MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE
> libraries
> MinPlatformPkg/SpiFvbService: Add Standalone MM support
>
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/FvbInfo.c | 0
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/SpiFvbServiceCommon.c | 0
>
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Smm/SpiFvbServiceSm
> m.c => SpiFvbServiceMm.c} | 35 ++++++-----------
>
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandalon
> eMm.c | 32 ++++++++++++++++
>
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditiona
> lMm.c | 32 ++++++++++++++++
>
> Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFla
> shCommonLibNull.inf | 4 +-
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/SpiFvbServiceCommon.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
> => SpiFvbServiceStandaloneMm.inf} | 40 ++++++++++----------
> Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> | 9 +++++
> 11 files changed, 139 insertions(+), 56 deletions(-) rename
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/FvbInfo.c (100%) rename
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/SpiFvbServiceCommon.c (100%) rename
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Smm/SpiFvbServiceSm
> m.c => SpiFvbServiceMm.c} (89%) create mode 100644
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandalon
> eMm.c
> create mode 100644
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditiona
> lMm.c
> rename Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{Common =>
> }/SpiFvbServiceCommon.h (94%) create mode 100644
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.h
> copy
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/{SpiFvbServiceSmm.inf
> => SpiFvbServiceStandaloneMm.inf} (64%)
>
> --
> 2.28.0.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-02-12 22:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-11 20:38 [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 1/3] MinPlatformPkg/SpiFlashCommonLibNull: Make MODULE_TYPE BASE Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 2/3] MinPlatformPkg/MinPlatformPkg.dsc: Add basic MM_STANDALONE libraries Michael Kubacki
2021-02-11 20:38 ` [edk2-platforms][PATCH v2 3/3] MinPlatformPkg/SpiFvbService: Add Standalone MM support Michael Kubacki
2021-02-12 22:32 ` [edk2-platforms][PATCH v2 0/3] MinPlatformPkg: Add SpiFvbServiceStandaloneMm Nate DeSimone
2021-02-12 22:44 ` Nate DeSimone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox