DEBUG ((DEBUG_INFO, "Package: %d, Valid Core : %d\n", Index, ValidCoreCountPerPackage[Index]));\r
}\r
\r
- CpuFeaturesData->CpuFlags.SemaphoreCount = AllocateZeroPool (sizeof (UINT32) * CpuStatus->PackageCount * CpuStatus->MaxCoreCount * CpuStatus->MaxThreadCount);\r
- ASSERT (CpuFeaturesData->CpuFlags.SemaphoreCount != NULL);\r
+ CpuFeaturesData->CpuFlags.CoreSemaphoreCount = AllocateZeroPool (sizeof (UINT32) * CpuStatus->PackageCount * CpuStatus->MaxCoreCount * CpuStatus->MaxThreadCount);\r
+ ASSERT (CpuFeaturesData->CpuFlags.CoreSemaphoreCount != NULL);\r
+ CpuFeaturesData->CpuFlags.PackageSemaphoreCount = AllocateZeroPool (sizeof (UINT32) * CpuStatus->PackageCount * CpuStatus->MaxCoreCount * CpuStatus->MaxThreadCount);\r
+ ASSERT (CpuFeaturesData->CpuFlags.PackageSemaphoreCount != NULL);\r
\r
//\r
// Get support and configuration PCDs\r
// V(0...n) V(0...n) ... V(0...n)\r
// n * P(0) n * P(1) ... n * P(n)\r
//\r
- SemaphorePtr = CpuFlags->SemaphoreCount;\r
switch (RegisterTableEntry->Value) {\r
case CoreDepType:\r
+ SemaphorePtr = CpuFlags->CoreSemaphoreCount;\r
//\r
// Get Offset info for the first thread in the core which current thread belongs to.\r
//\r
break;\r
\r
case PackageDepType:\r
+ SemaphorePtr = CpuFlags->PackageSemaphoreCount;\r
ValidCoreCountPerPackage = (UINT32 *)(UINTN)CpuStatus->ValidCoreCountPerPackage;\r
//\r
// Get Offset info for the first thread in the package which current thread belongs to.\r
// Flags used when program the register.\r
//\r
typedef struct {\r
- volatile UINTN ConsoleLogLock; // Spinlock used to control console.\r
- volatile UINTN MemoryMappedLock; // Spinlock used to program mmio\r
- volatile UINT32 *SemaphoreCount; // Semaphore used to program semaphore.\r
+ volatile UINTN ConsoleLogLock; // Spinlock used to control console.\r
+ volatile UINTN MemoryMappedLock; // Spinlock used to program mmio\r
+ volatile UINT32 *CoreSemaphoreCount; // Semaphore containers used to program Core semaphore.\r
+ volatile UINT32 *PackageSemaphoreCount; // Semaphore containers used to program Package semaphore.\r
} PROGRAM_CPU_REGISTER_FLAGS;\r
\r
typedef struct {\r