diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-11-14 11:43:26 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2016-11-16 16:28:22 +0800 |
commit | b3775af2775dd0fdf9c0698fb395ed3ffc81b2d3 (patch) | |
tree | de888db74df666640193aa583abb6aa5412dbd54 /UefiCpuPkg/Library/MpInitLib/MpLib.c | |
parent | 845c5be1fd9bf7edfac4a103dfab70829686978f (diff) | |
download | edk2-platforms-b3775af2775dd0fdf9c0698fb395ed3ffc81b2d3.tar.xz |
UefiCpuPkg/MpInitLib: Update AP information when BSP switched
When BSP switched, we need to update some AP information. For example,
ApStartupSignalBuffer and ApTopOfStack.
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/MpInitLib/MpLib.c')
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/MpLib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index fd32482d55..3c2e6d6b89 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -549,6 +549,8 @@ ApWakeupFunction ( GetProcessorNumber (CpuMpData, &ProcessorNumber);
CpuMpData->CpuData[ProcessorNumber].ApFunction = 0;
CpuMpData->CpuData[ProcessorNumber].ApFunctionArgument = 0;
+ ApStartupSignalBuffer = CpuMpData->CpuData[ProcessorNumber].StartupApSignal;
+ CpuInfoInHob[ProcessorNumber].ApTopOfStack = CpuInfoInHob[CpuMpData->NewBspNumber].ApTopOfStack;
} else {
//
// Re-get the CPU APICID and Initial APICID
@@ -1420,6 +1422,7 @@ SwitchBSPWorker ( CpuMpData->BSPInfo.State = CPU_SWITCH_STATE_IDLE;
CpuMpData->APInfo.State = CPU_SWITCH_STATE_IDLE;
CpuMpData->SwitchBspFlag = TRUE;
+ CpuMpData->NewBspNumber = ProcessorNumber;
//
// Clear the BSP bit of MSR_IA32_APIC_BASE
|