From: "Guo Dong" <guo.dong@intel.com>
To: devel@edk2.groups.io
Cc: maurice.ma@intel.com, benjamin.you@intel.com
Subject: [edk2-devel] [PATCH] UefiPayloadPkg: Fix the build failure
Date: Wed, 30 Jun 2021 15:50:36 -0700 [thread overview]
Message-ID: <20210630225036.34272-1-guo.dong@intel.com> (raw)
For non-universal payload, HandoffHobTable is used without initialization.
This patch fixed this failure.
Signed-off-by: Guo Dong <guo.dong@intel.com>
---
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 3 +--
UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c | 4 +---
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
--
2.16.2.windows.1
next reply other threads:[~2021-06-30 22:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 22:50 Guo Dong [this message]
2021-07-01 20:57 ` [edk2-devel] [PATCH] UefiPayloadPkg: Fix the build failure Ma, Maurice
-- strict thread matches above, loose matches on Subject: below --
2022-04-13 20:48 [edk2-devel][PATCH] " Guo Dong
2022-04-14 1:04 ` duntan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210630225036.34272-1-guo.dong@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox