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
12
typedef
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;
59
}
CPU_CACHE_INFO
;
60
78
EFI_STATUS
79
EFIAPI
80
GetCpuCacheInfo
(
81
IN
OUT
CPU_CACHE_INFO
*CpuCacheInfo,
82
IN
OUT
UINTN
*CpuCacheInfoCount
83
);
84
85
#endif
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
GetCpuCacheInfo
EFI_STATUS EFIAPI GetCpuCacheInfo(IN OUT CPU_CACHE_INFO *CpuCacheInfo, IN OUT UINTN *CpuCacheInfoCount)
Definition:
CpuCacheInfoLib.c:420
IN
#define IN
Definition:
Base.h:279
OUT
#define OUT
Definition:
Base.h:284
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
CPU_CACHE_INFO
Definition:
CpuCacheInfoLib.h:12
UefiCpuPkg
Include
Library
CpuCacheInfoLib.h
Generated on Fri Nov 15 2024 18:01:26 for TianoCore EDK2 by
1.9.6