summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-06-19OvmfPkg: StandaloneMmCpuFeaturesLib: Introduce SmmCpuFeaturesLib for OvmfKun Qin3-1/+119
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>
2025-06-19OvmfPkg: SmmCpuFeaturesLib: Abstract out SMM specific implementationsKun Qin3-198/+251
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>
2025-06-19OvmfPkg: PlatformSecureLib: Support Standalone MM core and driversKun Qin1-1/+1
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>
2025-06-19OvmfPkg: PlatformDebugLibIoPort: Support Standalone MM core and driversKun Qin1-1/+1
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>
2025-06-19OvmfPkg: DxeAcpiTimerLib: Support Standalone MM core and driversKun Qin1-1/+1
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>
2025-06-19OvmfPkg: MemDebugLogLibNull: Support Standalone MM core and driversKun Qin1-1/+1
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>
2025-06-19StandaloneMmPkg: StandaloneMmIplPei: Use MM access to open the regionsKun Qin3-2/+81
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>
2025-06-19StandaloneMmPkg: StandaloneMmIplPei: Prevent Freeing Zero PagesKun Qin1-1/+4
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>
2025-06-16OvmfPkg: Update README with new 'TLS Auth Configuration'Rebecca Cran1-1/+1
'Tls Auth Configuration' is now 'TLS Auth Configuration'. Update README to match. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2025-06-16NetworkPkg: Change 'Tls' to 'TLS'Rebecca Cran1-3/+3
Sicne it's a user-visible string, change 'Tls' to 'TLS', which is more correct. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2025-06-16MdeModulePkg: Add help for Reset menu item, and fix French stringsRebecca Cran2-4/+4
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>
2025-06-16UefiPayloadPkg: fix SPI prefetch and cache disable settingKevin Tsai2-4/+5
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>
2025-06-16edksetup.sh: Update "inux" to "Unix-like"Damien1-1/+1
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>
2025-06-16DynamicTablesPkg: Add SLIT table generator libraryabdattar4-0/+661
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>
2025-06-13OvmfPkg: Add OVMF Memory Debug Logging to Ia32X64 and X64 OVMF buildsAaron Young4-2/+70
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>
2025-06-13OvmfPkg: Add OVMF Mem Debug Log buffer to PEI mem cap/reserve early bufferAaron Young4-0/+24
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>
2025-06-13OvmfPkg: Add OVMF Memory Debug Logging support to PlatformDebugLibIoPortAaron Young12-4/+31
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>
2025-06-13OvmfPkg: Add OVMF Memory Debug Logging MemDebugLogPei PEIMAaron Young2-0/+208
Add the OvmfPkg MemDebugLogPei PEI Module which is responsible for allocating and initializing the main memory 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>
2025-06-13OvmfPkg: Add OVMF Memory Debug Logging MemDebugLogLib libraryAaron Young14-0/+1078
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>
2025-06-13OvmfPkg: Add OVMF Memory Debug Logging GUIDs and PCDsAaron Young1-0/+18
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>
2025-06-13ShellPkg: Remove PcdShellSupportOldProtocolsPierre Gondois4-17/+1
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>
2025-06-13ShellPkg/UefiShellLib: Fix Buffer underflowPierre Gondois1-2/+4
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>
2025-06-13ShellPkg/UefiShellLevel2CommandLib: Free Buffer after usePierre Gondois1-0/+2
Free the allocated Buffer after use. Reported-by: Ramesh R <rameshr@ami.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-13NetworkPkg/DxeNetLib: Fix CodeQl ErrorBrit Chesley2-3/+8
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>
2025-06-13SecurityPkg/Tpm2CommandLib: Add new digest list copy and size functionsMichael Kubacki2-0/+121
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>
2025-06-13UefiCpuPkg/Test/EfiMpServicesPpiProtocol: EFI_AP_PROCEDURE must be EFIAPIMichael D Kinney3-0/+14
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>
2025-06-13RedfishPkg/JsonLib: Use same defines for MSFT and GCC familiesMichael D Kinney1-1/+1
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>
2025-06-13RedfishPkg/RedfishLib: Fix enum type mismatchMichael D Kinney1-1/+1
Fix enum type mismatch between jansson library and JsonLib. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-06-13StandaloneMmPlg/StandaloneMmIpPei: Fix use without initializationMichael D Kinney1-6/+17
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>
2025-06-13SecurityPkg/SpdmCryptLib: Fix CLANG 20.1.0 errorMichael D Kinney1-0/+4
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>
2025-06-13SecurityPkg/Spdm: Use spdmlib enums for spdmlib callsMichael D Kinney4-216/+21
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>
2025-06-13MdeModulePkg/DebugSupportDxe: Fix type mismatchesMichael D Kinney1-9/+16
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>
2025-06-13MdeModulePkg/SpiNorFlashJedecSfdp: Initialize AddressSizeMichael D Kinney1-0/+1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-06-13MdeModulePkg: Refactor MM Services Tables linked in MM Core Perf LibMichael Kubacki5-67/+155
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>
2025-06-13IntelFsp2Pkg: Add Fsp notify phase checkHongbin1 Zhang1-9/+18
This change included following two changes: 1. Add Fsp notify phase check, it will hang if bootloader call FSP with wrong phase 2. Remove FspMode check, due to just API mode will run the code, no need to check Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Ted Kuo <ted.kuo@intel.com> Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
2025-06-12EmulatorPkg: Fix enum type mismatch warning treated as errorRithvik Rama1-1/+1
Issue: While building edk2, the compiler threw a warning that was treated as an eror which halted the build process. Root Cause: The error was due to a comparison between two different enum types. Code Fix: WinGopScreen.c: In function WinNtWndBlt, changed the comparison between an enum type "EFI_UGA_BLT_OPERATION" and "EFI_GRAPHICS_OUTPUT_BLT_OPERATION" to "EFI_UGA_BLT_OPERATION". Test: The compiled image runs successfully on QEMU. Signed-off-by: Rithvik Rama <rithrama@amd.com>
2025-06-12MdeModulePkg: Fix function typosGao Qihang4-6/+6
functin -> function Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-12UefiPayloadPkg: Fix EFI_SUCCESS typosGao Qihang2-2/+2
EFI_SUCESS -> EFI_SUCCESS Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-12UefiCpuPkg: Fix EFI_SUCCESS typosGao Qihang2-4/+4
EFI_SUCESS -> EFI_SUCCESS Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-12OvmfPkg: Fix EFI_SUCCESS typosGao Qihang3-5/+5
EFI_SUCESS -> EFI_SUCCESS Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-12MdePkg: Fix EFI_SUCCESS typosGao Qihang1-2/+2
EFI_SUCESS -> EFI_SUCCESS Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-12EmulatorPkg: Fix EFI_SUCCESS typosGao Qihang2-2/+2
EFI_SUCESS -> EFI_SUCCESS Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-12MdeModulePkg: Fix EFI_SUCCESS typosGao Qihang20-36/+36
EFI_SUCESS -> EFI_SUCCESS EFI_SUCESSS -> EFI_SUCCESS Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-12RedfishPkg/RedfishConfigHandler: Free handle buffersDongyan Qian1-2/+7
Fix memory leaks by adding missing FreePool calls: free handle buffers in Stop and initialization routines. REF:https://uefi.org/sites/default/files/resources/UEFI_Spec_Final_2.11.pdf Chapter 7.3.15: "Services - Boot Services.LocateHandleBuffer": It is the caller's responsibility to call the Boot Service.FreePool when the caller no longer requires the contents of Buffer. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2025-06-12PrmPkg/DxePrmContextBufferLib: Free handle buffers after LocateHandleBufferDongyan Qian1-31/+40
Fix memory leaks by adding missing FreePool calls: cleanup HandleBuffer in GetModuleContextBuffers. REF: https://uefi.org/sites/default/files/resources/UEFI_Spec_Final_2.11.pdf Chapter 7.3.15: "Services - Boot Services.LocateHandleBuffer": It is the caller's responsibility to call the Boot Service.FreePool when the caller no longer requires the contents of Buffer. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2025-06-12NetworkPkg/HttpUtilitiesDxe: Free handle buffers after LocateHandleBufferDongyan Qian1-3/+8
Fix memory leaks by adding missing FreePool calls: free HandleBuffer in HttpUtilitiesDxeUnload. REF: https://uefi.org/sites/default/files/resources/UEFI_Spec_Final_2.11.pdf Chapter 7.3.15: "Services - Boot Services.LocateHandleBuffer": It is the caller's responsibility to call the Boot Service.FreePool when the caller no longer requires the contents of Buffer. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2025-06-12MdeModulePkg/SpiBus: Free handle buffers after LocateHandleBufferDongyan Qian1-2/+4
Fix memory leaks by adding missing FreePool calls: release SpiHcHandles in SpiBusEntry exit path. REF: https://uefi.org/sites/default/files/resources/UEFI_Spec_Final_2.11.pdf Chapter 7.3.15: "Services - Boot Services.LocateHandleBuffer": It is the caller's responsibility to call the Boot Service.FreePool when the caller no longer requires the contents of Buffer. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2025-06-11NetworkPkg: Add PCD to control http boot enable or disable.mark.li4-0/+21
Add PCD to control http boot enable or disable. Signed-off-by: jie.fu <jie.fu@cixtech.com>
2025-06-11MdePkg: Fix definition typosDongyan Qian7-8/+8
`defintion`->`definition` Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2025-06-11MdeModulePkg: Fix definition typosDongyan Qian5-5/+5
`defintion`->`definition` Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>