Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: e14a022246f056847108e9e7882366fee4fece91
https://github.com/tianocore/edk2/commit/e14a022246f056847108e9e7882366fee4fece91
Author: Jiaxin Wu <[email protected]>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
M UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
Log Message:
-----------
UefiCpuPkg/PiSmmCpuDxeSmm: Optimize Semaphore Sync between BSP and AP
This patch is to define 3 new functions (WaitForBsp & ReleaseBsp &
ReleaseOneAp) used for the semaphore sync between BSP & AP. With the
change, BSP and AP Sync flow will be easy understand as below:
BSP: ReleaseAllAPs or ReleaseOneAp --> AP: WaitForBsp
BSP: WaitForAllAPs <-- AP: ReleaseBsp
Cc: Laszlo Ersek <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zeng Star <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Commit: ba822d28516a231ff8780910cc3164bcce8b4969
https://github.com/tianocore/edk2/commit/ba822d28516a231ff8780910cc3164bcce8b4969
Author: Jiaxin Wu <[email protected]>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
A UefiCpuPkg/Include/Library/SmmCpuSyncLib.h
M UefiCpuPkg/UefiCpuPkg.dec
Log Message:
-----------
UefiCpuPkg: Adds SmmCpuSyncLib library class
Intel is planning to provide different SMM CPU Sync implementation
along with some specific registers to improve the SMI performance,
hence need SmmCpuSyncLib Library for Intel.
This patch is to:
1.Adds SmmCpuSyncLib Library class in UefiCpuPkg.dec.
2.Adds SmmCpuSyncLib.h function declaration header file.
For the new SmmCpuSyncLib, it provides 3 sets of APIs:
1. ContextInit/ContextDeinit/ContextReset:
ContextInit() is called in driver's entrypoint to allocate and
initialize the SMM CPU Sync context. ContextDeinit() is called in
driver's unload function to deinitialize SMM CPU Sync context.
ContextReset() is called before CPU exist SMI, which allows CPU to
check into the next SMI from this point.
2. GetArrivedCpuCount/CheckInCpu/CheckOutCpu/LockDoor:
When SMI happens, all processors including BSP enter to SMM mode by
calling CheckInCpu(). The elected BSP calls LockDoor() so that
CheckInCpu() will return the error code after that. CheckOutCpu() can
be called in error handling flow for the CPU who calls CheckInCpu()
earlier. GetArrivedCpuCount() returns the number of checked-in CPUs.
3. WaitForAPs/ReleaseOneAp/WaitForBsp/ReleaseBsp
WaitForAPs() & ReleaseOneAp() are called from BSP to wait the number
of APs and release one specific AP. WaitForBsp() & ReleaseBsp() are
called from APs to wait and release BSP. The 4 APIs are used to
synchronize the running flow among BSP and APs. BSP and AP Sync flow
can be easy understand as below:
BSP: ReleaseOneAp --> AP: WaitForBsp
BSP: WaitForAPs <-- AP: ReleaseBsp
Cc: Laszlo Ersek <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zeng Star <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Rahul Kumar <[email protected]>
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Commit: 6f6a43cc8e0015179d75082b74e18ca9ef92de4f
https://github.com/tianocore/edk2/commit/6f6a43cc8e0015179d75082b74e18ca9ef92de4f
Author: Jiaxin Wu <[email protected]>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
M MdePkg/MdeLibs.dsc.inc
Log Message:
-----------
MdePkg/MdeLibs.dsc.inc: Add SafeIntLib instance
This patch is to add SafeIntLib in MdeLibs.dsc.inc
Cc: Michael D Kinney <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Zhiguang Liu <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zeng Star <[email protected]>
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Michael D Kinney <[email protected]>
Commit: 69eb9ad4a1f738d7efdc612ae00947bda272170b
https://github.com/tianocore/edk2/commit/69eb9ad4a1f738d7efdc612ae00947bda272170b
Author: Jiaxin Wu <[email protected]>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
A UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.c
A UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf
M UefiCpuPkg/UefiCpuPkg.dsc
Log Message:
-----------
UefiCpuPkg: Implements SmmCpuSyncLib library instance
Implements SmmCpuSyncLib Library instance. The instance refers the
existing SMM CPU driver (PiSmmCpuDxeSmm) sync implementation
and behavior:
1.Abstract Counter and Run semaphores into SmmCpuSyncCtx.
2.Abstract CPU arrival count operation to
SmmCpuSyncGetArrivedCpuCount(), SmmCpuSyncCheckInCpu(),
SmmCpuSyncCheckOutCpu(), SmmCpuSyncLockDoor().
Implementation is aligned with existing SMM CPU driver.
3. Abstract SMM CPU Sync flow to:
BSP: SmmCpuSyncReleaseOneAp --> AP: SmmCpuSyncWaitForBsp
BSP: SmmCpuSyncWaitForAPs <-- AP: SmmCpuSyncReleaseBsp
Semaphores release & wait during sync flow is same as existing SMM
CPU driver.
4.Same operation to Counter and Run semaphores by leverage the atomic
compare exchange.
Cc: Laszlo Ersek <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zeng Star <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Rahul Kumar <[email protected]>
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Commit: 32f84bd3108b1f35486a2d42612cf49830c941d8
https://github.com/tianocore/edk2/commit/32f84bd3108b1f35486a2d42612cf49830c941d8
Author: Jiaxin Wu <[email protected]>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
M OvmfPkg/CloudHv/CloudHvX64.dsc
M OvmfPkg/OvmfPkgIa32.dsc
M OvmfPkg/OvmfPkgIa32X64.dsc
M OvmfPkg/OvmfPkgX64.dsc
Log Message:
-----------
OvmfPkg: Specifies SmmCpuSyncLib instance
This patch is to specify SmmCpuSyncLib instance for OvmfPkg.
Cc: Laszlo Ersek <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Jordan Justen <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zeng Star <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Commit: 0a248f169d8ffd87f722f1e2ac717e914d29d428
https://github.com/tianocore/edk2/commit/0a248f169d8ffd87f722f1e2ac717e914d29d428
Author: Jiaxin Wu <[email protected]>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
M UefiPayloadPkg/UefiPayloadPkg.dsc
Log Message:
-----------
UefiPayloadPkg: Specifies SmmCpuSyncLib instance
This patch is to specify SmmCpuSyncLib instance for UefiPayloadPkg.
Cc: Laszlo Ersek <[email protected]>
Cc: Guo Dong <[email protected]>
Cc: Sean Rhodes <[email protected]>
Cc: James Lu <[email protected]>
Cc: Gua Guo <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zeng Star <[email protected]>
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Gua Guo <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Commit: cc698d033504210303ee1df94fab0d18b65e10a0
https://github.com/tianocore/edk2/commit/cc698d033504210303ee1df94fab0d18b65e10a0
Author: Jiaxin Wu <[email protected]>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
M UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
Log Message:
-----------
UefiCpuPkg/PiSmmCpuDxeSmm: Simplify RunningApCount decrement
To decrease the count of RunningApCount, InterlockedDecrement is
enough to achieve that.
This patch is to simplify RunningApCount decrement.
Cc: Laszlo Ersek <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zeng Star <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Rahul Kumar <[email protected]>
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Commit: a83d953dc2741f650cc273f39fe803ae406b0fad
https://github.com/tianocore/edk2/commit/a83d953dc2741f650cc273f39fe803ae406b0fad
Author: Jiaxin Wu <[email protected]>
Date: 2023-12-20 (Wed, 20 Dec 2023)
Changed paths:
M UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
Log Message:
-----------
UefiCpuPkg/PiSmmCpuDxeSmm: Consume SmmCpuSyncLib
There is the SmmCpuSyncLib Library class define the SMM CPU sync
flow, which is aligned with existing SMM CPU driver sync behavior.
This patch is to consume SmmCpuSyncLib instance directly.
With this change, SMM CPU Sync flow/logic can be customized
with different implementation no matter for any purpose, e.g.
performance tuning, handle specific register, etc.
Cc: Laszlo Ersek <[email protected]>
Cc: Eric Dong <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Zeng Star <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Rahul Kumar <[email protected]>
Signed-off-by: Jiaxin Wu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/8c1e9f9c6fa7...a83d953dc274
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits