summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-06-11DynamicTablesPkg: Add HMAT/SLIT related objectsPierre Gondois2-38/+220
Add the following objects: - EArchCommonObjProxDomainInfo - EArchCommonObjProxDomainRelationInfo - EArchCommonObjSystemLocalityInfo - EArchCommonObjMemoryProxDomainAttrInfo - EArchCommonObjMemoryLatBwInfo - EArchCommonObjMemoryCacheInfo allowing to generate HMAT/SLIT tables. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: Rework ProximityDomain handlingPierre Gondois4-23/+79
The SRAT/HMAT/SLIT tables describe the relations between ProximityDomain IDs. These proximity domains might represent memory domains, CPUs, IO, etc. ProximityDomain IDs are mere IDs. They don't represent anything and could be generated by the DynamicTablesPkg framework. These IDs are currently hard-coded by the ConfigurationManager developer. In order to: - avoid the developer to keep track of the used ProximityDomain IDs - have a better internal representation of the relation between CPUs sharing the same ProximityDomain ID allow the developer to use Tokens pointing to ProximityDomain structures. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: Check cluster's VALID bit based on SSDT Topology tablePierre Gondois5-14/+62
The ACPI specification v6.5, sTable 5.158: Processor Structure Flags states that: """ The processor container will have a matching ID value returned through the _UID method. As not every pro- cessor hierarchy node structure in PPTT may have a matching processor container, this flag indicates whether the ACPI pro- cessor ID points to valid entry. Where a valid entry is possible the ACPI Processor ID and _UID method are mandatory. """ And in: Table 5.157: Processor Hierarchy Node Structure """ If the processor structure rep- resents a group of associated processors, the structure might match a processor container in the name space. In that case this entry will match the value of the _UID method of the as- sociated processor container. Where there is a match it must be represented. The flags field, described in Processor Struc- ture Flags, includes a bit to describe whether the ACPI pro- cessor ID is valid. """ The DynamicTablesPkg currently creates a processor container: - in the SSDT CPU Topology generator, with the _HID=ACPI0010, and with a valid _UID - in the PPTT table for each CM_ARCH_COMMON_PROC_HIERARCHY_INFO structure. Thus: - all the processor containers should have the VALID bit set if the SSDT CPU Topology table is present. - if the SSDT CPU Topology table is present, but there is no PPTT table, then the state of the VALID bit is ignored. A contrario, an example where the VALID bit should not be set would be if: - the SSDT CPU Topology generator is absent - no processor container is created in the SSDT topology, i.e. if a flat hierarchy is created. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: Add CmObjHelperLibPierre Gondois6-0/+130
Some generators share some logic in how they handle CmObj. In an effort to factorize this code, create a CmObjHelperLib, aiming to host the common CmObj manipulation logic. Start by adding a CheckAcpiTablePresent() function, allowing to check if an ACPI table is in the list of the tables to install. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: AcpiPpttLib: Use MetadataObjLib for cluster _UIDPierre Gondois2-11/+42
The processor containers might have an associated _UID: - in their SSDT topology representation - in their PPTT representation, in the "ACPI Processor ID" field The _UID of the processor containers is independently generated by the PPTT and SSDT CPU topology generators. Make use of the newly created MetadataObjLib to generate a unique and common per-processor container _UID values. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: SsdtCpuTopologyLib: Use MetadataObjLib for cluster _UIDPierre Gondois2-12/+23
The processor containers might have an associated _UID: - in their SSDT topology representation - in their PPTT representation, in the "ACPI Processor ID" field The _UID of the processor containers is independently generated by the PPTT and SSDT CPU topology generators. Make use of the newly created MetadataObjLib to generate a unique and common per-processor container _UID values. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: Add GetMetadataRoot() cb to DynamicTableFactory protocolPierre Gondois6-0/+89
The newly added MetadataObjLib allows to store information either: - generated by the DynamictTablesPkg framework - provided by a ConfigurationManager - parsed from another source of information This information might be subject to validation/verification. This step can only be done once the firmware tables generated by the DynamictTablesPkg have been generated. Add a new GetMetadataRoot() callback to the EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL. This callback allows to fetch the Metadata Root, allowing to access all the Metadata information generated. This Metadata is then validated by the DynamicTableManagerDxe. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: Add MetadataHandlerLib libraryPierre Gondois9-0/+788
Built on top of the MetadataObjLib, this library aims to provide functions for each METADATA_ID to: - Generate new Metadata on the fly: the caller provides minimal information for a METADATA_ID, and the library generates the missing information. - Validate all the Metadata objects for a METADATA_ID. For instance, _UID must be unique for a _HID/_CID/EISAID. This patch also adds support for generation/validation of: - UIDs: For each EISAID or NameId, UIDs must be unique. The generation if UIDs is done by a per-EISAID/NameId incrementing counter. The validation of the Metadata consists in checking for the uniqueness of the UID per EISAID/NameId. - ProximityDomains: Proximity Domain Ids are generated by a counter, starting from 0. The validation of the Metadata consists in checking for the uniqueness of the proximity domain Ids. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: Add MetaDataObjLib libraryPierre Gondois7-0/+699
The DynamicTablesPkg allows to generate firmware tables based on information provided by a user or another source of information (a device tree for instance). Some information might be implicitly generated by generators. For instance, for ACPI tables, AML names or Uids are created by generators, but not provided by the user or another source of information. Some generators might need to cross-reference object/generated data that was previous generated for an object by another generator. For instance, there are three different generators creating serial ports in the AML namespace. These 3 generators must ensure not to use an Id which was not already created by another generator. Another example would be a generator needing to reference the AML path of a serial port. As the AML path is dynamically generated, this is currently not possible to do. Add a MetaDataObjLib library to keep track of the meta-data previously generated for an object. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11DynamicTablesPkg: X64SratGenerator: Fix ProximityDomain bitsPierre Gondois1-2/+2
ProximityDomain31To8[0] is overwritten by the ProximityDomain at bits [17-24] and [25-31]. Populate ProximityDomain31To8[1] and ProximityDomain31To8[2] instead. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-06-11PrmPkg: Add ACPI Parameter Data Buffer SignatureAaron Li1-1/+2
In PRM spec 1.0 section 4.2.2 ACPI Parameter Buffer defines the signature of ACPI Parameter Data Buffer is 'PRMP'. This commit adds the signature of ACPI Parameter Data Buffer. Signed-off-by: Aaron Li <aaron.li@intel.com>
2025-06-11UefiCpuPkg/PiSmmCpuDxeSmm: Modify PcdCpuSmmRestrictedMemoryAccess retrievalSienski Piotr2-1/+14
Currently if PcdCpuSmmRestrictedMemoryAccess is a DynamicPcd it will be accessed during SMM entry causing an error since code outside of SMM will be called (PcdGetBool). To fix that PcdCpuSmmRestrictedMemoryAccess is retrieved during SMM initialization and cached value is used at runtime Signed-off-by: Sienski Piotr <piotr.sienski@intel.com>
2025-06-10OvmfPkg/PlatformBmPrintScLib: hint at Secure Boot verificationLaszlo Ersek1-2/+8
The UEFI spec 2.11 documents EFI_SECURITY_VIOLATION for both gBS->LoadImage() and gBS->StartImage() as > [Image was loaded and an ImageHandle was created with a valid > EFI_LOADED_IMAGE_PROTOCOL. However,] the current platform policy > specifies that the image should not be started. Additionally, the spec documents EFI_ACCESS_DENIED for gBS->LoadImage() as > Image was not loaded because the platform policy prohibits the image > from being loaded. NULL is returned in ImageHandle. When image loading/starting fails under the above conditions (according to the status code being reported), print a hint about Secure Boot. This should help users diagnose and fix their Secure Boot configuration. Updates: 77874ceebb118cd58f518cbf6bcb63f47c993ec0 Fixes: https://github.com/tianocore/edk2/issues/10901 Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2025-06-09NetworkPkg : Replace hardcoded value with existing #define constantSaloni Kasbekar1-1/+1
Use IP6_PREFIX_MAX instead of the hardcoded 128 value Signed-off-by: Saloni Kasbekar <saloni.kasbekar@intel.com>
2025-06-09MdeModulePkg/HiiDatabaseDxe: Fix NULL Pointer access from EfiVarStoreDeepakX Singh1-0/+5
Issue : When user access "Boot Maintenance Manager Menu/Secure Boot Configuration Menu" with PcdNullPointerDetectionPropertyMask|0x03 and PcdHeapGuardPageType|0x7FFF protection policy set, we get X64 Exception Type - 0E(#PF - Page-Fault) Root cause : When user access "Boot Maintenance Manager Menu/Secure Boot Configuration Menu", BIOS calls FindQuestionDefaultSetting function and send EFI VarStore header pointer to AuthFindVariableData function. When header pointer is NULL, it send NULL pointer to AuthFindVariableData function and causes the page fault. Fix : Database.c: In function FindQuestionDefaultSetting, added NULL pointers check, so that when EFI VarStore header argument is passed to AuthFindVariableData function, NULL pointer access will not happen. Test: Cross verified while accessing the "Boot Maintenance Manager Menu/ Secure Boot Configuration Menu" page. Signed-off-by: DeepakX Singh <deepakx.singh@intel.com>
2025-06-08ShellPkg: Prevent memcpy intrinsics in VS22 (17.14.2)Michael Kubacki2-30/+15
The latest VS2022 update replaces some code patterns with struct assignments with `memcpy`. This change convert the code to explicitly use `CopyMem`. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-06-08MdeModulePkg: Prevent memcpy intrinsics in VS22 (17.14.2)Michael Kubacki1-5/+3
The latest VS2022 update replaces some code patterns with struct assignments with `memcpy`. This change convert the code to explicitly use `CopyMem`. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-06-07BaseTools: Add support for mingw-w64Nate DeSimone18-206/+806
Adds support for building the C language BaseTools for Windows using toolchains based on mingw-w64. Mingw-w64 is a collection of header files, libraries, and tools that when combined with a compiler enable development of Windows software. Mingw-w64 is a fork of the original MinGW (Minimalist GNU for Windows). Most active development on MinGW has ceased and mingw-w64 is now the actively maintained successor. Mingw-w64 provides a libc implementation built on top of Microsoft's UCRT (Universal C Runtime) with all nessesary compiler bindings needed to support the C++11 feature set. Modern mingw-w64 development appears to have coalesced around MSYS2, which produces a distributions of both GCC and LLVM/Clang that use mingw-w64 to target the Windows OS. This MSYS2 Clang distribution has a UNIX-like directory layout and includes Windows binaries of GNU Make. Combined with the open source licensing, MSYS2's Clang distribution is a highly attractive choice as an alternative Windows SDK for open source projects such as TianoCore. If one wishes to use EDK II to build UEFI firmware on the Windows platform, then the C BaseTools need to be compiled as Windows applications. This includes the PcdValueInit.exe program, which needs to be recompiled every time a firmware build is run in order to regenerate the initial values for structured PCDs. Currently, BaseTools only supports the Visual C++ toolchain on the Windows platform. The following new features have been added to enable usage of the toolchains derived from mingw-w64: - Fixes to the BaseTools C source code to support the use of a GCC-style compiler on the Windows OS. - The GNU Make-style Makefiles for the C BaseTools have been modified to support Windows. Both GCC + mingw-w64 and Clang + mingw-w64 have been tested and confirmed to build a working BaseTools. - BaseTools now supports generating GNU Make-style Makefiles on the Windows platform for the purpose of building firmware. - edksetup.bat has been modified to optionally build BaseTools via mingw-w64. There is no impact to the existing support for Visual C++ and Visual C++ remains the default toolchain. Usage Instructions: For the vast majority of users, the only system setup change nessesary to use a mingw-w64 toolchain is to set the BASETOOLS_MINGW_PATH to the directory containing the desired mingw-w64 based toolchain. A new command line argument has been added to edksetup.bat: Mingw-w64 If this command line argument is set, then the script will set the BASETOOLS_MINGW_BUILD environment variable. The user can also opt to set this environment variable manually before running edksetup.bat If BASETOOLS_MINGW_BUILD is defined, then the BASETOOLS_MINGW_PATH environment variable must point to the directory containing the mingw-w64 toolchain. If CLANG_BIN is not defined and %BASETOOLS_MINGW_PATH%\bin\clang.exe exists, then edksetup.bat will set CLANG_BIN=%BASETOOLS_MINGW_PATH%\bin\ This removes the requirement to configure the CLANG_BIN environment variable manually in order to run a CLANGPDB or CLANGDWARF build if one has the MSYS2 Clang distribution installed. If one wishes to use a different copy of Clang (for example official LLVM binaries) to build firmware and only use the MSYS2 Clang to build BaseTools, then one can continue to set the CLANG_BIN environment variable, same as before. I have tested the MSYS2 Clang distribution against the official LLVM distribution and can confirm that if the compiler version is the same the emitted machine code is identical between the two. Interestingly, the MSYS2 Clang distribution emits the path to the PDB file using "/" as the path seperator instead of "\". That appears to be the only difference in output. Therefore, using the MSYS2 Clang distribution to compile firmware seems a reasonable choice. If CLANG_HOST_BIN is not defined and BASETOOLS_MINGW_BUILD is defined and %BASETOOLS_MINGW_PATH%\bin\mingw32-make.exe exists, then edksetup.bat will add %BASETOOLS_MINGW_PATH%\bin\ to the PATH and set CLANG_HOST_BIN=mingw32- This enable usage of the GNU Make included in the mingw-w64 toolchain to build firmware in addition to BaseTools. if BASETOOLS_MINGW_BUILD is not defined, edksetup.bat will continue to set CLANG_HOST_BIN=n, which uses nmake to build firmware. This behavior can be overridden by manually setting the value of CLANG_HOST_BIN before executing edksetup.bat if one wishes to use a specific Make utility for the CLANGPDB/CLANGDWARF toolchains. References: - https://www.mingw-w64.org/ - https://www.msys2.org/ Co-authored-by: Sandesh Jain <sandesh.jain@intel.com> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2025-06-07BaseTools: Add Unit Test Support for X64 BaseTools on WindowsNate DeSimone1-2/+2
Fixes a BaseTools Bin directory path detection bug in the the BaseTools Unit Tests. The script incorrectly assumes that sys.platform will be win64 on a 64-bit Python interperter. The "win64" platform string has not been used for 64-bit Python interperters since May 10, 2000: https://github.com/python/cpython/commit/da5cc82d Moreover, this patch was merged before the Python 2.0 release, so there never has been a released Python interperter that used the "win64" string. Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2025-06-07MdeModule: Update oniguruma to v6.9.10Rebecca Cran1-0/+0
Update MdeModulePkg/Universal/RegularExpressionDxe/oniguruma to the last upstream version, v6.9.10. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2025-06-06BaseTools: Add line number to PatchCheck error messagesGary Beihl1-2/+2
PatchCheck error messages can be improved by adding the line number. The line itself may consist of only whitespace for some errors. Adding the line number can help better locate the error source. Signed-off-by: Gary Beihl <garybeihl@microsoft.com>
2025-06-06ArmPkg/Include: fix usage of wrong macro in ArmGicv3Dxelevi.yun1-1/+1
To get a SPI_MAX_INTID, interrupt controller type Register should be masked with ARM_GIC_ICDICTR_GET_SPI_RANGE. However, since ARM_GIC_ICDICTR_SPI_RANGE_TO_MAX_INTID macro uses ARM_GIC_ICDICTR_GET_EXT_SPI_RANGE mask, it returns wrong SPI_MAX_INITID. This makes a failure of loading GenericWatchDog in FVP RevC model. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> Fixes: d6d2f68e3801 ("ArmPkg/Drivers/ArmGicDxe: ...")
2025-06-05ArmPkg: ArmStandaloneMmCoreEntryPoint: Use common UUID conversion routineKun Qin1-47/+1
As new interfaces are made available to support UUID-GUID conversion, this change is made to leverage new interfaces and remove the locally duplicated code. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-06-05MdeModulePkg: ArmFfaLib: Support UUID-GUID conversion interfacesKun Qin1-45/+2
This change moves the existing ConvertEfiGuidToUuid function to public interface to support newly defined functions prototypes. This change also adds the `ArmConvertUuidToEfiGuid` function implementation, which is an inverse of the original conversion. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-06-05MdePkg: BaseLib: Add UUID-GUID conversion functionKun Qin3-0/+217
With interactions between Standalone MM partitions and normal UEFI environment, there is constant need to convert UUID to GUID and back. This change added 2 new interfaces to BaseLib that support such usage. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-06-05MdeModulePkg/TpmMeasurementLibNull: Allow broader linkingMichael Kubacki2-2/+5
This is needed in a MM_CORE_STANDALONE module. Since this null instance is so simple, remove individual module types to allow it be integrated more easily. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-06-05MdeModulePkg/PciBusDxe: Free descriptor buffer in GetResourcePadding()Bret Barkelew3-14/+19
- Updated the PciGetBusRange function signature to use IN OUT for the Descriptors parameter. - Introduced a new DescriptorsBuffer variable in PciLib.c to temporarily hold descriptor data. - Clean up DescriptorsBuffer and set Descriptors to NULL after use. Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-06-04EmbeddedPkg: Fix a data error in commentGao Qihang1-1/+1
KEYBOARD_TIMER_INTERVAL is used as TriggerTime parameter of gBS->SetTimer() function. TriggerTime parameter represents the number of 100ns units, so number 500000 indicates 0.05s. Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-04StandaloneMmPkg/Core: try best to dispatch FVsRay Ni1-11/+12
Original logic skips to call MmDispatcher() when number of FV HOBs exceeds the max supported FVs even for the already-discovered FVs. Original logic skips to call MmDispatcher() and even skips to process other FVs when insufficient MM memory for shadowing a FV. For both cases, replace "return" with "continue" to try best to dispatch more FVs. Signed-off-by: Ray Ni <ray.ni@intel.com>
2025-06-04StandaloneMmPkg/Core: Improve debug messagesRay Ni1-20/+13
Refine debug output for better troubleshooting: 1. Consolidate FV address and size into one log message 2. Add function name to error messages for better traceability 3. Use AllocateCopyPool() instead of separate AllocatePool() and CopyMem() Signed-off-by: Ray Ni <ray.ni@intel.com>
2025-06-04StandaloneMmPkg/Core: Fix FV HOB loop by advancing with GET_NEXT_HOBRay Ni1-5/+6
Previously, MmDispatchFvs could enter an infinite loop if a Firmware Volume HOB with zero length was encountered, because GetNextHob() was called with the same FvHob pointer repeatedly. This patch fixes the issue by passing GET_NEXT_HOB(FvHob) to GetNextHob(), ensuring the loop advances to the next HOB and preventing hangs. Signed-off-by: Ray Ni <ray.ni@intel.com>
2025-06-03ArmPkg/Drivers/ArmGicDxe: Add Extended SPI support for GICv3Nick Graves5-199/+585
This commit enables extended SPI support for GicV3. GicV3 must decide, based on the source intid, whether to access the SPI-range registers, PPI-range registers in the redistributor, or the extended SPI-range registers. The protocol interfaces must also support registering an interrupt handler with an extended SPI intid. To save ~24KB of memory, handler allocation and access is delegated to GicV2 and GicV3. GicV2 retains the existing handler mapping scheme using intids literally. GicV3 remaps extended SPI intids to be immediately after the highest SPI intids. Tested on qemu with the BSA test suite. Signed-off-by: Nick Graves <nicholasgraves@google.com>
2025-06-03EmbeddedPkg: PrePiLib missing header used in fileDoug Flick1-0/+1
PrePiLib.h is missing the header file that defines the structures used in the file. For example: - EFI_PEI_FV_HANDLE - EFI_PEI_FILE_HANDLE Signed-off-by: Doug Flick <dougflick@microsoft.com>
2025-06-02EmbeddedPkg: delete ancient libfdt semi-integrationLeif Lindholm20-6895/+0
With all in-tree users migrated, finally delete this. Any out-of-tree users need to migrate to MdePkg BaseFdtLib. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-05-30ArmPkg: Add HobLib to ArmStandaloneMmCoreEntryPoint.Aaron Pop1-0/+1
ArmStandaloneMmCoreEntryPoint makes use of GetNextHob which comes from HobLib. The inf does not specify HobLib has one of its library classes. Specify HobLib in the LibraryClasses section of the inf. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-05-30ArmPlatformPkg: PL011SerialPort Empty Rx buffer during init.Chris Fernald1-9/+21
When calling to initialize the PL011 Uart, Rx buffer is not cleared. In a 16550 uart device, during initialization, the 16550's Fifo control registers would be used to clear the Rx buffer, but no such register exists on PL011. Modify the PL011 SerialPortInitialize function to clear anything that was in the Rx buffer after initialization is completed. This will prevent any stale data from being interpreted as valid data. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-05-30MdePkg/BaseFdtLib: fix declaration/definition misalignmentLeif Lindholm1-1/+1
Commit e25331fc4591 ("MdePkg,UefiPayloadPkg: clean up BaseFdtLib API confusion"), missed out aligning the wrapper for fdt_node_offset_by_property_value between heade and implementation. Fix this by updating the header to declare FdtNodeOffsetByPropValue instead of FdtNodeOffsetByPropertyValue. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-05-30MdePkg/BaseFdtLib: add a few new function wrappersLeif Lindholm2-0/+77
Add FdtSetPropString(), FdtDelNode() and FdtGetPath(). Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-05-29MdeModulePkg: Typedef ptrdiff_t to fix building with gcc 15.1Rebecca Cran1-0/+1
When building with gcc 15.1, building RegularExpressionDxe fails because it can't find the type ptrdiff_t. Therefore, add a typedef for it in OniguramaUefiPort.h. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2025-05-29RedfishPkg: Don't define bool type if building in C23 modeRebecca Cran1-8/+11
In C23 bool is a built-in type, so it's not necessary to typedef bool in RedfishCrtLib.h. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2025-05-29SecurityPkg: Don't define bool type if building in C23 modeRebecca Cran1-0/+3
In C23 bool is a built-in type, so it's not necessary to typedef bool in LibspdmStdBoolAlt.h. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2025-05-29NetworkPkg/HttpBootDxe: Wait for IPv6 DAD before issuing DHCPv6 requestsSam Tsai2-0/+85
Align HTTP Boot behavior with PXE by inserting a delay to wait for IPv6 Duplicate Address Detection (DAD) to complete before issuing DHCPv6 requests. This avoids EFI_NO_MAPPING errors caused by early DHCP attempts before a valid IPv6 address is ready. Problem: On some platforms, HTTP boot over IPv6 fails with EFI_NO_MAPPING during initial DHCPv6 attempts. The failure is due to the system trying to send Solicit messages before IPv6 DAD finishes, resulting in no usable IP address at that time. Solution: Insert a retry mechanism to poll DAD completion when the initial call to Dhcp6->Start() fails with EFI_NO_MAPPING. This behavior mirrors PXE's handling, where it waits for a valid IPv6 address to be assigned before retrying the DHCPv6 flow. Signed-off-by: Sam Tsai [Wiwynn] <sam_tsai@wiwynn.com>
2025-05-29ArmVirtPkg: fix boot under XenManos Pitsidianakis1-1/+1
When booting under Xen/Arm64 with a flattened devicetree, XenioFdtDxe.c performs a runtime assert on the size of the hypervisor node. At some point the hypervisor devicetree node changed size in upstream Xen, which makes booting under Xen impossible because the assertion fails: ASSERT [XenioFdtDxe] XenioFdtDxe.c(64): RegSize == 2 * sizeof (UINT64) By putting a debug print in InitializeXenioFdtDxe we can see the value of RegSize is 48, instead of 2 * sizeof (UINT64)=16. Change the equality check to equal or greater than (>=). Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2025-05-29SPDM related fix based on real hardware testing - SecurityPkgLiqi Qi3-3/+11
Implemented SPDM functionality on real hardware, and here is the bug fix in SecurityPkg. Signed-off-by: Liqi Qi <liqiqi@microsoft.com>
2025-05-28MdeModulePkg: Enable PciBus to handle CRS responses by ignoring the device.Michael Turner1-12/+23
If there is a slow device on the PCI Bus, and the HostBridge is programmed to allow CRS, the slow device may return 0x0001 to inform the config space reader of the Vendor Id that pci device is not ready. The current PciBus enumerator will treat 0001 as a valid Vendor Id, but it is not. It indicates that all other config space is invalid. This code changes that operation to skip slow devices. PCI EXPRESS BASE SPECIFICATION, REV. 3.1 section 2.3.1 Request Handling Rules. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-05-28ArmPlatformPkg/Sec: Re-use SetupExceptionLevel1 when running VHE at EL2Ard Biesheuvel1-6/+4
Given that CPACR_EL1 is aliased to CPTR_EL2 when running at EL2 with VHE enabled, we can just fall back to SetupExceptionLevel1() instead of fiddling with the init values for CPTR_EL2. While at it, use the existing define to refer to the E2H bit in HCR_EL2. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-05-28ArmPlatformPkg/Sec: Simplify SetupExceptionLevel1() using a tail callArd Biesheuvel1-5/+1
Avoid a call and use a jump instead, so that the LR value does not need to be recorded in a different register. This is generally neater, but it also avoids potential confusion in the debugger, given that no frame record is created for this call. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-05-28ArmPlatformPkg/Sec: Remove EL1 timer setup when booting at EL2Ard Biesheuvel2-15/+0
Even though the UEFI spec mentions that the EL1PCTEN and EL1PCEN bits in CNTHCTL_EL2 must be set, this is not a requirement that applies to the UEFI implementation, but a requirement that applies to the firmware running at EL2 in cases where UEFI executes at EL1. (Note that the same paragraphs mentions that CNTFRQ must be programmed with the timer frequency, and this is only permitted at EL3). Setting these bits has no effect when executing at EL2, and it is the OS's job to reason about how to configure lower exception levels. So drop the initialization of CNTHCTL_EL2. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-05-28DynamicTablesPkg/Library: support TPM2 ACPI table generationlevi.yun1-4/+16
TPM2 ACPI table revision 5 add CRB interface with FF-A method. This patch supports generation of TPM2 ACPI table revision 5 with this method. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-05-28MdePkg/IndustryStandard: update Tpm2Acpi table to revision 5levi.yun1-3/+30
Tpm2AcpiTable revision 5 adds new START_METHOD with Arm FF-A transfer. add related information and update its generator. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>