summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h')
-rw-r--r--UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h b/UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h
index b6e6ae5bc5..26e1f46516 100644
--- a/UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h
+++ b/UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h
@@ -17,8 +17,35 @@
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/SortLib.h>
#include <Library/CpuCacheInfoLib.h>
+typedef union {
+ struct {
+ //
+ // Type of the cache that this package's this type of logical processor corresponds to.
+ // Value = CPUID.04h:EAX[04:00]
+ //
+ UINT32 CacheType : 5;
+ //
+ // Level of the cache that this package's this type of logical processor corresponds to.
+ // Value = CPUID.04h:EAX[07:05]
+ //
+ UINT32 CacheLevel : 3;
+ //
+ // Core type of logical processor.
+ // Value = CPUID.1Ah:EAX[31:24]
+ //
+ UINT32 CoreType : 8;
+ UINT32 Reserved : 16;
+ //
+ // Package number.
+ //
+ UINT32 Package;
+ } Bits;
+ UINT64 Uint64;
+} CPU_CACHE_INFO_COMPARATOR;
+
typedef struct {
//
// Package ID, the information comes from