diff options
author | Chasel, Chiu <chasel.chiu@intel.com> | 2018-10-26 10:41:49 +0800 |
---|---|---|
committer | Chasel, Chiu <chasel.chiu@intel.com> | 2018-10-26 11:34:21 +0800 |
commit | 901ae29dfef82186b8a54d29738fbe18add18764 (patch) | |
tree | b6053eff77c9100b59e84cbbef9bc1ca02d66d43 /IntelFsp2Pkg | |
parent | 7db4034f9ac578f1d834ff5ad062b8982ec81137 (diff) | |
download | edk2-901ae29dfef82186b8a54d29738fbe18add18764.zip edk2-901ae29dfef82186b8a54d29738fbe18add18764.tar.gz edk2-901ae29dfef82186b8a54d29738fbe18add18764.tar.bz2 |
IntelFsp2Pkg: Fix GCC49/XCODE build failure
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>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Diffstat (limited to 'IntelFsp2Pkg')
-rw-r--r-- | IntelFsp2Pkg/FspSecCore/SecMain.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.c b/IntelFsp2Pkg/FspSecCore/SecMain.c index ddbfc4f..f319c68 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);
}
|