]>
Commit | Line | Data |
---|---|---|
2ba6ecef RC |
1 | /** @file\r |
2 | SMBIOS Processor Related Functions.\r | |
3 | \r | |
4 | Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>\r | |
5 | \r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
8 | **/\r | |
9 | \r | |
10 | #ifndef SMBIOS_PROCESSOR_H_\r | |
11 | #define SMBIOS_PROCESSOR_H_\r | |
12 | \r | |
13 | #include <Uefi.h>\r | |
14 | #include <IndustryStandard/SmBios.h>\r | |
15 | \r | |
16 | /** Returns the maximum cache level implemented by the current CPU.\r | |
17 | \r | |
18 | @return The maximum cache level implemented.\r | |
19 | **/\r | |
20 | UINT8\r | |
21 | SmbiosProcessorGetMaxCacheLevel (\r | |
22 | VOID\r | |
23 | );\r | |
24 | \r | |
25 | /** Returns whether or not the specified cache level has separate I/D caches.\r | |
26 | \r | |
27 | @param CacheLevel The cache level (L1, L2 etc.).\r | |
28 | \r | |
29 | @return TRUE if the cache level has separate I/D caches, FALSE otherwise.\r | |
30 | **/\r | |
31 | BOOLEAN\r | |
32 | SmbiosProcessorHasSeparateCaches (\r | |
429309e0 | 33 | UINT8 CacheLevel\r |
2ba6ecef RC |
34 | );\r |
35 | \r | |
36 | /** Gets the size of the specified cache.\r | |
37 | \r | |
38 | @param CacheLevel The cache level (L1, L2 etc.).\r | |
39 | @param DataCache Whether the cache is a dedicated data cache.\r | |
40 | @param UnifiedCache Whether the cache is a unified cache.\r | |
41 | \r | |
42 | @return The cache size.\r | |
43 | **/\r | |
44 | UINT64\r | |
45 | SmbiosProcessorGetCacheSize (\r | |
429309e0 MK |
46 | IN UINT8 CacheLevel,\r |
47 | IN BOOLEAN DataCache,\r | |
48 | IN BOOLEAN UnifiedCache\r | |
2ba6ecef RC |
49 | );\r |
50 | \r | |
51 | /** Gets the associativity of the specified cache.\r | |
52 | \r | |
53 | @param CacheLevel The cache level (L1, L2 etc.).\r | |
54 | @param DataCache Whether the cache is a dedicated data cache.\r | |
55 | @param UnifiedCache Whether the cache is a unified cache.\r | |
56 | \r | |
57 | @return The cache associativity.\r | |
58 | **/\r | |
59 | UINT32\r | |
60 | SmbiosProcessorGetCacheAssociativity (\r | |
429309e0 MK |
61 | IN UINT8 CacheLevel,\r |
62 | IN BOOLEAN DataCache,\r | |
63 | IN BOOLEAN UnifiedCache\r | |
2ba6ecef RC |
64 | );\r |
65 | \r | |
66 | /** Returns a value for the Processor ID field that conforms to SMBIOS\r | |
67 | requirements.\r | |
68 | \r | |
69 | @return Processor ID.\r | |
70 | **/\r | |
71 | UINT64\r | |
429309e0 MK |
72 | SmbiosGetProcessorId (\r |
73 | VOID\r | |
74 | );\r | |
2ba6ecef RC |
75 | \r |
76 | /** Returns the external clock frequency.\r | |
77 | \r | |
78 | @return The external CPU clock frequency.\r | |
79 | **/\r | |
80 | UINTN\r | |
429309e0 MK |
81 | SmbiosGetExternalClockFrequency (\r |
82 | VOID\r | |
83 | );\r | |
2ba6ecef RC |
84 | \r |
85 | /** Returns the SMBIOS ProcessorFamily field value.\r | |
86 | \r | |
87 | @return The value for the ProcessorFamily field.\r | |
88 | **/\r | |
89 | UINT8\r | |
429309e0 MK |
90 | SmbiosGetProcessorFamily (\r |
91 | VOID\r | |
92 | );\r | |
2ba6ecef RC |
93 | \r |
94 | /** Returns the ProcessorFamily2 field value.\r | |
95 | \r | |
96 | @return The value for the ProcessorFamily2 field.\r | |
97 | **/\r | |
98 | UINT16\r | |
429309e0 MK |
99 | SmbiosGetProcessorFamily2 (\r |
100 | VOID\r | |
101 | );\r | |
2ba6ecef RC |
102 | \r |
103 | /** Returns the SMBIOS Processor Characteristics.\r | |
104 | \r | |
105 | @return Processor Characteristics bitfield.\r | |
106 | **/\r | |
107 | PROCESSOR_CHARACTERISTIC_FLAGS\r | |
429309e0 MK |
108 | SmbiosGetProcessorCharacteristics (\r |
109 | VOID\r | |
110 | );\r | |
2ba6ecef RC |
111 | \r |
112 | #endif // SMBIOS_PROCESSOR_H_\r |