UefiCpuPkg/PiSmmCpuDxeSmm: Allocate buffer for global semaphores
Get semaphores alignment/size requirement and allocate aligned buffer for all global spin lock and semaphores. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -354,6 +354,25 @@ typedef struct {
|
||||
UINT64 MtrrBaseMaskPtr; // Offset 0x58
|
||||
} PROCESSOR_SMM_DESCRIPTOR;
|
||||
|
||||
|
||||
///
|
||||
/// All global semaphores' pointer
|
||||
///
|
||||
typedef struct {
|
||||
volatile UINT32 *Counter;
|
||||
volatile BOOLEAN *InsideSmm;
|
||||
volatile BOOLEAN *AllCpusInSync;
|
||||
SPIN_LOCK *PFLock;
|
||||
SPIN_LOCK *CodeAccessCheckLock;
|
||||
} SMM_CPU_SEMAPHORE_GLOBAL;
|
||||
|
||||
///
|
||||
/// All semaphores' information
|
||||
///
|
||||
typedef struct {
|
||||
SMM_CPU_SEMAPHORE_GLOBAL SemaphoreGlobal;
|
||||
} SMM_CPU_SEMAPHORES;
|
||||
|
||||
extern IA32_DESCRIPTOR gcSmiGdtr;
|
||||
extern IA32_DESCRIPTOR gcSmiIdtr;
|
||||
extern VOID *gcSmiIdtrPtr;
|
||||
|
Reference in New Issue
Block a user