Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 88f436883b45b090adaec2099728d224e47ff51f
https://github.com/tianocore/edk2/commit/88f436883b45b090adaec2099728d224e47ff51f
Author: Xie, Yuanhao <[email protected]>
Date: 2023-07-11 (Tue, 11 Jul 2023)
Changed paths:
M UefiCpuPkg/Library/MpInitLib/MpLib.c
Log Message:
-----------
UefiCpuPkg: Refactor the logic for placing APs in HltLoop.
Refactor the logic for placing APs in HltLoop into a separate function.
Tested-by: Gerd Hoffmann <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Yuanhao Xie <[email protected]>
Commit: 243212b0d0bb33d0a64db8cd974d243e5aefdf3d
https://github.com/tianocore/edk2/commit/243212b0d0bb33d0a64db8cd974d243e5aefdf3d
Author: Xie, Yuanhao <[email protected]>
Date: 2023-07-11 (Tue, 11 Jul 2023)
Changed paths:
M UefiCpuPkg/Library/MpInitLib/MpLib.c
Log Message:
-----------
UefiCpuPkg: Refactor the logic for placing APs in Mwait/Runloop.
Refactor the logic for placing APs in
Mwait/Runloop into a separate function.
Tested-by: Gerd Hoffmann <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Yuanhao Xie <[email protected]>
Commit: 8bb018afaf2a4af16e410bba01b42d245250c82c
https://github.com/tianocore/edk2/commit/8bb018afaf2a4af16e410bba01b42d245250c82c
Author: Xie, Yuanhao <[email protected]>
Date: 2023-07-11 (Tue, 11 Jul 2023)
Changed paths:
M UefiCpuPkg/Library/MpInitLib/AmdSev.c
M UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
A UefiCpuPkg/Library/MpInitLib/MpHandOff.h
M UefiCpuPkg/Library/MpInitLib/MpLib.c
M UefiCpuPkg/Library/MpInitLib/MpLib.h
M UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
M UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
Log Message:
-----------
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 <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Yuanhao Xie <[email protected]>
Commit: 629c1dacc9bdbc4fa0f31516656334b364c6c926
https://github.com/tianocore/edk2/commit/629c1dacc9bdbc4fa0f31516656334b364c6c926
Author: Xie, Yuanhao <[email protected]>
Date: 2023-07-11 (Tue, 11 Jul 2023)
Changed paths:
M UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
M UefiCpuPkg/Library/MpInitLib/MpLib.c
M UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
Log Message:
-----------
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 <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Yuanhao Xie <[email protected]>
Commit: 964a4f032dcd15d7b0d9246625b13b71182e4eae
https://github.com/tianocore/edk2/commit/964a4f032dcd15d7b0d9246625b13b71182e4eae
Author: Xie, Yuanhao <[email protected]>
Date: 2023-07-11 (Tue, 11 Jul 2023)
Changed paths:
M UefiCpuPkg/Library/MpInitLib/MpLib.c
M UefiCpuPkg/Library/MpInitLib/MpLib.h
Log Message:
-----------
UefiCpuPkg: Eliminate the second INIT-SIPI-SIPI sequence.
When both the PEI and DXE phases operate in the same execution
mode(32-bit/64-bit), the BSP send a special start-up signal during
the DXE phase to awaken the Application APs.
To eliminate the need for the INIT-SIPI-SIPI sequence at the beginning
of the DXE phase, the BSP call the SwitchApContext function to trigger
the special start-up signal. By writing the specified
StartupSignalValue to the designated StartupSignalAddress, the BSP
wakes up the APs from mwait mode. Once the APs receive the
MP_HAND_OFF_SIGNAL value, they are awakened and proceed to execute the
SwitchContextPerAp procedure. They enter another while loop,
transitioning their context from the PEI phase to the DXE phase.
The original state transitions for an AP during the procedure are as
follows:
Idle ----> Ready ----> Busy ----> Idle
[BSP] [AP] [AP]
Instead of init-sipi-sipi sequence, we make use of a
start-up signal to awaken the APs and transfer their context from
PEI to DXE. Consequently, APs, rather than the BSP, to set their state
to CpuStateReady.
Tested-by: Gerd Hoffmann <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Yuanhao Xie <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/63923a5642e8...964a4f032dcd
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits