edk2/UefiPayloadPkg/Library
Jared Pan a933771361 UefiPayloadPkg/DxeHobLib: Add lazy initialization for gHobList
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-21 02:14:02 +00:00
..
AcpiTimerLib UefiPayloadPkg: Move FADT check to consumer coode. 2024-09-16 16:34:04 +00:00
BaseSerialPortLibHob UefiPayloadPkg: Support Debug function when Hob was not available. 2024-08-28 11:39:12 +00:00
BuildFdtLib UefiPayloadPkg: Fix incorrect EfiPciWidth* enum literals 2026-07-14 00:06:22 +00:00
CbParseLib UefiPayloadPkg/UefiPayloadEntry: Import update capsules from bootloader 2025-08-25 11:54:17 +00:00
CbSerialPortLib UefiPayloadPkg: Add support for logging to CBMEM console 2022-07-27 20:54:35 +00:00
CustomFdtNodeParserLib UefiPayloadPkg: Update FDT parser logic for unaligned data access 2024-12-09 02:23:28 +00:00
CustomFdtNodeParserNullLib UefiPayloadPkg: Add FDT Paser relative LIBs. 2024-08-28 11:39:12 +00:00
DebugPrintErrorLevelLibHob UefiPayloadPkg: Support Debug function when Hob was not available. 2024-08-28 11:39:12 +00:00
DxeHobLib UefiPayloadPkg/DxeHobLib: Add lazy initialization for gHobList 2026-07-21 02:14:02 +00:00
DxeHobListLib UefiPayloadPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeHobListLibNull UefiPayloadPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FdtParserLib UefiPayloadPkg: Add PCD to control PCI DMA memory above 4GB 2026-01-21 11:29:41 +00:00
FlashDeviceLib UefiPayloadPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FmpDeviceSmmLib UefiPayloadPkg: Drop ARM32 Support 2025-09-25 22:04:10 +00:00
HobParseLib UniversalPayload: Add RISC-V support for UPL PCDs 2024-09-14 03:38:47 +00:00
PayloadEntryHelperLib UefiPayloadPkg: PayloadEntryHelperLib: Adding new helper library 2025-11-22 10:19:48 +00:00
PayloadEntryHobLib UefiPayloadPkg: Replace manual alignment checks with helper macros 2026-06-09 07:20:10 +00:00
PayloadEntryMemoryAllocationLib UefiPayloadPkg: PayloadEntryMemoryAllocationLib: Create allocation library 2025-11-22 10:19:48 +00:00
PciHostBridgeLib UefiPayloadPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
PciSegmentInfoLibAcpiBoardInfo UefiPayloadPkg: Add AARCH64 support 2025-02-24 12:31:47 +00:00
PlatformBootManagerLib UefiPayloadPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
PlatformHookLib UefiPayloadPkg: Add AARCH64 support 2025-02-24 12:31:47 +00:00
PlatformSupportLibNull UefiPayloadPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ResetSystemLib UefiPayloadPkg: Move FADT check to consumer coode. 2024-09-16 16:34:04 +00:00
SblParseLib UefiPayloadPkg/UefiPayloadEntry: Import update capsules from bootloader 2025-08-25 11:54:17 +00:00
SmmStoreLib UefiPayloadPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
SpiFlashLib UefiPayloadPkg: Replace manual alignment checks with helper macros 2026-06-09 07:20:10 +00:00