From: "Abdul Lateef Attar via groups.io" <AbdulLateef.Attar=amd.com@groups.io>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"radio-fan@mail.ru" <radio-fan@mail.ru>
Subject: Re: [edk2-devel] Error in UefiPayloadPkg building with SMM_SUPPORT
Date: Wed, 29 Jan 2025 02:38:23 +0000 [thread overview]
Message-ID: <IA1PR12MB64584B49AF3E4C09E91A0E2AE0EE2@IA1PR12MB6458.namprd12.prod.outlook.com> (raw)
In-Reply-To: <mOd4.1738039276998350003.k6xW@groups.io>
[-- Attachment #1: Type: text/plain, Size: 5425 bytes --]
[AMD Official Use Only - AMD Internal Distribution Only]
Hi,
You need to define MmSaveStateLib library in the UefiPayloadPkg.dsc
Something like below
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf {
<LibraryClasses>
MmSaveStateLib|UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveStateLib.inf
}
Or as below, if you want to include Intel’s implementation
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf {
<LibraryClasses>
MmSaveStateLib|UefiCpuPkg/Library/MmSaveStateLib/IntelMmSaveStateLib.inf
}
Thanks
AbduL
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Stepan via groups.io
Sent: Tuesday, January 28, 2025 10:11 AM
To: devel@edk2.groups.io
Subject: [edk2-devel] Error in UefiPayloadPkg building with SMM_SUPPORT
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Hello EDK II community,
Our team is new to uefi development. We are gradually exploring the EDK II project. We have already successfully built default UEFI pauload (UefiPayloadPkg) for SBL. We are currently trying to add support for saving variables to NVRAM (ARIABLE_SUPPORT = SPI). It also requires enabling SMM and UNIVERSAL_PAYLOAD support. `The building by build -a IA32 -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b DEBUG -t GCC5 -D BOOTLOADER=SBL` fails with the following message (full log is available in attachments):
Build environment: Linux-6.8.0-51-generic-x86_64-with-glibc2.35
Build start time: 13:55:06, Jan.20 2025
WORKSPACE = /home/user/edk2
EDK_TOOLS_PATH = /home/user/edk2/BaseTools
CONF_PATH = /home/user/edk2/Conf
PYTHON_COMMAND = python3
Processing meta-data .
Architecture(s) = IA32 X64
Build target = DEBUG
Toolchain = GCC5
Active Platform = /home/user/edk2/UefiPayloadPkg/UefiPayloadPkg.dsc
build.py...
/home/user/edk2/UefiPayloadPkg/UefiPayloadPkg.dsc(...): error 4000: Instance of library class [MmSaveStateLib] is not found
in [/home/user/edk2/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf] [X64]
consumed by module [/home/user/edk2/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf]
- Failed -
Build end time: 11:55:19, Jan.20 2025
Build total time: 00:00:01
It seems that some kind of dependency is not included to this configuration.
PiSmmCpuDxeSmm.inf is a part of UefiCpuPkg.dsc which has necessary inclusion:
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf {
<Defines>
FILE_GUID = B7242C74-BD21-49EE-84B4-07162E8C080D
<LibraryClasses>
SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.inf
MmSaveStateLib|UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveStateLib.inf
}
We are use 0f3867fa6ef0553e26c42f7d71ff6bdb98429742 (edk2-stable202411) and 1301e0b47eb3b4212da384a34f23b68edaf1911e commits.
Full changes:
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 9ff326a6cb..3af7be4a87 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -22,16 +22,16 @@
SUPPORTED_ARCHITECTURES = IA32|X64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
- OUTPUT_DIRECTORY = Build/UefiPayloadPkg$(BUILD_ARCH)
+ OUTPUT_DIRECTORY = Build/UefiPayloadPkg
FLASH_DEFINITION = UefiPayloadPkg/UefiPayloadPkg.fdf
PCD_DYNAMIC_AS_DYNAMICEX = TRUE
DEFINE SOURCE_DEBUG_ENABLE = FALSE
- DEFINE PS2_KEYBOARD_ENABLE = FALSE
+ DEFINE PS2_KEYBOARD_ENABLE = TRUE
DEFINE RAM_DISK_ENABLE = FALSE
- DEFINE SIO_BUS_ENABLE = FALSE
+ DEFINE SIO_BUS_ENABLE = TRUE
DEFINE SECURITY_STUB_ENABLE = TRUE
- DEFINE SMM_SUPPORT = FALSE
+ DEFINE SMM_SUPPORT = TRUE
DEFINE PLATFORM_BOOT_TIMEOUT = 3
DEFINE BOOT_MANAGER_ESCAPE = FALSE
DEFINE ATA_ENABLE = TRUE
@@ -56,7 +56,7 @@
# ELF: Build UniversalPayload file as UniversalPayload.elf
# FIT: Build UniversalPayload file as UniversalPayload.fit
#
- DEFINE UNIVERSAL_PAYLOAD = FALSE
+ DEFINE UNIVERSAL_PAYLOAD = TRUE
DEFINE UNIVERSAL_PAYLOAD_FORMAT = ELF
#
@@ -126,7 +126,8 @@
# SPI: UEFI payload with SPI NV variable support
# NONE: UEFI payload with no variable modules
#
- DEFINE VARIABLE_SUPPORT = EMU
+ DEFINE VARIABLE_SUPPORT = SPI
+# DEFINE VARIABLE_SUPPORT = EMU
DEFINE DISABLE_RESET_SYSTEM = FALSE
DEFINE NETWORK_DRIVER_ENABLE = FALSE
--
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121061): https://edk2.groups.io/g/devel/message/121061
Mute This Topic: https://groups.io/mt/110868214/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 24844 bytes --]
prev parent reply other threads:[~2025-01-29 2:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 4:41 [edk2-devel] Error in UefiPayloadPkg building with SMM_SUPPORT Stepan via groups.io
2025-01-29 2:38 ` Abdul Lateef Attar via groups.io [this message]
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=IA1PR12MB64584B49AF3E4C09E91A0E2AE0EE2@IA1PR12MB6458.namprd12.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