TianoCore EDK2 master
Loading...
Searching...
No Matches
CpuCacheInfoLib.h
Go to the documentation of this file.
1
9#ifndef _CPU_CACHE_INFO_LIB_H_
10#define _CPU_CACHE_INFO_LIB_H_
11
12typedef struct {
13 //
14 // Package number.
15 //
16 UINT32 Package;
17 //
18 // Core type of logical processor.
19 // Value = CPUID.1Ah:EAX[31:24]
20 //
21 UINT8 CoreType;
22 //
23 // Level of the cache that this package's this type of logical processor corresponds to.
24 // Value = CPUID.04h:EAX[07:05]
25 //
26 UINT8 CacheLevel : 3;
27 //
28 // Type of the cache that this package's this type of logical processor corresponds to.
29 // Value = CPUID.04h:EAX[04:00]
30 //
31 UINT8 CacheType : 5;
32 //
33 // Ways of associativity.
34 // Value = CPUID.04h:EBX[31:22]
35 //
36 UINT16 CacheWays : 10;
37 //
38 // Fully associative cache.
39 // Value = CPUID.04h:EAX[09]
40 //
41 UINT16 FullyAssociativeCache : 1;
42 //
43 // Direct mapped cache.
44 // Value = CPUID.04h:EDX[02]
45 //
46 UINT16 DirectMappedCache : 1;
47 UINT16 Reserved : 4;
48 //
49 // Size of single cache that this package's this type of logical processor corresponds to.
50 // Value = (CPUID.04h:EBX[31:22] + 1) * (CPUID.04h:EBX[21:12] + 1) *
51 // (CPUID.04h:EBX[11:00] + 1) * (CPUID.04h:ECX[31:00] + 1)
52 //
53 UINT32 CacheSizeinKB;
54 //
55 // Number of the cache that this package's this type of logical processor corresponds to.
56 // Have subtracted the number of caches that are shared.
57 //
58 UINT16 CacheCount;
60
79EFIAPI
81 IN OUT CPU_CACHE_INFO *CpuCacheInfo,
82 IN OUT UINTN *CpuCacheInfoCount
83 );
84
85#endif
UINT64 UINTN
EFI_STATUS EFIAPI GetCpuCacheInfo(IN OUT CPU_CACHE_INFO *CpuCacheInfo, IN OUT UINTN *CpuCacheInfoCount)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29