summaryrefslogtreecommitdiff
path: root/UefiPayloadPkg
AgeCommit message (Collapse)AuthorFilesLines
2026-07-21UefiPayloadPkg/DxeHobLib: Add lazy initialization for gHobListJared Pan2-1/+11
This change adds dynamic initialization of gHobList in GetHobList() to handle cases where library constructors are executed before DxeHobListLibConstructor. Issue: On ARM platforms using ArmMmuBaseLib, the ArmMmuBaseLibConstructor calls GetFirstGuidHob() before xeHobListLibConstructor has initialized gHobList, causing an ASSERT. Root Cause: ArmMmuBaseLib's constructor uses HobLib functions, but UefiPayloadPkg's DxeHobLib assumes gHobList is already initialized by DxeHobListLib's constructor. Solution: Add the same lazy initialization pattern already used in MdePkg/Library/DxeHobLib, which dynamically retrieves the HOB list from the System Configuration Table if gHobList is NULL. This change: - Aligns behavior with MdePkg/Library/DxeHobLib - Has no impact on existing functionality - Improves robustness for ARM platforms Signed-off-by: Jared Pan <jared.pan@dell.com>
2026-07-21UefiPayloadPkg: Resolve GptLib library classRichard Lyu1-0/+2
GptLib is a new library class consumed both by PartitionDxe (built by essentially every platform) and by DxeTpm2MeasureBootLib. Any platform DSC that builds either module must resolve the GptLib library class, otherwise the build fails with "Instance of library class [GptLib] is not found". Resolve GptLib in UefiPayloadPkg/UefiPayloadPkg.dsc, which builds PartitionDxe. Out-of-tree platforms consuming either module need the same one-line resolution. Signed-off-by: Richard Lyu <richard.lyu@suse.com>
2026-07-14UefiPayloadPkg: Fix incorrect EfiPciWidth* enum literalsMingjie Shen1-5/+5
In arguments of EFI_PCI_IO_PROTOCOL member functions, replace the EfiPciWidth* enum literals from EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH with the matching EfiPciIoWidth* values from EFI_PCI_IO_PROTOCOL_WIDTH. This keeps the call sites aligned with the protocol they actually use. The old values were copied from EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL code, so they obscured the intent of the calls and relied on an explicit cast. This mimics commit 8ba64a9a9417 ("UefiPayloadPkg: Fix build failure with CLANGPDB"). Generated by coccinelle script. ``` smpl @initialize:python@ @@ def to_pci_io_width(name): return name.replace("EfiPciWidth", "EfiPciIoWidth", 1) @normalize@ typedef EFI_PCI_IO_PROTOCOL; typedef EDKII_PCI_DEVICE_PPI; type T =~ "^EFI_PCI_IO_PROTOCOL_WIDTH$"; EFI_PCI_IO_PROTOCOL *x; EDKII_PCI_DEVICE_PPI *y; identifier bad =~ "EfiPciWidth(Uint|FifoUint|FillUint)(8|16|32|64)"; identifier top_op =~ "^(PollMem|PollIo|CopyMem)$"; identifier space =~ "^(Mem|Io|Pci)$"; identifier rw =~ "^(Read|Write)$"; fresh identifier good = script:python(bad) { to_pci_io_width(bad) }; expression first; expression list rest; @@ ( x->top_op | y->PciIo.top_op | x->space.rw | y->PciIo.space.rw ) ( first, - (T)bad + good , rest ) ``` Verified with: - `build -p UefiPayloadPkg/UefiPayloadPkg.dsc -a IA32 -a X64 -b DEBUG -t GCC -D BOOTLOADER=SBL` - temporary IA32 PEIM harness that compiled X86_BuildFdtLib.c Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2026-07-13UefiPayloadPkg: Fix AARCH64's ResetSystemLib class definitionBenjamin Doron1-1/+2
This library class is called ResetSystemLib, not EfiResetSystemLib. Fix this, making resets generated by UEFI and through the runtime service work as expected. Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
2026-06-09UefiPayloadPkg: Replace manual alignment checks with helper macrosMingjie Shen3-10/+10
Replace manual alignment checks with IS_ALIGNED() and ADDRESS_IS_ALIGNED(). Convert the following bitmask and modulo forms: - ((E & ((PowOf2Expr) - ONE)) == ZERO) - ((E & ((PowOf2Expr) - ONE)) != ZERO) - ((E % (PowOf2Expr)) == ZERO) - ((E % (PowOf2Expr)) != ZERO) to the corresponding helper macro forms: + IS_ALIGNED (E, PowOf2Expr) + !IS_ALIGNED (E, PowOf2Expr) PowOf2Expr is limited to known power-of-two expressions, including SIZE_* and BASE_* macros, EFI_PAGE_SIZE, CPU_STACK_ALIGNMENT, RUNTIME_PAGE_ALLOCATION_GRANULARITY, sizeof() of UEFI integer types (e.g. BOOLEAN, CHAR16, UINT32, UINTN) and pointer types, and 1 << E1 expressions. Address checks that cast the checked value to UINTN are written with ADDRESS_IS_ALIGNED(). The change was generated with the Coccinelle semantic patch below. ```smpl @power_of_2_expr@ expression PowOf2Expr; expression E1; typedef BOOLEAN, CHAR8, CHAR16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, INTN, UINTN; type ScalarType = { BOOLEAN, CHAR8, CHAR16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, INTN, UINTN }; type AnyType; type PointerType = AnyType *; idexpression ScalarType ScalarValue; idexpression PointerType PointerValue; constant SizeBase =~ "^(SIZE|BASE)_(1|2|4|8|16|32|64|128|256|512)[KMGTPE]B$"; constant NamedPowerOf2 =~ "^(EFI_PAGE_SIZE|CPU_STACK_ALIGNMENT|RUNTIME_PAGE_ALLOCATION_GRANULARITY)$"; constant ONE = {1, 1U, 1u}; @@ ( ( SizeBase | NamedPowerOf2 | ONE << E1 | sizeof (ScalarType) | sizeof (PointerType) | sizeof (ScalarValue) | sizeof (PointerValue) ) & PowOf2Expr ) @aligned depends on power_of_2_expr disable is_zero,isnt_zero@ expression E; expression power_of_2_expr.PowOf2Expr; constant ONE = {1, 1U, 1u}; constant ZERO = {0, 0U, 0u}; @@ ( ((E & (E - ONE)) == ZERO) | - ((E & ((PowOf2Expr) - ONE)) == ZERO) + IS_ALIGNED (E, PowOf2Expr) | ((E & (E - ONE)) != ZERO) | - ((E & ((PowOf2Expr) - ONE)) != ZERO) + !IS_ALIGNED (E, PowOf2Expr) | - ((E % (PowOf2Expr)) == ZERO) + IS_ALIGNED (E, PowOf2Expr) | - ((E % (PowOf2Expr)) != ZERO) + !IS_ALIGNED (E, PowOf2Expr) ) @address_is_aligned@ typedef UINTN; expression *Address; expression Alignment; @@ - IS_ALIGNED ((UINTN) Address, Alignment) + ADDRESS_IS_ALIGNED (Address, Alignment) @normalize_aligned disable paren expression@ expression E, SZ; @@ ( - (IS_ALIGNED (E, SZ)) + IS_ALIGNED (E, SZ) | - (!IS_ALIGNED (E, SZ)) + !IS_ALIGNED (E, SZ) ) @normalize_macro_args disable paren expression@ expression E, SZ; @@ ( - IS_ALIGNED ((E), SZ) + IS_ALIGNED (E, SZ) | - IS_ALIGNED (E, (SZ)) + IS_ALIGNED (E, SZ) ) ``` Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2026-05-28Global: Merge DefaultExceptionHandlerLib into CpuExceptionHandlerLibVishal Oliyil Kunnil1-1/+0
Merge DefaultExceptionHandlerLib into CpuExceptionHandlerLib. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
2026-05-28Global: Merge ArmExceptionLib into CpuExceptionHandlerLibVishal Oliyil Kunnil1-1/+3
Merge ArmExceptionLib into CpuExceptionHandlerLib. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
2026-04-29UefiPayloadPkg: Remove duplicate library and file name in INF fileQihang Gao2-2/+0
In SpiFlashLib driver, BaseLib appears twice in [LibraryClasses] section, so remove the duplicate one. In PayloadLoaderPeim driver, ElfLib/ElfLibInternal.h appears twice in [Sources] section, so remove the duplicate one. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-04-17Global: Move ArmLib to MdePkgOliver Smith-Denny1-1/+1
Per https://edk2.groups.io/g/devel/topic/move_armlib_to_baselib/118541649, this commit moves ArmLib to MdePkg and updates all consumers. The only change to ArmLib itself is to remove ArmPkg.dec from the inf. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-02-25UefiPayloadPkg: Remove PcdMrIovSupport - deprecated in PCIe 6.0Jacek Kolakowski1-1/+0
MR-IOV was actually not used in MdeModulePkg and it has been deprecated in PCIe 6.0 specification, so remove it. Signed-off-by: Jacek Kolakowski <Jacek.Kolakowski@intel.com>
2026-02-25UefiPayloadPkg: Add platform limit for size in Resizable BARJacek Kolakowski1-0/+1
Add PcdPcieResizableBarMaxSize to UefiPayloadPkg so that it can be also controlled with a configuration knob. Signed-off-by: Jacek Kolakowski <Jacek.Kolakowski@intel.com>
2026-02-24UefiPayloadPkg: Replace include guards with #pragma onceMichael Kubacki47-184/+49
Replace traditional `#ifndef`/`#define`/`#endif` include guards with `#pragma` once. `#pragma once` is a widely supported preprocessor directive that prevents header files from being included multiple times. It is supported by all toolchains used to build edk2: GCC, Clang/LLVM, and MSVC. Compared to macro-based include guards, `#pragma once`: - Eliminates the risk of macro name collisions or copy/paste errors where two headers inadvertently use the same guard macro. - Eliminate inconsistency in the way include guard macros are named (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.). - Reduces boilerplate (three lines replaced by one). - Avoids polluting the macro namespace with guard symbols. - Can improve build times as the preprocessor can skip re-opening the file entirely, rather than re-reading it to find the matching `#endif` ("multiple-include optimization"). - Note that some compilers may already optimize traditional include guards, by recognzining the idiomatic pattern. This change is made acknowledging that overall portability of the code will technically be reduced, as `#pragma once` is not part of the C/C++ standards. However, this is considered acceptable given: 1. edk2 already defines a subset of supported compilers in BaseTools/Conf/tools_def.template, all of which have supported `#pragma once` for over two decades. 2. There have been concerns raised to the project about inconsistent include guard naming and potential macro collisions. Approximate compiler support dates: - MSVC: Supported since Visual C++ 4.2 (1996) - GCC: Supported since 3.4 (2004) (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html) - Clang (LLVM based): Since initial release in 2007 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-02-10UefiPayloadPkg: Update wiki linksMichael Kubacki2-2/+3
The wiki has moved and this change updates links in UefiPayloadPkg to refer to the new location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: https://github.com/tianocore/edk2/discussions/11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-01-26UefiPayloadPkg: UniversalPayloadBuild.py -l add support for various basesXiang W1-1/+1
Hexadecimal is more convenient when using this script, so add various number bases support Signed-off-by: Xiang W <wangxiang@iscas.ac.cn>
2026-01-26UefiPayloadPkg: MkFitImage.py removes extra spacesXiang W1-8/+8
The `fit` file generated by `MkFitImage.py` outputs a warning when processed by the dtc. This issue has be fixed. Signed-off-by: Xiang W <wangxiang@iscas.ac.cn>
2026-01-23UefiPayloadPkg: Fix build failure with CLANGPDBKhalid Ali1-5/+5
EFI_PCI_IO_PROTOCOL->Pci services (Read and Write) take EFI_PCI_IO_PROTOCOL_WIDTH as second argument. However in PciPlatformDxe enum argument of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH is usedwhich caused build to fail. Use EfiPciWidthUint32 which is enum member of EFI_PCI_IO_PROTOCOL_WIDTH. Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com>
2026-01-21UefiPayloadPkg: Add PCD to control PCI DMA memory above 4GBAjan Zhong4-1/+8
PCI Root Bridge is allowed to allocate DMA memory below 4GB by default, this policy does not applicable to all platform. For instance, QEMU SBSA refernce platform configure system memory base to be 0x10000000000, it makes all available memory resides above 0x10000000000. To make DmaAbove4G member of structure RootBridge flexible, use PCD to control behavior of DmaAbove4G. Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2026-01-21UefiPayloadPkg: Remove fixed serial port settings for AARCH64Ajan Zhong1-5/+1
Remove fixed serial port settings, it allows serial port settings can be configured by bootloader to adapt actual platform hardware configuration. Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2026-01-21UefiPayloadPkg: Fix build failure with GCCKhalid Ali1-1/+1
Add missing EFIAPI to BL_CAPSULE_CALLBACK to fix build issue. Fixes: cc149a8e Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com>
2026-01-21UefiPayloadPkg: Simplify UefiPayloadEntry for X64Xiang W2-133/+1
There are multiple implementations of HandOffToDxeCore; remove one. Signed-off-by: Xiang W <wangxiang@iscas.ac.cn>
2026-01-21UefiPayloadPkg: Simplify UefiPayloadEntry for Ia32Xiang W3-538/+1
Remove unused functions. There are multiple implementations of HandOffToDxeCore; remove one. Signed-off-by: Xiang W <wangxiang@iscas.ac.cn>
2026-01-15UefiPayloadPkg: Support CLANGPDB AARCH64Oliver Smith-Denny3-3/+3
UefiPayloadPkg needed two fixes for CLANGPDB AARCH64: - Don't use the tiny code model for CLANGPDB, it is not supported. This is only for CI build anyway. - CLANGPDB caught that there were undefined references to a function in the entry, this was because in the non-Fit entry point INFs, they were still including the AARCH64 Fit entry point files, which are not needed. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-12-24BaseTools,UefiPayloadPkg: Replace deprecated R_AARCH64_NONE valueArd Biesheuvel1-1/+1
For nebulous reasons, the original ELF psABI deviated from common sense, and decided to #define R_AARCH64_NONE as '256', in spite of the fact that no other architecture uses anything other than 0x0. This has now been fixed in the psABI, so fix it in our code as well. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-12-12UefiPayloadPkg: Remove unused variable to fix build errorAjan Zhong1-13/+1
Variable ChildBusAddress is not used in function ParsePciRootBridge, it triggers build error on GCC version gcc version 13.3.0. Remove this variable to fix build error. Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2025-12-12UefiPayloadPkg: Setup temporary GDT for x64 UniversalPayloadAjan Zhong1-5/+34
Separate Exception Stacks has been enabled by default in commit [1], in this case, TSS will be appended to original GDT. As secondary bootloader, UniversalPayload solution has different boot flow from original EDK2. When DxeMain tries to append TSS after original GDT, the original GDT is empty. It leads to system reboot when DxeMain tries to install new GDT which is appended with TSS. To fix this issue, set up temporary GDT with 64-bit code and data descriptors. [1] https://github.com/tianocore/edk2/commit/cec2c6 Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2025-11-24UefiPayloadPkg: Do not allocate hobs from reserved memoryDhaval1-1/+6
With certain combinations of memory when special-purpose memory shows up first during the parsing, it is used for HOB creation and other UEFI memory map requirements which is not desired. So now we check if the parent node is reserved node, do not use it for HOB. Signed-off-by: Akshay Behl <cap2k4@rivosinc.com> Co-authored-by: Dhaval Sharma <dhaval@rivosinc.com>
2025-11-24UefiPayloadPkg: Fdtparserlib: Enable above 4G supportAkshay Behl1-2/+85
Add support to check the DMA ranges to determine support for DMA above 4G. This change implements parsing of the "dma-ranges" property from the device tree. Reference: https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#dma-ranges Signed-off-by: Akshay Behl <cap2k4@rivosinc.com> Co-authored-by: Dhaval Sharma <dhaval@rivosinc.com>
2025-11-22UefiPayloadPkg: UefiPayloadEntry: Consume designated MemoryAllocationLibKun Qin5-252/+4
This change updates the UefiPayloadEntry modules to consume the memory allocation logic through the MemoryAllocationLib. This will allow other library classes to consume the same logic through standard defined memory allocation routines. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-11-22UefiPayloadPkg: PayloadEntryMemoryAllocationLib: Create allocation libraryKun Qin3-0/+290
This change creates a new library instance for UefiPayloadPkg. The implementation is inherited from UefiPayloadEntry. It will allow the UefiPayloadEntry to consume memory allocation logic from this instance instead of its own carried copy. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-11-22UefiPayloadPkg: PayloadEntryHobLib: Move HobLib to use helper interfaceKun Qin2-57/+3
This change updates the HobLib for UefiPayloadPkg to use the newly introduced hob creation interface. It also pave ways to separate the memory allocation logic into its designated library classes. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-11-22UefiPayloadPkg: PayloadEntryHelperLib: Adding new helper libraryKun Qin5-0/+142
This is a newly added helper library to help providing utilities common to UefiPayloadPkg. This change will pave ways to separating standard services such as "MemoryAllocation" into its own library classes. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-11-22UefiPayloadPkg: fix various typosPhilipp Schuster4-22/+22
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2025-09-26UefiPayloadPkg: Drop ARM32 SupportOliver Smith-Denny6-16/+0
edk2 is dropping support for the ARM32 architecture. This commit removes ARM32 support from UefiPayloadPkg. It removes irrelevant VALID_ARCHITECTURES comments from infs that are not arch specific. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-08-27UefiPayloadPkg: RISCV: Licensing FixAkshay Behl1-3/+3
Fixing a licensing typo in UefiPayloadEntry/RiscV64/DxeLoadFuncFit.c Signed-off-by: Akshay Behl <cap2k4@rivosinc.com>
2025-08-27UefiPayloadPkg: update stack address print to 64 bitDhaval3-3/+3
Signed-off-by: Akshay Behl <cap2k4@rivosinc.com> Co-authored-by: Dhaval Sharma <dhaval@rivosinc.com>
2025-08-25UefiPayloadPkg/FmpDeviceSmmLib: Add for full chip flashing via SMMSTOREv2Sergii Dmytruk4-1/+1210
Part of the functions of the library are left unimplemented (return EFI_UNSUPPORTED) the rest use information about current firmware obtained from CBMEM (at this point available in a HOB) and SMMSTOREv2 to perform flashing. Flashing is slightly optimized: FmpDeviceSetImageWithStatus() first reads a block and checks that it differs from the new contents before initiating erase and write. On successful flashing runtime APIs for dealing with EFI variables are replaced with stubs to prevent accesses to SMMSTORE from the currently running firmware. The SMMSTORE region's contents and possibly location and size have been changed as a result of the update and continued use of it can have unpredictable consequences including corruption of the newly written firmware image. A capsule mode always ends with a reboot, so the variable services are unavailable only for a very short period after a successful flashing. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25UefiPayloadPkg/SmmStore: Add API to read/write/erase any flash blockSergii Dmytruk3-21/+208
This allows reusing SMMSTORE protocol for the purpose of firmware updates. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25UefiPayloadPkg/UefiPayloadPkg.dsc: Enable FMP updatesSergii Dmytruk1-1/+35
This is using test certificate stored in this repository. Building additionally requires setting CAPSULE_FIRMWARE_GUID to firmware GUID in string form. FDF file is not updated because FMP driver is to be embedded into update capsule. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25UefiPayloadPkg: Enable processing of capsulesSergii Dmytruk8-2/+93
Make UefiPayloadPkg.dsc add required libraries/DXEs/PCDs when CAPSULE_SUPPORT define is set to TRUE. UefiPayloadEntry now parses firmware information from a bootloader and switches boot mode to BOOT_ON_FLASH_UPDATE if there are any capsules. It's not guarded by any PCD under the assumption that bootloader won't pass capsules if EDK shouldn't be handling them. EsrtDxe is enabled to manage ESRT entries and it consumes the firmware information HOB created by UefiPayloadEntry. ProcessCapsules() internally looks up EsrtManagementProtocol and calls SyncEsrtFmp() to import data from available FMP instances. PlatformBootManagerLib was made to call ProcessCapsules() twice: before and after end-of-DXE. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25UefiPayloadPkg/UefiPayloadEntry: Import update capsules from bootloaderSergii Dmytruk6-0/+127
The implementation is for CbParseLib, SblParseLib returns success while doing nothing. The HOBs created by BuildCvHob() will be eventually picked up and processed in DXE phase by MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c Because multiple capsules can be chained (simply by placing them one after another), coreboot passes them as a single memory range which can provide tenths of capsules. coreboot won't pass any capsules unless it finds CapsuleUpdateData* EFI variables and is able to parse memory ranges they point to as scatter-gather lists of pages containing capsules. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25UefiPayloadPkg/BlSupportDxe: Publish ESRT with an entry for system firmwareSergii Dmytruk3-0/+34
Use firmware information passed by a bootloader and parsed by BlParseLib to make a single-element ESRT. This informs operating systems and EDK itself about which capsules are applicable for the current firmware. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25UefiPayloadPkg/BlParseLib: Add parsing of firmware infoSergii Dmytruk7-0/+157
The implementation is for CbParseLib, SblParseLib returns an error. coreboot's CB_TAG_FW_INFO is a machine-friendly version of a system firmware component. A component is identified by a GUID. This is meant to be primarily a source of information for ESRT. The following coreboot options translate directly into fields of the structure with information: - CONFIG_DRIVERS_EFI_MAIN_FW_GUID - CONFIG_DRIVERS_EFI_MAIN_FW_VERSION - CONFIG_DRIVERS_EFI_MAIN_FW_LSV - CONFIG_ROM_SIZE The first 3 options depend on CONFIG_DRIVERS_EFI_FW_INFO. Version as a string depends on CONFIG_LOCALVERSION as well as version of the code base (misnamed as KERNELVERSION in coreboot's build system). Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25UefiPayloadPkg/SblParseLib.inf: Add missing GUIDsSergii Dmytruk1-0/+2
They are used in SblParseLib.c (ParseSmbiosTable() and ParseAcpiTableInfo() functions) but weren't declared as such. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.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-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-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-08UefiPayloadPkg: Remove UGA supportGuoMinJ3-4/+1
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>
2025-07-08UefiPayloadPkg: Don't Allocate Page 0Oliver Smith-Denny5-98/+0
UefiPayloadPkg 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>
2025-07-05UefiPayloadPkg: Add BlSupportDxe AArch64 supportAjan Zhong2-0/+109
Introduce AArch64 architecture support in BlSupportDxe. Translation table would be created based on the memory maps, which is provided by bootloader, in case MMU is disabled when execution is handed over to Universal Payload. Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2025-07-05UefiPayloadPkg: Add Architecture layer to support multiple architecturesAjan Zhong4-84/+128
Move IA32 and X64 architectures specified code to corresponding files. Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>