summaryrefslogtreecommitdiffstats
path: root/UefiPayloadPkg/UefiPayloadEntry
diff options
context:
space:
mode:
authorGuo Dong <guo.dong@intel.com>2021-06-30 15:08:22 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-07-01 21:27:07 +0000
commitfea7901dba72eeac526f3ef12a4ad4c539622373 (patch)
tree765487414eb97dde7d7dbf4bd7eb83bd8179c312 /UefiPayloadPkg/UefiPayloadEntry
parent8697dc60cc28b2673aed4998fb6b21b9bf54a76d (diff)
downloadedk2-fea7901dba72eeac526f3ef12a4ad4c539622373.tar.gz
edk2-fea7901dba72eeac526f3ef12a4ad4c539622373.tar.bz2
edk2-fea7901dba72eeac526f3ef12a4ad4c539622373.zip
UefiPayloadPkg: Fix the build failure
For non-universal payload, HandoffHobTable is used without initialization. This patch fixed this failure. Cc: Benjamin You <benjamin.you@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> Signed-off-by: Guo Dong <guo.dong@intel.com>
Diffstat (limited to 'UefiPayloadPkg/UefiPayloadEntry')
-rw-r--r--UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c3
-rw-r--r--UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c4
2 files changed, 2 insertions, 5 deletions
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
index ed956c447c..ae16f25c7c 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
@@ -559,7 +559,6 @@ PayloadEntry (
{
EFI_STATUS Status;
PHYSICAL_ADDRESS DxeCoreEntryPoint;
- EFI_HOB_HANDOFF_INFO_TABLE *HandoffHobTable;
UINTN MemBase;
UINTN HobMemBase;
UINTN HobMemTop;
@@ -603,7 +602,7 @@ PayloadEntry (
IoWrite8 (LEGACY_8259_MASK_REGISTER_MASTER, 0xFF);
IoWrite8 (LEGACY_8259_MASK_REGISTER_SLAVE, 0xFF);
- Hob.HandoffInformationTable = HandoffHobTable;
+ Hob.HandoffInformationTable = (EFI_HOB_HANDOFF_INFO_TABLE *) GetFirstHob(EFI_HOB_TYPE_HANDOFF);
HandOffToDxeCore (DxeCoreEntryPoint, Hob);
// Should not get here
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c
index a67653eb11..7a00a56ab9 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c
@@ -364,7 +364,6 @@ _ModuleEntryPoint (
{
EFI_STATUS Status;
PHYSICAL_ADDRESS DxeCoreEntryPoint;
- EFI_HOB_HANDOFF_INFO_TABLE *HandoffHobTable;
EFI_PEI_HOB_POINTERS Hob;
EFI_FIRMWARE_VOLUME_HEADER *DxeFv;
@@ -393,8 +392,7 @@ _ModuleEntryPoint (
IoWrite8 (LEGACY_8259_MASK_REGISTER_MASTER, 0xFF);
IoWrite8 (LEGACY_8259_MASK_REGISTER_SLAVE, 0xFF);
- HandoffHobTable = (EFI_HOB_HANDOFF_INFO_TABLE *) GetFirstHob(EFI_HOB_TYPE_HANDOFF);
- Hob.HandoffInformationTable = HandoffHobTable;
+ Hob.HandoffInformationTable = (EFI_HOB_HANDOFF_INFO_TABLE *) GetFirstHob(EFI_HOB_TYPE_HANDOFF);
HandOffToDxeCore (DxeCoreEntryPoint, Hob);
// Should not get here