]> git.proxmox.com Git - mirror_edk2.git/commit
UefiPayloadPkg: Add HobLib for UniversalPayload
authorZhiguang Liu <zhiguang.liu@intel.com>
Fri, 7 May 2021 05:34:20 +0000 (13:34 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 24 Jun 2021 09:16:22 +0000 (09:16 +0000)
commit82f727c4af3289e7765b36e9c55c57cc61de4065
tree2c89c48a1d49b933bb34a338ef55de8d4465763c
parent12e34cd2f7900578ee83cb01b8f1696a7bb7511b
UefiPayloadPkg: Add HobLib for UniversalPayload

For payload entry, use PayloadEntryHobLib as HobLib and payload entry
should initialize hob base.
For DxeCore, use new added DxeHobLib as HobLib, and DxeCore will
initialize hob base.
For Dxe Driver, use new added DxeHobLib as HobLib, and use DxeHobListLib
to initialize hob base.

Adding a new library DxeHobLib + DxeHobListLib instead of using the
DxeHobLib.inf in MdePkg is because the constructor needed be separated
from DxeHobLib.
If not, when building UefiPayloadPkg, the dependency chain is as below:
DebugLib -> SerialPortLib -> PlatformHookLib -> HobLib -> DebugLib
Each library has a constructor, and this becomes a constructor circle.
To break the circle, separate the constructor from the HobLib as a new
DxeHobListLib, which won't depend on DebugLib.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Signed-off-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
13 files changed:
UefiPayloadPkg/Include/Library/DxeHobListLib.h [new file with mode: 0644]
UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf [new file with mode: 0644]
UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.uni [new file with mode: 0644]
UefiPayloadPkg/Library/DxeHobLib/HobLib.c [new file with mode: 0644]
UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.c [new file with mode: 0644]
UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf [new file with mode: 0644]
UefiPayloadPkg/Library/DxeHobListLibNull/DxeHobListLibNull.c [new file with mode: 0644]
UefiPayloadPkg/Library/DxeHobListLibNull/DxeHobListLibNull.inf [new file with mode: 0644]
UefiPayloadPkg/Library/HobLib/Hob.c [deleted file]
UefiPayloadPkg/Library/HobLib/HobLib.inf [deleted file]
UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c [new file with mode: 0644]
UefiPayloadPkg/Library/PayloadEntryHobLib/HobLib.inf [new file with mode: 0644]
UefiPayloadPkg/UefiPayloadPkg.dsc