From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "Xu, Wei6" <wei6.xu@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Abner Chang <Abner.Chang@amd.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH v2 edk2-platforms 1/1] IpmiFeaturePkg/SmmIpmiBaseLib: Support Standalone MM.
Date: Thu, 30 Nov 2023 00:46:54 +0000 [thread overview]
Message-ID: <MW4PR11MB582122443EACE45C8300B9ABCD82A@MW4PR11MB5821.namprd11.prod.outlook.com> (raw)
In-Reply-To: <8594af88f257a5274215a8a31734c1097c4a8570.1699196971.git.wei6.xu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Xu, Wei6 <wei6.xu@intel.com>
Sent: Sunday, November 5, 2023 7:19 AM
To: devel@edk2.groups.io
Cc: Xu, Wei6 <wei6.xu@intel.com>; Abner Chang <Abner.Chang@amd.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [PATCH v2 edk2-platforms 1/1] IpmiFeaturePkg/SmmIpmiBaseLib: Support Standalone MM.
Add MM_STANDALONE type support for SmmIpmiBaseLib instance. Replace Smst with Mmst. Remove unused UefiBootServicesTableLib reference.
Cc: Abner Chang <Abner.Chang@amd.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
---
.../Library/SmmIpmiBaseLib/SmmIpmiBaseLib.c | 39 +++++--------------
.../Library/SmmIpmiBaseLib/SmmIpmiBaseLib.inf | 7 ++--
2 files changed, 12 insertions(+), 34 deletions(-)
diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBaseLib/SmmIpmiBaseLib.c b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBaseLib/SmmIpmiBaseLib.c
index 6282adc269f8..d05798d94866 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBaseLib/SmmIpmiBaseLib.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiB
+++ aseLib/SmmIpmiBaseLib.c
@@ -2,15 +2,14 @@
A Library to support all BMC access via IPMI command during SMM Phase.
@copyright
- Copyright 1999 - 2021 Intel Corporation. <BR>
+ Copyright 1999 - 2023 Intel Corporation. <BR>
SPDX-License-Identifier: BSD-2-Clause-Patent **/
-#include <PiDxe.h>
+#include <PiMm.h>
#include <Protocol/IpmiTransportProtocol.h>
#include <Library/IpmiBaseLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/SmmServicesTableLib.h>
+#include <Library/MmServicesTableLib.h>
#include <Library/DebugLib.h>
STATIC IPMI_TRANSPORT *mIpmiTransport = NULL;
@@ -37,7 +36,7 @@ NotifyIpmiTransportCallback (
EFI_STATUS Status;
Status = EFI_SUCCESS;
if (mIpmiTransport == NULL) {
- Status = gSmst->SmmLocateProtocol (
+ Status = gMmst->MmLocateProtocol (
&gSmmIpmiTransportProtocolGuid,
NULL,
(VOID **) &mIpmiTransport @@ -60,15 +59,15 @@ InitializeIpmiBase ( {
EFI_STATUS Status;
if (mIpmiTransport == NULL) {
- Status = gSmst->SmmLocateProtocol (
+ Status = gMmst->MmLocateProtocol (
&gSmmIpmiTransportProtocolGuid,
NULL,
(VOID **) &mIpmiTransport
);
if (EFI_ERROR (Status)) {
- Status = gSmst->SmmRegisterProtocolNotify (
+ Status = gMmst->MmRegisterProtocolNotify (
&gSmmIpmiTransportProtocolGuid,
- (EFI_SMM_NOTIFY_FN) NotifyIpmiTransportCallback,
+ (EFI_MM_NOTIFY_FN) NotifyIpmiTransportCallback,
&mEfiIpmiProtocolNotifyReg
);
}
@@ -104,30 +103,10 @@ IpmiSubmitCommand (
OUT UINT8 *ResponseData,
IN OUT UINT32 *ResponseDataSize
)
-/*++
-
-Routine Description:
-
- Routine to send commands to BMC
-
-Arguments:
-
- NetFunction - Net function of the command
- Command - IPMI Command
- CommandData - Command Data
- CommandDataSize - Size of CommandData
- ResponseData - Response Data
- ResponseDataSize - Response Data Size
-
-Returns:
-
- EFI_NOT_AVAILABLE_YET - IpmiTransport Protocol is not installed yet
-
---*/
{
EFI_STATUS Status;
- Status = gSmst->SmmLocateProtocol (&gSmmIpmiTransportProtocolGuid, NULL, (VOID **) &mIpmiTransport);
+ Status = gMmst->MmLocateProtocol (&gSmmIpmiTransportProtocolGuid,
+ NULL, (VOID **) &mIpmiTransport);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
@@ -164,7 +143,7 @@ GetBmcStatus (
{
EFI_STATUS Status;
- Status = gSmst->SmmLocateProtocol (&gSmmIpmiTransportProtocolGuid, NULL, (VOID **) &mIpmiTransport);
+ Status = gMmst->MmLocateProtocol (&gSmmIpmiTransportProtocolGuid,
+ NULL, (VOID **) &mIpmiTransport);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBaseLib/SmmIpmiBaseLib.inf b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBaseLib/SmmIpmiBaseLib.inf
index 7ea688fc165f..df43c81e6493 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiBaseLib/SmmIpmiBaseLib.inf
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiB
+++ aseLib/SmmIpmiBaseLib.inf
@@ -1,7 +1,7 @@
## @file
#
# @copyright
-# Copyright 2010 - 2021 Intel Corporation. <BR>
+# Copyright 2010 - 2023 Intel Corporation. <BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent ##
@@ -11,7 +11,7 @@
FILE_GUID = 2B5AD78E-5CF8-45d2-B2AC-749A09425911
MODULE_TYPE = DXE_SMM_DRIVER
VERSION_STRING = 1.0
- LIBRARY_CLASS = IpmiBaseLib|DXE_SMM_DRIVER SMM_CORE
+ LIBRARY_CLASS = IpmiBaseLib|DXE_SMM_DRIVER SMM_CORE MM_STANDALONE MM_CORE_STANDALONE
[sources]
SmmIpmiBaseLib.c
@@ -21,9 +21,8 @@
IpmiFeaturePkg/IpmiFeaturePkg.dec
[LibraryClasses]
- UefiBootServicesTableLib
DebugLib
- SmmServicesTableLib
+ MmServicesTableLib
[Protocols]
gSmmIpmiTransportProtocolGuid
--
2.29.2.windows.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111867): https://edk2.groups.io/g/devel/message/111867
Mute This Topic: https://groups.io/mt/102402215/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-11-30 0:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-05 15:18 [edk2-devel] [PATCH v2 edk2-platforms 0/1] Add Standalone MM support for SmmIpmiBaseLib Xu, Wei6
2023-11-05 15:18 ` [edk2-devel] [PATCH v2 edk2-platforms 1/1] IpmiFeaturePkg/SmmIpmiBaseLib: Support Standalone MM Xu, Wei6
2023-11-30 0:46 ` Nate DeSimone [this message]
2023-11-30 0:54 ` Nate DeSimone
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=MW4PR11MB582122443EACE45C8300B9ABCD82A@MW4PR11MB5821.namprd11.prod.outlook.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