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 <lersek@redhat.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zeng Star <star.zeng@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
34
UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf
Normal file
34
UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf
Normal file
@@ -0,0 +1,34 @@
|
||||
## @file
|
||||
# SMM CPU Synchronization lib.
|
||||
#
|
||||
# This is SMM CPU Synchronization lib used for SMM CPU sync operations.
|
||||
#
|
||||
# Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = SmmCpuSyncLib
|
||||
FILE_GUID = 1ca1bc1a-16a4-46ef-956a-ca500fd3381f
|
||||
MODULE_TYPE = DXE_SMM_DRIVER
|
||||
LIBRARY_CLASS = SmmCpuSyncLib|DXE_SMM_DRIVER
|
||||
|
||||
[Sources]
|
||||
SmmCpuSyncLib.c
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
UefiCpuPkg/UefiCpuPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
MemoryAllocationLib
|
||||
SafeIntLib
|
||||
SynchronizationLib
|
||||
|
||||
[Pcd]
|
||||
|
||||
[Protocols]
|
Reference in New Issue
Block a user