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