Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: a933771361883455245d42e8c77fe7a0ed7eb083
      
https://github.com/tianocore/edk2/commit/a933771361883455245d42e8c77fe7a0ed7eb083
  Author: Jared Pan <[email protected]>
  Date:   2026-07-21 (Tue, 21 Jul 2026)

  Changed paths:
    M UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
    M UefiPayloadPkg/Library/DxeHobLib/HobLib.c

  Log Message:
  -----------
  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 <[email protected]>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to