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>
Create Acpi66.h, which is copied from Acpi65.h, and make the following
changes:
1. Replace all occurences of "6.5/6_5" with "6.6/6_6".
2. Add "ResetVector" in Multiprocessor Wakeup Structure.
3. Add "Test" command for Multiprocessor Wakeup Mailbox.
4. Make Acpi66.h the latest ACPI definitions that Acpi.h contains.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Introduce optional configuration objects to specify interrupt and terminal types.
When the platform supplies this information,
the SPCR table is updated to reflect the provided values.
If the interrupt type is 8259,
the corresponding IRQ number is set in the SPCR table.
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.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>
This update refactors QemuFlashFvbServicesRuntimeDxe to abstract out
direct calls to SMM and DXE specific functions.
Specifically, dynamic PCD usage and gBS references have been moved to SMM
specific files.
The constructor functionality has been relocated to a common
implementation and is invoked from their respective entry points.
These changes lay the groundwork for supporting a Standalone MM-based
solution in the future.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds a build time PCD to prevent the SmmControl2Dxe driver
from re-initialization the MM related registers.
This register is to be used when MmControlPei is already executed in PEI
phase and completed setting up the MM control registers.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds a PEIM that produces gEfiPeiMmControlPpiGuid to be used
in PEI phase, i.e. boot strap MM foundation.
This flow is largely in assemblence of MM control DXE driver and used the
`SmiFeatures.*` files from the DXE drivers as the common resources.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds the implementation of SmmCpuFeaturesLib for Ovmf to
operate with Standalone MM supported platforms.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This update refactors the existing SmmCpuFeaturesLib to eliminate direct
calls to SMM-specific functions.
In particular, the constructor has been relocated to traditional MM-
specific C files, utilizing a common entry point.
Furthermore, several implementation-specific functions have been
modularized into its respective C files.
These changes lay the groundwork for supporting a Standalone MM-based
solution in the future.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change extends the library to support MM_CORE_STANDALONE and
MM_STANDALONE for usage in MM standalone environment.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change extends the library to support MM_CORE_STANDALONE and
MM_STANDALONE for usage in MM standalone environment.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change extends the library to support MM_CORE_STANDALONE and
MM_STANDALONE for usage in MM standalone environment.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change extends the supported types to Standalone MM and Standalone
MM Core module types to support potential MM usage.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Current MM IPL in PEI phase does not open the MMRAM regions through MM
access PPI. This is causing some platforms like OVMF reading all `0xFF`s
when trying to relocate the Standalone MM core.
This change opens all the MMRAM regions provided by MM access PPI and
closes + locks the regions after initial MM foundation setup, when MM
Access PPI is available.
Platforms that require MM access PPI can inject depex through libraries.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
There could be scenarios where the HOB producer does not create any HOBs.
In such cases, the buffer intended to be freed will have zero pages.
This update addresses the issue that could cause assertions during
runtime by ensuring that buffers with zero pages are not freed.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Fix the help string for the Reset menu item, and add it to the UI
instead of just repeating the main text. Fix the French translations.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
fix SPI prefetch and cache disable value and define SRC bitfield position
correct register setting in SaveAndDisableSpiPrefetchCache
Signed-off-by: Kevin Tsai <kevin.tsai@intel.com>
This commit replaces the outdated and
less common term "inux" with "Unix-like."
While "inux" historically served as an abbreviation for Unix-like systems,
the term "Unix-like" is now the widely accepted
and more precise descriptor in the industry,
as detailed by sources like Wikipedia's "Unix-like" entry.
This change enhances readability and
ensures consistency with current technical vocabulary,
making the text clearer for a broader audience.
Signed-off-by: Damien Chen <inkfan130924783@gmail.com>
Introduce a common architecture SLIT table generator library
that retrieves locality domain distance information from
the configuration manager and generates the table accordingly.
Signed-off-by: abdattar <AbdulLateef.Attar@amd.com>
Add the OVMF Memory Debug Logging feature (MemDebugLogLib library
and MemDebugLogPei PEIM) to the Ia32X64 and X64 OVMF builds.
This includes reserving the "early" memory debug log buffer
in the .fdf files.
The OVMF Memory Debug Logging feature is enabled
via the -D DEBUG_TO_MEM build flag.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Aaron Young <aaron.young@oracle.com>
Add the memory debug log buffer size (pages) to
TotalPages in PlatformPei:GetPeiMemoryCap() help
ensure we don't run out of memory.
Also Reserve the "early" memory debug log buffer.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Aaron Young <aaron.young@oracle.com>
Extend OvmfPkg PlatformDebugLibIoPort library to also
write debug messages to memory.
Include NULL versions of MemDebugLogLib to all OVMF builds
which use PlatformDebugLibIoPort.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Aaron Young <aaron.young@oracle.com>
Add the Memory Debug Logging feature MemDebugLogLib library
which provides the key MemDebugLogWrite() function.
Several versions (i.e. SEC, PEIM, DXE, runtime) of
the function are included to provide the proper
method to write the debug messages to the memory
debug log buffer.
The library also provides the core functions to maintain
the circular memory debug log buffer.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Aaron Young <aaron.young@oracle.com>
The OVMF Memory Debug Logging feature logs DEBUG() messages
to a memory buffer allowing for extraction of debug messages
directly from a qemu process or core file.
Add the GUIDs and PCDs definitions required for the
OVMF Memory Debug Logging feature.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Aaron Young <aaron.young@oracle.com>
PcdShellSupportOldProtocols aimed to force using the following protocols:
- gEfiShellEnvironment2Guid
- gEfiShellInterfaceGuid
over the UEFI Shell 2.0 protocols:
- gEfiShellProtocolGuid
These 2 protocols seem to originate from the original EDK(1) implementation
and are now deprecated. The protocols are not implemented in EDK2.
Remove the PcdShellSupportOldProtocols which does not switch to using
the original shell protocols. Setting the PCD to TRUE prevents from
loading the UEFI Shell.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Having StrLen(Buffer) == 0 results in a Buffer underflow.
Also, StrLen iterates over the Buffer elements until finding a NULL
character. This results in a quadratic search for '\r' characters
in the while loop.
Fix these issues.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Fix possible NULL pointer dereference in NetBuffer.c This was flagged by
CodeQl as an error.
Github Issue #11190
Signed-off-by: Brit Chesley <brit.chesley@amd.com>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3267
Adds two new helper functions.
Currently, a function exists in Tpm2CommandLib to copy a digest list
to a buffer. A function to perform the inverse operation - copying
from a buffer to a digest list is added.
A function is also added to compute the total digest size for a given
hash algorithm mask.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Add missing EFIAPI calling convention to all EFI_AP_PROCEDURE functions
in the EfiMpServicesPpiProtocol unit tests.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
CLANGPDB and CLANGDWARF are in GCC family. When CLANGPDB or
CLANGDWARF are used from windows host, the same defines and
undefines must be applied to GCC family for CLANG builds.
This resolves CLANG 20.1.0 build errors.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update logic to prevent case where PlatformHobList may be used
without being initialized. Check for expected return statuses
and values from first call to CreateMmPlatformHob().
Remove use of CpuDeadLoop() and instead make consistent use of
DEBUG_ERROR log messages and ASSERT()s to detect unexpected
failures determining the size and allocating the platform HOB
List for the Standalone MM environment.
Fix potential memory leak when the expected allocation size
does not match the actual allocation size.
Fixes a build error detected with CLANG 20.1.0.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Some of the spdmlib crypto functions return 'false' in
functions that return a pointer to indicate a null
return. false is mapped to FALSE to cover other usages
to return a boolean value.
Add -Wno-non-literal-null-conversion for CLANGPDB and
CLANGDWARF to ignore these types of errors from CLANG
builds within this one library build that uses the
spdmlib git submodule.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Fix CLANG 20.1.0 enum conversion errors
Address implied conversion between enum types by using
the enum type from spdmlib and remove the enum types
that are never used after this update.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
The RegisteredCallback field of IdtEntryTable is used to
store the address of functions with different function
prototypes depending on the ExceptionType. Add local
variables with the correct function prototypes and evaluate
the ExceptionType to assign correct local variable to the
RegisteredCallback value and use local variable to call
the registered callback function with the correct arguments
for the ExceptionType.
Update declaration of InterruptDistrubutionHub() to use
the non-CPU specific EFI_SYSTEM_CONTEXT parameter type
instead of the IA32 specific EFI_SYSTEM_CONTEXT_IA32
because this function is used for both IA32 and X64.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
The code used a `MmServicesTableLib` dependency for both the
Standalone MM and Traditional MM instances and shared code between
those. There is not a readily available `MmServicesTable` lib
instance for Traditional SMM (that can link to `PiSmmCore`). To ease
integration and prevent creating an instance just for this case, this
change uses `SmmServicesTableLib` in the Traditional SMM instance and
`MmServicesTableLib` in the Standalone MM instance and moves code as
necessary to accommodate this.
For general reference, there are two available instances of
`MmServicesTableLib`:
- MdePkg/MmServicesTableLib - only supports DXE_SMM drivers.
- MdePkg/StandaloneMmServicesTableLib - supports both MM drivers and
MM cores.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>