summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
diff options
context:
space:
mode:
authorXie, Yuanhao <yuanhao.xie@intel.com>2023-06-28 16:47:22 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-07-11 02:47:27 +0000
commit8bb018afaf2a4af16e410bba01b42d245250c82c (patch)
treeef8e5183abb8e618a1a0f8bb9b9796e6894ecc71 /UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
parent243212b0d0bb33d0a64db8cd974d243e5aefdf3d (diff)
downloadedk2-8bb018afaf2a4af16e410bba01b42d245250c82c.tar.gz
edk2-8bb018afaf2a4af16e410bba01b42d245250c82c.tar.bz2
edk2-8bb018afaf2a4af16e410bba01b42d245250c82c.zip
UefiCpuPkg: Create MpHandOff.
Initially, the purpose of the Hob was twofold: it served as a way to transfer information from PEI to DXE. However, during the DXE phase, only a few fields from the CPU_MP_DATA which collected in PEI phase were needed. A new Hob was specifically created to transfer information to the DXE phase. This new Hob contained only the essential fields required for reuse in DXE. For instance, instead of directly including the BspNumber in MpHandOff, the DXE phase introduced the use of GetBspNumber() to collect the BspNumber from ApicID and CpuCount. The SaveCpuMpData() function was updated to construct the MP_HAND_OFF Hob. Additionally, the function introduced the MP_HAND_OFF_SIGNAL, which solely served the purpose of awakening the APs and transitioning their context from PEI to DXE. The WaitLoopExecutionMode field indicated whether the bit mode of PEI matched that of DXE. Both of them were filled only if the ApLoopMode was not ApInHltLoop. In the case of ApInHltLoop, it remained necessary to wake up the APs using the init-sipi-sipi sequence. This improvement still allow INIT-SIPI-SIPI even APs are wait in Run/Mwait loop mode. The function GetMpHandOffHob() was added to facilitate access to the collected MpHandOff in the DXE phase. The CpuMpData in the DXE phase was updated by gathering information from MpHandOff. Since MpHandOff replaced the usage of OldCpuMpData and contained essential information from the PEI phase to the DXE phase. AmdSevUpdateCpuMpData was included to maintain the original implementation of AmdSev, ensuring that OldCpuMpData->NewCpuMpData pointed to CpuMpData. 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/DxeMpInitLib.inf')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf1
1 files changed, 1 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
index 67ebf7254c..7d45d3ad4d 100644
--- a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
+++ b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
@@ -38,6 +38,7 @@
MpLib.c
MpLib.h
Microcode.c
+ MpHandOff.h
[Packages]
MdePkg/MdePkg.dec