summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2017-04-19 11:16:55 +0800
committerJeff Fan <jeff.fan@intel.com>2017-04-26 08:55:43 +0800
commit9293d6e42e677e4a38e055258c0993ad8a9df14e (patch)
treee7e94e0a991d0f7e4eabb15365c0f8636e78f59b /UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
parentd7dd4f0a0678c458005ea40acba70984c58bcb20 (diff)
downloadedk2-9293d6e42e677e4a38e055258c0993ad8a9df14e.tar.gz
edk2-9293d6e42e677e4a38e055258c0993ad8a9df14e.tar.bz2
edk2-9293d6e42e677e4a38e055258c0993ad8a9df14e.zip
UefiCpuPkg/MpInitLib: save/restore original contents
If APs is in HLT-LOOP mode, we need AP reset vector for waking up APs. This updating is to save/restore original contents of AP reset vector around waking up APs always. https://bugzilla.tianocore.org/show_bug.cgi?id=500 Cc: Feng Tian <feng.tian@intel.com> Cc: Michael 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/PeiMpLib.c')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/PeiMpLib.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
index fb1d48fad8..5ce5788125 100644
--- a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
@@ -1,7 +1,7 @@
/** @file
MP initialize support functions for PEI phase.
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -129,10 +129,8 @@ CpuMpEndOfPeiCallback (
}
Hob.Raw = GET_NEXT_HOB (Hob);
}
- } else {
- CpuMpData->SaveRestoreFlag = TRUE;
- RestoreWakeupBuffer (CpuMpData);
}
+
return EFI_SUCCESS;
}
@@ -286,12 +284,8 @@ AllocateResetVector (
CpuMpData->WakeupBuffer = GetWakeupBuffer (ApResetVectorSize);
CpuMpData->MpCpuExchangeInfo = (MP_CPU_EXCHANGE_INFO *) (UINTN)
(CpuMpData->WakeupBuffer + CpuMpData->AddressMap.RendezvousFunnelSize);
- BackupAndPrepareWakeupBuffer (CpuMpData);
- }
-
- if (CpuMpData->SaveRestoreFlag) {
- BackupAndPrepareWakeupBuffer (CpuMpData);
}
+ BackupAndPrepareWakeupBuffer (CpuMpData);
}
/**
@@ -304,9 +298,7 @@ FreeResetVector (
IN CPU_MP_DATA *CpuMpData
)
{
- if (CpuMpData->SaveRestoreFlag) {
- RestoreWakeupBuffer (CpuMpData);
- }
+ RestoreWakeupBuffer (CpuMpData);
}
/**