Skip to content

Commit 641bd54

Browse files
Phil Nohmergify[bot]
authored andcommitted
UefiCpuPkg/SmmCpuFeaturesLib: Add Standalone MM support for AMD family
Add the INF file of AmdStandaloneMmCpuFeaturesLib for AMD family, which supports building the SmmCpuFeaturesLib code for Standalone MM. It is based on the existing file, StandaloneMmCpuFeaturesLib.inf. Minimal code changes are also made to allow reuse of existing code for Standalone MM. Signed-off-by: Phil Noh <[email protected]>
1 parent 2ff1029 commit 641bd54

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## @file
2+
# Standalone MM CPU specific programming.
3+
#
4+
# Copyright (c) 2009 - 2023, Intel Corporation. All rights reserved.<BR>
5+
# Copyright (c) Microsoft Corporation.<BR>
6+
# Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.<BR>
7+
# SPDX-License-Identifier: BSD-2-Clause-Patent
8+
#
9+
##
10+
11+
[Defines]
12+
INF_VERSION = 0x00010005
13+
BASE_NAME = AmdStandaloneMmCpuFeaturesLib
14+
MODULE_UNI_FILE = SmmCpuFeaturesLib.uni
15+
FILE_GUID = 1CDE089F-6038-4C8A-96DF-6B6AE602FC84
16+
MODULE_TYPE = MM_STANDALONE
17+
VERSION_STRING = 1.0
18+
PI_SPECIFICATION_VERSION = 0x00010032
19+
LIBRARY_CLASS = SmmCpuFeaturesLib
20+
CONSTRUCTOR = StandaloneMmCpuFeaturesLibConstructor
21+
22+
[Sources]
23+
SmmCpuFeaturesLibCommon.c
24+
StandaloneMmCpuFeaturesLib.c
25+
AmdSmmCpuFeaturesLib.c
26+
CpuFeaturesLib.h
27+
28+
[Packages]
29+
MdePkg/MdePkg.dec
30+
UefiCpuPkg/UefiCpuPkg.dec
31+
32+
[LibraryClasses]
33+
BaseLib
34+
DebugLib
35+
MemoryAllocationLib
36+
PcdLib
37+
HobLib
38+
MmSaveStateLib
39+
40+
[Guids]
41+
gSmmBaseHobGuid ## CONSUMES
42+
43+
[FixedPcd]
44+
gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## SOMETIMES_CONSUMES
45+
46+
[FeaturePcd]
47+
gUefiCpuPkgTokenSpaceGuid.PcdSmrrEnable ## CONSUMES

UefiCpuPkg/UefiCpuPkg.dsc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# UefiCpuPkg Package
33
#
44
# Copyright (c) 2007 - 2024, Intel Corporation. All rights reserved.<BR>
5-
# Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.<BR>
5+
# Copyright (C) 2023 - 2025, Advanced Micro Devices, Inc. All rights reserved.<BR>
66
#
77
# SPDX-License-Identifier: BSD-2-Clause-Patent
88
#
@@ -212,6 +212,7 @@
212212
UefiCpuPkg/Library/AmdSysCallLibNull/AmdSysCallLibNull.inf
213213
UefiCpuPkg/Library/MmSaveStateLib/IntelMmSaveStateLib.inf
214214
UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.inf
215+
UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdStandaloneMmCpuFeaturesLib.inf
215216
UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.inf
216217
UefiCpuPkg/Library/SmmRelocationLib/AmdSmmRelocationLib.inf
217218

0 commit comments

Comments
 (0)