Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IpmiFeaturePkg/SmmIpmiBaseLib: Support Standalone MM. #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
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;
Expand All @@ -37,7 +36,7 @@ NotifyIpmiTransportCallback (
EFI_STATUS Status;
Status = EFI_SUCCESS;
if (mIpmiTransport == NULL) {
Status = gSmst->SmmLocateProtocol (
Status = gMmst->MmLocateProtocol (
&gSmmIpmiTransportProtocolGuid,
NULL,
(VOID **) &mIpmiTransport
Expand All @@ -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
);
}
Expand Down Expand Up @@ -127,7 +126,7 @@ Routine Description:
{
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;
Expand Down Expand Up @@ -164,7 +163,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

[sources]
SmmIpmiBaseLib.c
Expand All @@ -21,9 +21,8 @@
IpmiFeaturePkg/IpmiFeaturePkg.dec

[LibraryClasses]
UefiBootServicesTableLib
DebugLib
SmmServicesTableLib
MmServicesTableLib

[Protocols]
gSmmIpmiTransportProtocolGuid