Skip to content

Commit

Permalink
StandaloneMmPkg: StandaloneMmServicesTableLibCore: Introduce core ins…
Browse files Browse the repository at this point in the history
…tance

This change added the long vacant `MmServicesTableLib` for MM core instance.

The implementation will use extern to link the gMmst to the global MM table,
so that the libraries can use gMmst more generically.

Signed-off-by: Kun Qin <kuqin@microsoft.com>
  • Loading branch information
kuqin12 committed Jan 23, 2024
1 parent 57e8694 commit 03d53bb
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @file
MM Services Table Library.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#include <PiMm.h>
#include <Library/MmServicesTableLib.h>
#include <Library/DebugLib.h>

extern EFI_MM_SYSTEM_TABLE gMmCoreMmst;

EFI_MM_SYSTEM_TABLE *gMmst = &gMmCoreMmst;
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## @file
# Standalone MM Services Table Library.
#
# Copyright (c) Microsoft Corporation.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#
##

[Defines]
INF_VERSION = 0x0001001B
BASE_NAME = StandaloneMmServicesTableLibCore
FILE_GUID = A9E61A64-FDD4-4162-9321-C6769FB96E3B
MODULE_TYPE = MM_CORE_STANDALONE
VERSION_STRING = 1.0
LIBRARY_CLASS = MmServicesTableLib|MM_CORE_STANDALONE
PI_SPECIFICATION_VERSION = 0x00010032

#
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
#

[Sources]
StandaloneMmServicesTableLibCore.c

[Packages]
MdePkg/MdePkg.dec
3 changes: 3 additions & 0 deletions StandaloneMmPkg/StandaloneMmPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@

[LibraryClasses.common.MM_CORE_STANDALONE]
HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf
# MU_CHANGE: Added core instance of MmServicesTableLib
MmServicesTableLib|StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLibCore.inf

[LibraryClasses.common.MM_STANDALONE]
MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf
Expand Down Expand Up @@ -145,6 +147,7 @@

# MU_CHANGE [BEGIN]
StandaloneMmPkg/Library/StandaloneMmCoreEntryPointNull/StandaloneMmCoreEntryPointNull.inf
StandaloneMmPkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLibCore.inf

[Components.X64]
StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
Expand Down

0 comments on commit 03d53bb

Please sign in to comment.