From: "Oram, Isaac W" <isaac.w.oram@intel.com>
To: devel@edk2.groups.io
Cc: Chasel Chiu <chasel.chiu@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Eric Dong <eric.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 10/11] MinPlatformPkg/SpiFvbService: Reduce duplicate code
Date: Fri, 15 Oct 2021 14:25:33 -0700 [thread overview]
Message-ID: <9db0b794a840f862b848c99167b83f2633200ed8.1634331939.git.isaac.w.oram@intel.com> (raw)
In-Reply-To: <cover.1634331939.git.isaac.w.oram@intel.com>
Consolidate all the entry point functions into SpiFvbServiceMm.c
This reduces the number of files and makes the code easier to understand.
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: Isaac Oram <isaac.w.oram@intel.com>
---
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c | 42 ++++++++++++++++++++
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf | 1 -
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c | 32 ---------------
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf | 1 -
Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c | 32 ---------------
5 files changed, 42 insertions(+), 66 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c
index 1d8d55b8f2..cc9310023e 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c
@@ -278,3 +278,45 @@ FvbInitialize (
return EFI_SUCCESS;
}
+
+/**
+ 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;
+}
+
+/**
+ 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/SpiFvbServiceSmm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
index 7b69bedcdc..600ad32d9f 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
@@ -55,7 +55,6 @@
SpiFvbServiceCommon.c
SpiFvbServiceMm.h
SpiFvbServiceMm.c
- SpiFvbServiceTraditionalMm.c
[Protocols]
gEfiDevicePathProtocolGuid ## PRODUCES
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c
deleted file mode 100644
index 252c818d65..0000000000
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/** @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/SpiFvbServiceStandaloneMm.inf b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
index 1dfb2520e7..4e056466a1 100644
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
+++ b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
@@ -54,7 +54,6 @@
SpiFvbServiceCommon.c
SpiFvbServiceMm.h
SpiFvbServiceMm.c
- SpiFvbServiceStandaloneMm.c
[Protocols]
gEfiDevicePathProtocolGuid ## PRODUCES
diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c
deleted file mode 100644
index 1c2dac70e3..0000000000
--- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalMm.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/** @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;
-}
--
2.27.0.windows.1
next prev parent reply other threads:[~2021-10-15 21:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 21:25 [edk2-devel][edk2-platforms][PATCH V1 00/11] Enable board customization of SMM FV reporting Oram, Isaac W
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 01/11] MinPlatformPkg/ReportFvLib: Add ReportMmFv to API Oram, Isaac W
2021-10-23 0:30 ` Nate DeSimone
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 02/11] CometlakeOpenBoardPkg/ReportFvLib: Switch to new library instances Oram, Isaac W
2021-10-23 0:31 ` Nate DeSimone
2021-10-23 1:32 ` Chaganty, Rangasai V
2021-10-25 19:32 ` Kathappan Esakkithevar
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 03/11] KabyOpenBoardPkg/ReportFvLib: " Oram, Isaac W
2021-10-23 0:31 ` Nate DeSimone
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 04/11] TigerLakeOpenBoardPkg/ReportFvLib: " Oram, Isaac W
2021-10-23 0:31 ` Nate DeSimone
2021-10-23 1:31 ` Chaganty, Rangasai V
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 05/11] WhiskeyLakeOpenBoardPkg/ReportFvLib: " Oram, Isaac W
2021-10-23 0:31 ` Nate DeSimone
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 06/11] WhitleyOpenBoardPkg/ReportFvLib: Add board support for custom MM FV Oram, Isaac W
2021-10-23 0:31 ` Nate DeSimone
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 07/11] PurleyOpenBoardPkg/ReportFvLib: Update ReportFvLib Oram, Isaac W
2021-10-23 0:31 ` Nate DeSimone
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 08/11] SimicsOpenBoardPkg/ReportFvLib: " Oram, Isaac W
2021-10-23 0:31 ` Nate DeSimone
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 09/11] MinPlatformPkg/SpifvbService: Publish FV based on board request Oram, Isaac W
2021-10-23 0:31 ` Nate DeSimone
2021-10-15 21:25 ` Oram, Isaac W [this message]
2021-10-23 0:32 ` [edk2-devel][edk2-platforms][PATCH V1 10/11] MinPlatformPkg/SpiFvbService: Reduce duplicate code Nate DeSimone
2021-10-15 21:25 ` [edk2-devel][edk2-platforms][PATCH V1 11/11] MinPlatformPkg/ReportFvLib: Remove obsolete PeiReportFvLib instance Oram, Isaac W
2021-10-23 0:32 ` Nate DeSimone
[not found] ` <16AE5156F40A3986.24927@groups.io>
2021-10-23 1:34 ` [edk2-devel][edk2-platforms][PATCH V1 08/11] SimicsOpenBoardPkg/ReportFvLib: Update ReportFvLib Chaganty, Rangasai V
[not found] ` <16AE515652C6739A.24927@groups.io>
2021-10-23 1:35 ` [edk2-devel][edk2-platforms][PATCH V1 05/11] WhiskeyLakeOpenBoardPkg/ReportFvLib: Switch to new library instances Chaganty, Rangasai V
[not found] ` <16AE51563C375254.13161@groups.io>
2021-10-23 1:36 ` [edk2-devel][edk2-platforms][PATCH V1 03/11] KabyOpenBoardPkg/ReportFvLib: " Chaganty, Rangasai V
[not found] ` <16AE5156E9B772C6.11150@groups.io>
2021-10-23 1:40 ` [edk2-devel][edk2-platforms][PATCH V1 11/11] MinPlatformPkg/ReportFvLib: Remove obsolete PeiReportFvLib instance Chaganty, Rangasai V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9db0b794a840f862b848c99167b83f2633200ed8.1634331939.git.isaac.w.oram@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox