public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] IntelFsp2Pkg: Fix GCC49/XCODE build failure
@ 2018-10-26  3:18 Chasel, Chiu
  2018-10-26  3:21 ` Yao, Jiewen
  0 siblings, 1 reply; 2+ messages in thread
From: Chasel, Chiu @ 2018-10-26  3:18 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jiewen Yao, Desimone Nathaniel L, Chasel Chiu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1276

Fixed potentially uninitialized variable build failure
caused by commit: b1cc6f672f3b924cdb190e5b92db3b47f46a8911

Test: Verified on internal platform and boots successfully.

Cc: Jiewen Yao <Jiewen.yao@intel.com>
Cc: Desimone Nathaniel L <nathaniel.l.desimone@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
---
 IntelFsp2Pkg/FspSecCore/SecMain.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.c b/IntelFsp2Pkg/FspSecCore/SecMain.c
index ddbfc4fcdf..f319c68cc5 100644
--- a/IntelFsp2Pkg/FspSecCore/SecMain.c
+++ b/IntelFsp2Pkg/FspSecCore/SecMain.c
@@ -107,13 +107,12 @@ SecStartup (
     }
     IdtSize = sizeof (IdtTableInStack.IdtTable);
   } else {
-    if (IdtDescriptor.Limit + 1 > sizeof (IdtTableInStack.IdtTable)) {
+    IdtSize = IdtDescriptor.Limit + 1;
+    if (IdtSize > sizeof (IdtTableInStack.IdtTable)) {
       //
       // ERROR: IDT table size from boot loader is larger than FSP can support, DeadLoop here!
       //
       CpuDeadLoop();
-    } else {
-      IdtSize = IdtDescriptor.Limit + 1;
     }
     CopyMem ((VOID *) (UINTN) &IdtTableInStack.IdtTable, (VOID *) IdtDescriptor.Base, IdtSize);
   }
-- 
2.13.3.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-26  3:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-26  3:18 [PATCH] IntelFsp2Pkg: Fix GCC49/XCODE build failure Chasel, Chiu
2018-10-26  3:21 ` Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox