UefiCpuPkg/PiSmmCpuDxeSmm: Add logic to support semaphore type.
V4 changes: 1. Serial console log for different threads when program register table. 2. Check the AcpiCpuData before use it to avoid potential ASSERT. V3 changes: 1. Use global variable instead of internal function to return string for register type and dependence type. 2. Add comments for some complicated logic. V1 changes: Because this driver needs to set MSRs saved in normal boot phase, sync semaphore logic from RegisterCpuFeaturesLib code which used for normal boot phase. Detail see below change for RegisterCpuFeaturesLib: UefiCpuPkg/RegisterCpuFeaturesLib: Add logic to support semaphore type. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -53,6 +53,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/ReportStatusCodeLib.h>
|
||||
#include <Library/SmmCpuFeaturesLib.h>
|
||||
#include <Library/PeCoffGetEntryPointLib.h>
|
||||
#include <Library/RegisterCpuFeaturesLib.h>
|
||||
|
||||
#include <AcpiCpuData.h>
|
||||
#include <CpuHotPlugData.h>
|
||||
@@ -364,7 +365,6 @@ typedef struct {
|
||||
volatile BOOLEAN *AllCpusInSync;
|
||||
SPIN_LOCK *PFLock;
|
||||
SPIN_LOCK *CodeAccessCheckLock;
|
||||
SPIN_LOCK *MemoryMappedLock;
|
||||
} SMM_CPU_SEMAPHORE_GLOBAL;
|
||||
|
||||
///
|
||||
@@ -409,7 +409,6 @@ extern SMM_CPU_SEMAPHORES mSmmCpuSemaphores;
|
||||
extern UINTN mSemaphoreSize;
|
||||
extern SPIN_LOCK *mPFLock;
|
||||
extern SPIN_LOCK *mConfigSmmCodeAccessCheckLock;
|
||||
extern SPIN_LOCK *mMemoryMappedLock;
|
||||
extern EFI_SMRAM_DESCRIPTOR *mSmmCpuSmramRanges;
|
||||
extern UINTN mSmmCpuSmramRangeCount;
|
||||
extern UINT8 mPhysicalAddressBits;
|
||||
|
Reference in New Issue
Block a user