diff options
| author | Jared Pan <jared.pan@dell.com> | 2026-06-23 12:01:17 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-07-21 05:14:02 +0300 |
| commit | a933771361883455245d42e8c77fe7a0ed7eb083 (patch) | |
| tree | e587926ff71b7fd70102fd4f193e06384a74a755 /MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c | |
| parent | f539e44fe447e980aa608111716f64030bbb3934 (diff) | |
| download | edk2-a933771361883455245d42e8c77fe7a0ed7eb083.tar.xz | |
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>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c')
0 files changed, 0 insertions, 0 deletions
