summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/MpInitLib/MpLib.c
diff options
context:
space:
mode:
authorXie, Yuanhao <yuanhao.xie@intel.com>2023-06-28 16:47:23 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-07-11 02:47:27 +0000
commit629c1dacc9bdbc4fa0f31516656334b364c6c926 (patch)
tree6fc6008d083395b3ba43bede391686501444c3eb /UefiCpuPkg/Library/MpInitLib/MpLib.c
parent8bb018afaf2a4af16e410bba01b42d245250c82c (diff)
downloadedk2-629c1dacc9bdbc4fa0f31516656334b364c6c926.tar.gz
edk2-629c1dacc9bdbc4fa0f31516656334b364c6c926.tar.bz2
edk2-629c1dacc9bdbc4fa0f31516656334b364c6c926.zip
UefiCpuPkg: ApWakeupFunction directly use CpuMpData.
In the original design, once the APs finished executing their assembly code and switched to executing C code, they would enter a continuous loop within a function. In this function, they would collect CpuMpData using the MP_CPU_EXCHANGE_INFO mechanism. However, in the updated approach, CpuMpData can now be passed directly to the ApWakeUpFunction, bypassing the need for MP_CPU_EXCHANGE_INFO. This modification is made in preparation for eliminating the requirement of a second INIT-SIPI-SIPI sequence in the DXE phase. Tested-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/MpInitLib/MpLib.c')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/MpLib.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index ccc01859f0..f904751b0d 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -710,17 +710,16 @@ PlaceAPInMwaitLoopOrRunLoop (
/**
This function will be called from AP reset code if BSP uses WakeUpAP.
- @param[in] ExchangeInfo Pointer to the MP exchange info buffer
+ @param[in] CpuMpData Pointer to CPU MP Data
@param[in] ApIndex Number of current executing AP
**/
VOID
EFIAPI
ApWakeupFunction (
- IN MP_CPU_EXCHANGE_INFO *ExchangeInfo,
- IN UINTN ApIndex
+ IN CPU_MP_DATA *CpuMpData,
+ IN UINTN ApIndex
)
{
- CPU_MP_DATA *CpuMpData;
UINTN ProcessorNumber;
EFI_AP_PROCEDURE Procedure;
VOID *Parameter;
@@ -732,11 +731,6 @@ ApWakeupFunction (
AP_STACK_DATA *ApStackData;
//
- // AP finished assembly code and begin to execute C code
- //
- CpuMpData = ExchangeInfo->CpuMpData;
-
- //
// AP's local APIC settings will be lost after received INIT IPI
// We need to re-initialize them at here
//