diff options
author | Jian J Wang <jian.j.wang@intel.com> | 2018-01-24 20:09:02 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2018-01-29 09:37:40 +0800 |
commit | 69dfa8d87a9b14dce5b1fd2900ebe04c8860a200 (patch) | |
tree | cf7dddfd27d27ea520af80bfc3645233481cd96b /UefiCpuPkg | |
parent | 06c1f423e17fe5ddef824d688d21c83730238ba6 (diff) | |
download | edk2-69dfa8d87a9b14dce5b1fd2900ebe04c8860a200.zip edk2-69dfa8d87a9b14dce5b1fd2900ebe04c8860a200.tar.gz edk2-69dfa8d87a9b14dce5b1fd2900ebe04c8860a200.tar.bz2 |
UefiCpuPkg/MpInitLib: fix AP init issue in 64-bit PEI
This issue is introduced by a patch at
f32bfe6d061420a15bac6083063d227c567e6388
The above patch miss the case of 64-bit PEI, which will link
X64/MpFuncs.nasm instead of Ia32/MpFuncs.nasm. For X64/MpFuncs.nasm,
ExchangeInfo->ModeHighMemory should be always initialized no matter
if separate wakeup buffer is allocated or not. Ia32/MpFuncs.nasm will
not need ModeHighMemory during AP init. So the changes made in this
patch should not affect the functionality of it.
Cc: Ruiyu Ni <ruiyu.ni@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: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index 742f0c1..f8ab5f1 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -843,14 +843,15 @@ FillExchangeInfoData ( );
ExchangeInfo->ModeTransitionMemory = (UINT32)CpuMpData->WakeupBufferHigh;
- ExchangeInfo->ModeHighMemory = (UINT32)CpuMpData->WakeupBufferHigh +
- (UINT32)ExchangeInfo->ModeOffset -
- (UINT32)CpuMpData->AddressMap.ModeTransitionOffset;
- ExchangeInfo->ModeHighSegment = (UINT16)ExchangeInfo->CodeSegment;
} else {
ExchangeInfo->ModeTransitionMemory = (UINT32)
(ExchangeInfo->BufferStart + CpuMpData->AddressMap.ModeTransitionOffset);
}
+
+ ExchangeInfo->ModeHighMemory = ExchangeInfo->ModeTransitionMemory +
+ (UINT32)ExchangeInfo->ModeOffset -
+ (UINT32)CpuMpData->AddressMap.ModeTransitionOffset;
+ ExchangeInfo->ModeHighSegment = (UINT16)ExchangeInfo->CodeSegment;
}
/**
|