As part of this PR [#3187],
MM_STANDALONE drivers should now map DevicePathLib to
UefiDevicePathLibBase.inf instead of UefiDevicePathLibStandaloneMm.inf,
as latter is being deprecated.
Cc: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Gowtham M <gowthamm@ami.com>
Map the feature control MSR config from the OVMF platform info HOB to
FIRST_SMI_HANDLER_CONTEXT.
(Note that CpuHotplugSmm already consumes -- indirectly -- the
"MdePkg/Library/DxeHobLib/DxeHobLib.inf" library instance, according to
the build report; therefore adding an explicit HobLib class dependency
shouldn't *generally* increase this SMM driver's exposure. The consumed
lib instances are the same before and after this patch, at least in
"OvmfPkgIa32X64.dsc".)
Fixes: https://github.com/tianocore/edk2/issues/11188
Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
Introduce new fields to FIRST_SMI_HANDLER_CONTEXT:
- a UINT8 (effectively: boolean) value that controls whether the first SMI
handler of the hot-added CPU is supposed to set
MSR_IA32_FEATURE_CONTROL,
- and for when that is the case, two UINT32 values, for passing the
desired EDX:EAX (64-bit) MSR value.
MSR_IA32_FEATURE_CONTROL might as well be settable in the post-SMM pen
("PostSmmPen.nasm"); however, I find the first SMI handler better for this
purpose:
- we already have a nice context structure we can extend,
- in SMM, we have tighter control than after SMM (see the comments near
the top of "PostSmmPen.nasm").
MSR_IA32_FEATURE_CONTROL is orthogonal to the SMRAM State Save Map, and
WRMSR is permitted in the real mode-like initial environment of SMM, so
functionally speaking, this should be fine.
For now, the feature is disabled.
Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
In a subsequent patch, we'll introduce fields with long names to
"FIRST_SMI_HANDLER_CONTEXT". Make room for those field names in
"FirstSmiHandler.nasm".
"git show -b" produces no patch output for this commit.
Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
A zero "FeatureControlValue" currently means "no feature control, or
feature control with zero value". Distinguish both cases by explicitly
recording the presence of the "etc/msr_feature_control" fw_cfg file. This
will be helpful later in this series, when we won't want to touch fw_cfg
again, but still know if "etc/msr_feature_control" was read OK.
Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
The Event3 memory comparison is technically correct since the
definitions of the struct types are the same. The extended
bodies of the events are different. The Event2 size guard
for the Event3 comparison should be split to use the Event3
in its sizeof for better clarity.
The large single condition makes the function difficult to
understand, so the combined logic is split into different
conditional statements.
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
SATA CD-ROMS are still conventionally used in many
virtual environments, so it's nice to support them
out of the box.
Tested with QEMU 9.2.3 with the following controller
and drive:
qemu-system-loongarch64 -M virt [...] \
-device ahci,id=ahci0,multifunction=on,bus=pcie.0,addr=0x7 \
-drive if=none,id=drive-sata2,media=cdrom,format=raw,aio=threads,file=/path/to/bootable.iso \
-device ide-cd,bus=ahci0.2,drive=drive-sata2,id=sata2,bootindex=102
Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
With firmware context APIs removed, store HobList pointer directly in the
scratch register for Peiless booting.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
A change was made to the following pytool releases to prevent a
platform from needing to include additional logic to consider
command-line build variable parameters for PR evaluation.
- edk2-pytool-library v0.23.4
- edk2-pytool-extensions v0.29.11
Commit 33e58db was added as a workaround, but that is no longer
needed after these pytool updates, so revert it.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The Universal Graphics Adapter (UGA) is a graphic abstraction.
The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was
introduced. Cf. the UEFI spec v2.9:
"Appendix L - EFI 1.10 Protocol Changes and Deprecation List"
section L.2 "Deprecated Protocols"
Remove the UGA support.
Signed-off-by: GuoMinJ <newexplorerj@gmail.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
If a memory debug log buffer is present, register the buffer location as
config table so the OS can find and show it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This check is present for every call to `MemDebugLogWrite` but it is
missing here. This may cause an unwanted write to the
buffer, when the buffer's address is not null and MemDebug is disabled.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Allow PR eval to operate with the same input variable values as the
build command would.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
OvmfPkg has copied the MdeModulePkg DxeIpl behavior to
create a memory allocation HOB for page 0. That is being changed
(see that commit for details), so also remove it here.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Add QEMU_PV_VARS build option, when enables the firmware build will
support (and require) the qemu uefi variable store.
This also enables proper (as-in: actually being secure) secure boot
support.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
32-bit architecture (ia32 + arm) are not supported. Update inf file
accordingly. Add a VALID_ARCHITECTURES line. Drop ARM configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This patch refactors low level NOR flash functions into a dedicated library
to enable reuse, particularly for supporting the firmware upgrade feature.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
To facilitate moving the NOR flash functions into a separate library,
TPL handling is now delegated to the caller.
Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
Base on ACPI 6.6 Multiprocessor Wakeup Structure, TDVF needs to provide
a physical address of the ResetVector to OS. And it should allow the
Multiprocessor Wakeup Mailbox to be reset in order to be used once again
with a given AP.
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Reviewed-by: Min Xu <min.m.xu@intel.com>
Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
This update introduces a new section in the README file, detailing the
design considerations of the recently onboarded Standalone MM platform in
OVMF.
The section is intended for future reference and should be revised
accordingly if updates to the Standalone MM framework render these
limitations obsolete.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change expands the CI pipeline build to a new platform type with
Standalone MM support to ensure the incoming change works with Standalone
MM environment on x64 platforms.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds a build flag in the platform DSC file to support
standalone MM build on OVMF platform.
The new standalone MM platform will not support S3 boot and thus no SMM
lock box related components are included.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change introduces a platform specific HOB producor library to meet
the expectation of Standalone MM core.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change introduces a Null instance of MemEncryptSevLib to enable
platforms that do not have confidential compute support.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This update introduces the implementation of QemuFlashFvbServices to
support operation with Standalone MM backed platforms.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>