summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-08-22MdeModulePkg: Improve the implementation of EFI_SIMPLE_TEXT_OUTPUT_PROTOCOLGao Qihang3-0/+19
Fix TestString() to be compatible with wide/narrow string in GraphicsConsole driver. If WIDE_CHAR or NARROW_CHAR is hit in TestString function, ignore it since OutputString function will correctly handle it. Fix OutputString() to skip wide/narrow char in TerminalDxe. Because they are not displayable in terminal emulation tool, ingore to output if they are hit in OutputString function. Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-08-22MdeModulePkg: Simplify PrintInternal function to fit wide characterGao Qihang1-54/+19
According to UEFI Spec, only Bit0...6 is valid in mode attribute, other bits are undefined and must be 0. So attribute with EFI_WIDE_ATTRIBUTE is unacceptable as EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute() input parameter. In current PrintInternal function, wide character removed WIDE_CHAR, and is used as EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString() input parameter. So, wide character is mistakenly be treated as narrow character. Because EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString() can handle unicode string with NARROW_CHAR and WIDE_CHAR, we can directly invoke OutputString() with whole unicode string in PrintInternal function instead of separated wide/narrow string. And then, the logic of computing unicode string width is also simplified. Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-08-22MdeModulePkg/HiiDatabaseDxe: Avoid assert in InternalGetStringGao Qihang1-1/+2
If string default is set to zero in vfr file and VfrCompile may not found the invalid operation, assert is trigged. This patch will check whether StringId is 0 to avoid assert. Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-08-22BaseTools/VfrCompile: Add check for setting string default to numberGao Qihang1-2/+3
It's illegal that string default is numeric type in vfr string definition. This patch add a check to the illegal behavior. If numeric string default is encountered, throw a invalid parameter error to break VfrCompile. Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-08-12ShellPkg: Remove EmbeddedPkg dependencyedk2-stable202508Prachotan Bathi2-2/+0
Commit dcde148 introduced EmbeddedPkg as a dependency since gFdtTableGuid was in the EmbeddedPkg, but has now been moved to MdePkg. Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-08-12MdePkg, EmbeddedPkg: Move Fdt Table Guid to MdePkgPrachotan Bathi3-9/+4
Move Fdt Table Guid from EmbeddedPkg to MdePkg to avoid unnecessary dependencies on EmbeddedPkg for packages like ShellPkg. This change may affect modules dependent on EmbeddedPkg but not on MdePkg, which is unlikely. Also, per 8c721d6, MdePkg has a more refined implementation of Fdt as compared to the EmbeddedPkg which was the initial implementation. Not moving gFdtVariableGuid since it'll be moved to platform code. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-08-12UefiPayloadPkg: Scan for Option ROMsPatrick Rudolph5-0/+534
Since on UefiPayload the full PCI enumeration isn't run, the light enumeration won't find Option ROMs. The introduced PciPlatform driver relies on completed PCI enumeration and assumes that all ROM bars have been properly assigned a free MMIO window. Installs the gPciPlatformProtocol to scan for Option ROMs during PCI enumeration light and copies found Option ROMs to runtime allocated buffers. Only for work devices that have a ROMBAR, but doesn't for devices that need a VBIOS loaded from SPI flash. TEST: QEMU can enumerate Option ROMs on VGA and NIC on UefiPayloadPkg. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2025-08-12Revert "SecurityPkg: CodeQL Fixes."Michael D Kinney23-311/+67
This reverts commit ba6a8eb045aededbc1472cce7314ab1911f0ea1c. PR https://github.com/tianocore/edk2/pull/11307 introduced a logic change that caused regressions in FV verification on some platforms. This PR is being reverted to restore the prior logic. The Code QL fixes in https://github.com/tianocore/edk2/pull/11307 can be resubmitted without the logic change along with one commit for each type of Code QL issue being addressed. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-08-11MdeModulePkg: XhciDxe: Fix comment grammar in XhcMonitorAsyncRequestsSherry Fan1-2/+2
Clarify wording of the comment before the callback in XhcMonitorAsyncRequests. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2025-08-11MdeModulePkg: XhciDxe: Fix USB reset issue: callback / update orderSherry Fan1-3/+25
As noted in the comment above the callback invocation, the URB's callback may free the URB, so any operations, including updates, must occur before the callback. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2025-08-11MdeModulePkg: XhciDxe: Fix USB reset issue: use after freeSherry Fan2-4/+33
`XhcFreeUrb` attempts to unmap `Urb->DataMap` after `FreePool(Urb->Data)` has already been called in some cases, causing a use after free. Change the ordering so `Data` is freed after `Unmap`and only freed when appropriate. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2025-08-08MdeModulePkg: Support conditional UFS initializationBob Morgan2-25/+41
Add SkipHceReenable and SkipLinkStartup flags to the EDKII_UFS_HC_PLATFORM_PROTOCOL to support using a UFS controller that has already been initialized. Signed-off-by: Bob Morgan <bobm@nvidia.com>
2025-08-07Update reviewer for SecurityPkg: Tcg related modules and UefiCpuPkgArun Subramanian Baskaran1-2/+2
Add arunsbaskaran as reviewer for SecurityPkg: Tcg related modules and UefiCpuPkg. Remove rahul1-kumar as reviewer from SecurityPkg: Tcg related modules and UefiCpuPkg. Signed-off-by: Arun Subramanian Baskaran <arun.subramanian.baskaran@intel.com>
2025-08-07UefiPayloadPkg/BlSupportDxe: Drop manual reservations for APIC and HPETBenjamin Doron4-95/+3
The entrypoint module should do this programmatically using resources passed by the bootloader. Under UPL, bootloaders are expected to pass such ranges in the FDT. Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
2025-08-07MdeModulePkg: Remove obsolete PEI_USB_HOST_CONTROLLER_PPIArd Biesheuvel4-254/+0
This PPI is no longer used - the EHCI and XHCI host controller PEIMs expose PEI_USB2_HOST_CONTROLLER_PPI instead. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-07MdeModulePkg/UsbBusPei: Drop support for obsolete host controller PPIArd Biesheuvel4-348/+132
There are two versions of the USB host controller PPI, and only the newer one, called PEI_USB2_HOST_CONTROLLER_PPI, is actually produced by the EHCI and XHCI host controller PEIMs in EDK2. (The other PPI was only produced by UhciPei which has been removed) So remove all the conditionally executed code based on the distinction between the two PPIs, and only support the newer one. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-07MdeModulePkg/Usb: Remove UhciPeiArd Biesheuvel7-5003/+0
Remove the UHCI PEI module, which is unused (in edk2-platforms) and obsolete. It also implements an older version of the USB host controller PPI, which can be dropped from EDK2 entirely once this driver is gone. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-07MdeModulePkg: Usb cumulative codeql issues.Michael Kubacki6-21/+39
Running Codeql on the MdeModulePkg\Bus\Usb drivers results in codeql errors stemming for the following two checks. - cpp/comparison-with-wider-type - cpp/overflow-buffer Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
2025-08-07MdeModulePkg: Variable cumulative codeql issues.Michael Kubacki3-65/+72
Running Codeql on MdeModulePkg/Universal/Variable drivers results in codeql errors stemming for the following two checks. - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/missing-null-test Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
2025-08-07SecurityPkg/Tcg/OpalPasswordDxe: Fix logic for RemoveDevice()Hunter Chang1-1/+3
First, If there are multiple devices in DeviceList and are going to remove the first device in the DeviceList, the DeviceList will be cleared up with setting to NULL. This is not the expected behavior, as it should keep the rest of the devices in the DeviceList. DeviceList should point to the next device, Dev->Next. Second, there is a potential infinite while loop if TmpDev->Next not equal to Dev. TmpDev should point to next device. Signed-off-by: Hunter Chang <hunter.chang@intel.com>
2025-08-07StandaloneMmPkg/MmCore: Correct EndOfDxe to EndOfPei in MmEndOfPeiHandlerStar Zeng1-1/+1
Signed-off-by: Star Zeng <star.zeng@intel.com>
2025-08-07StandaloneMmPkg/MmIpl: Correct CreatMmHobList to CreateMmHobListStar Zeng1-3/+3
Signed-off-by: Star Zeng <star.zeng@intel.com>
2025-08-07.azurepipelines: Use Fedora 41 image for Linux CI jobsOliver Steffen1-1/+1
Fedora 40, which is currently used as the base image for the Linux jobs in the CI, is EOL. Switch over to the Fedora 41 image (gcc 14). Signed-off-by: Oliver Steffen <osteffen@redhat.com>
2025-08-07SecurityPkg: Added basic DxeImageVerificationLib testsAlexander Gryanko5-0/+322
Add initial unit test for DxeImageVerificationHandler to validate signature verification bypass for selected image types. Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2025-08-07CryptoPkg: workaround for MSVC linking tolowerAlexander Gryanko1-0/+13
Currently when building NOOPT tests in MSVC, the linker cannot pick the correct tolower for the host runtime. A small workaround to make the build work in MSVC. Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2025-08-07MdePkg: added mocks for DevicePathLib and OpenProtocolAlexander Gryanko6-3/+282
Added Google Mock test support for DevicePathLib. Added OpenProtocol and CloseProtocol for UefiBootServicesTableLib mock library. Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2025-08-07MdeModulePkg: added SecurityManagementLib mockAlexander Gryanko4-0/+104
Added Google Mock test support for SecurityManagementLib Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2025-08-06Add Poncho Figueroa as BaseTools reviewerPoncho Figueroa1-0/+1
Signed-off-by: Poncho Figueroa <poncho.figueroa.esqueda@intel.com>
2025-08-06StandaloneMmPkg/MmIpl: Call CreatMmHobList() with page aligned sizeStar Zeng1-2/+2
MmCore ImageSize may be not page aligned, it will be converted to page aligned for allocating MMRAM to hold MmCore image. This patch is to call CreatMmHobList() with page aligned size of ImageSize, otherwise ASSERT (IS_ALIGNED (Length, EFI_PAGE_SIZE)) in MmIplBuildMmCoreModuleHob() will happen if the input MmCore ImageSize is not page aligned. Signed-off-by: Star Zeng <star.zeng@intel.com>
2025-08-06MdePkg/Library: Remove MM_STANDALONE LibraryClass in UefiDevicePathLib.infGowtham M1-1/+1
UefiDevicePathLib.inf consumes Boot Services in MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c - DevicePathFromHandle(). And so cannot be used by MM_STANDALONE drivers. Instead, MM_STANDALONE drivers can use UefiDevicePathLibBase.inf as the DevicePathLib of choice. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-08-06MdePkg/Library: Remove UefiDevicePathLibStandaloneMm.infGowtham M2-79/+0
The file UefiDevicePathLibStandaloneMm.inf was reintroduced in [#3187] to give downstream platforms time to transition to UefiDevicePathLibBase.inf As nearly three years have passed since that change, and downstream consumers have had sufficient time to migrate, this library can now be safely removed. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2025-08-06OvmfPkg/OvmfPkg.dsc:Update DevicePathLib mapping for MM_STANDALONE driversGowtham M1-1/+1
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>
2025-08-06.mergify: Set max parallel checks to 1Michael D Kinney1-0/+3
Set max parallel checks to 1 to disable speculative checks. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-08-06MdeModulePkg: UefiBootManagerLib Change default alignment for ramdisk boot.ddeptford1-3/+7
The ramdisk is modelled as an NVDIMM which have a naturally higher alignment than 4K. Operating systems may wish to map NVDIMMs using large pages, so force the allocation alignment to 2MB. This change was tested using HTTP ramdisk boot, targeting a flat windows image. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-08-05CryptoPkg/BaseCryptLibMbedTls : Add strpbrk() support to MbedTlsHemaAnmisha1-0/+20
Mbedtls requires the use of strpbrk(), but it is currently included in BaseCryptLib, which is not part of BaseCryptLibMbedTls. To resolve this, add strpbrk() to CrtWrapper.c, as BaseCryptLibMbedTls is not dependent on OpensslLib. Signed-off-by: HemaAnmisha <hema.anmisha.kalavakolanu@intel.com>
2025-08-04UefiCpuPkg/PiSmmCpuDxeSmm: Safe handling of IDT register on SMM entryJohn Mathews1-1/+5
Mitigates CVE-2025-3770 Do not assume that IDT.limit is loaded with a zero value upon SMM entry. Delay enabling Machine Check Exceptions in SMM until after the SMM IDT has been reloaded. Signed-off-by: John Mathews <john.mathews@intel.com>
2025-08-01DynamicTablesPkg: Add alias for EArchCommonObjPciConfigSpaceInfoAbdul Lateef Attar3-5/+27
Introduce EArchCommonObjMcfgPciConfigSpaceInfo as an alias for EArchCommonObjPciConfigSpaceInfo. The CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO object is utilized by both the MCFG and ACPI SSDT PCIE generators. Assigning a unique configuration object ID ensures the platform configuration driver supplies the correct data. Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-07-30BaseTools: Fix FMMT FvHandler Padding operation issuesecurity-advisory/cve-2025-xxxxx/advisoryYuwei Chen1-4/+22
When using the FMMT FvHandler function, new padding size should be calculated correctly comparing with origin ffs and new ffs, else it will cause the binary size changes. This patch is used to fix the bug. Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
2025-07-30MdeModulePkg: Change PCD type to support dynamicPranav V V1-4/+5
Move PcdSerialRegisterBase from [PcdsFixedAtBuild, PcdsPatchableInModule] section to [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] section to enable dynamic configuration. Signed-off-by: Pranav V V <pranav.v.v@intel.com>
2025-07-29UefiPayloadPkg: Fix calling conventionGuo Dong1-0/+1
When register a root SMI handler, it is expected to use windows calling convention for the SMI handler. This patch adds missing EFIAPI for the SMI handler SmmSwDispatcher to avoid potential issue from Linux build. Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-07-29DynamicTablesPkg: add Tpm2DeviceTableLib to generate Tpm2 device tableLevi Yun10-50/+673
Introduce Tpm2DeviceTableLib to generate SSDT table which describes Tpm2 devices. This dynamic table generation is controlled by PcdGenTpm2DeviceTable which default value is FALSE. When it is TRUE, the TPM2 device ssdt table is generated when TPM2 ACPI table is generated. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-29DynamicTablesPkg: add ArchCommonObjTpm2DeviceInfoLevi Yun1-0/+13
To generate SSDT for TPM2 device using DynamicTablePkg, add TPM2 Device information Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-25ShellPkg/Library: Remove unecessary error checkNanjinmoorthyj1-4/+0
Remove the error handling from the connect.c file as it is redundant. Signed-off-by: Nanjinmoorthy <nanjinmoorthyj@ami.com>
2025-07-24OvmfPkg/CloudHv: bump PcdCpuMaxLogicalProcessorNumber to 254Thomas Prescher1-1/+1
Signed-off-by: Thomas Prescher <thomas.prescher@cyberus-technology.de> On-behalf-of: SAP thomas.prescher@sap.com
2025-07-24ShellPkg: Fixed Deadcode and Null field Coverity warnings.Revathy V4-33/+59
Updated fixes for all Deadcode and Null field Coverity fixes in ShellPkg Signed-off-by: Revathy <revathyv@ami.com>
2025-07-24ShellPkg: DtbTableAddress via config in dmemPrachotan Reddy Bathi3-0/+8
DTB address can be modified through the config table. Use this address in dmem output. EmbeddedPkg dependency added to ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf and ShellPkg/ShellPkg.ci.yaml Adds to: 42b0443599a6 ("ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c") Signed-off-by: Prachotan Reddy Bathi <Prachotan.Bathi@arm.com>
2025-07-24ArmVirtPkg: Introduce ArmTransferListLib to ArmVirtPkgPrachotan Bathi2-0/+2
Add ArmTransferListLib as a library to platforms using ArmVirtCloudHv.dsc and ArmVirtQemu.dsc. Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24ArmPlatformPkg: Introduce TransferList Guid Hob for SECPrachotan Bathi2-2/+23
ArmTransferListHobGuid holds TransferList base address If there's no valid TransferList found, or if a Guid HOB is already present Guid HOB is not built, boot progresses as usual. https://firmwarehandoff.github.io/firmware_handoff Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24ArmPlatformPkg: Introduce gArmTransferListPpiGuidPrachotan Bathi2-4/+18
Populate the gArmTransferListPpiGuid with the TransferList base address. Place the Ppi at the end of the PpiList For platforms with no TransferList support, boot continues without any errors. https://firmwarehandoff.github.io/firmware_handoff Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-24ArmPkg: Add gArmTransferListPpiGuidPrachotan Bathi1-0/+1
ArmTransferListHobGuid will hold the TransferList base address https://firmwarehandoff.github.io/firmware_handoff SEC platforms can utilise this PPI to build the TransferList HOB Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>