summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorJian J Wang <jian.j.wang@intel.com>2018-01-04 10:57:26 +0800
committerEric Dong <eric.dong@intel.com>2018-01-10 08:25:11 +0800
commitf2655dcf28c4dbece5bdf6433a2624e68ea7aeb4 (patch)
treea64ffa4a7c280436e113e3ea468a566fd6e13cb9 /UefiCpuPkg
parent643e8e4bd40807c5b01eba8561b753df37ac1a91 (diff)
downloadedk2-f2655dcf28c4dbece5bdf6433a2624e68ea7aeb4.tar.gz
edk2-f2655dcf28c4dbece5bdf6433a2624e68ea7aeb4.tar.bz2
edk2-f2655dcf28c4dbece5bdf6433a2624e68ea7aeb4.zip
UefiCpuPkg/MpInitLib: fix incorrect stack top init for cpu0
As the name suggests, CpuMpData->CpuInfoInHob[0].ApTopOfStack must be init to the top of stack. But the MpInitLibInitialize() passed the base address of stack to InitializeApData(), which is not correct. Although this stack is not used for BSP, it's should be fixed in case of misunderstanding and future possible code changes. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/MpLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 1a6cdb678e..cdc03113e5 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -1502,7 +1502,7 @@ MpInitLibInitialize (
//
// Set BSP basic information
//
- InitializeApData (CpuMpData, 0, 0, CpuMpData->Buffer);
+ InitializeApData (CpuMpData, 0, 0, CpuMpData->Buffer + ApStackSize);
//
// Save assembly code information
//