]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
ArmPkg: Allow platforms to supply more data for SMBIOS Type3 record
[mirror_edk2.git] / ArmPkg / Universal / Smbios / OemMiscLibNull / OemMiscLib.c
1 /** @file
2 * OemMiscLib.c
3 *
4 * Copyright (c) 2021, NUVIA Inc. All rights reserved.
5 * Copyright (c) 2018, Hisilicon Limited. All rights reserved.
6 * Copyright (c) 2018, Linaro Limited. All rights reserved.
7 *
8 * SPDX-License-Identifier: BSD-2-Clause-Patent
9 *
10 **/
11
12 #include <Uefi.h>
13 #include <Library/BaseMemoryLib.h>
14 #include <Library/DebugLib.h>
15 #include <Library/HiiLib.h>
16 #include <Library/OemMiscLib.h>
17
18
19 /** Gets the CPU frequency of the specified processor.
20
21 @param ProcessorIndex Index of the processor to get the frequency for.
22
23 @return CPU frequency in Hz
24 **/
25 UINTN
26 EFIAPI
27 OemGetCpuFreq (
28 IN UINT8 ProcessorIndex
29 )
30 {
31 ASSERT (FALSE);
32 return 0;
33 }
34
35 /** Gets information about the specified processor and stores it in
36 the structures provided.
37
38 @param ProcessorIndex Index of the processor to get the information for.
39 @param ProcessorStatus Processor status.
40 @param ProcessorCharacteristics Processor characteritics.
41 @param MiscProcessorData Miscellaneous processor information.
42
43 @return TRUE on success, FALSE on failure.
44 **/
45 BOOLEAN
46 EFIAPI
47 OemGetProcessorInformation (
48 IN UINTN ProcessorIndex,
49 IN OUT PROCESSOR_STATUS_DATA *ProcessorStatus,
50 IN OUT PROCESSOR_CHARACTERISTIC_FLAGS *ProcessorCharacteristics,
51 IN OUT OEM_MISC_PROCESSOR_DATA *MiscProcessorData
52 )
53 {
54 ASSERT (FALSE);
55 return TRUE;
56 }
57
58 /** Gets information about the cache at the specified cache level.
59
60 @param ProcessorIndex The processor to get information for.
61 @param CacheLevel The cache level to get information for.
62 @param DataCache Whether the cache is a data cache.
63 @param UnifiedCache Whether the cache is a unified cache.
64 @param SmbiosCacheTable The SMBIOS Type7 cache information structure.
65
66 @return TRUE on success, FALSE on failure.
67 **/
68 BOOLEAN
69 EFIAPI
70 OemGetCacheInformation (
71 IN UINT8 ProcessorIndex,
72 IN UINT8 CacheLevel,
73 IN BOOLEAN DataCache,
74 IN BOOLEAN UnifiedCache,
75 IN OUT SMBIOS_TABLE_TYPE7 *SmbiosCacheTable
76 )
77 {
78 ASSERT (FALSE);
79 return TRUE;
80 }
81
82 /** Gets the maximum number of processors supported by the platform.
83
84 @return The maximum number of processors.
85 **/
86 UINT8
87 EFIAPI
88 OemGetMaxProcessors (
89 VOID
90 )
91 {
92 ASSERT (FALSE);
93 return 1;
94 }
95
96 /** Gets the type of chassis for the system.
97
98 @retval The type of the chassis.
99 **/
100 MISC_CHASSIS_TYPE
101 EFIAPI
102 OemGetChassisType (
103 VOID
104 )
105 {
106 ASSERT (FALSE);
107 return MiscChassisTypeUnknown;
108 }
109
110 /** Returns whether the specified processor is present or not.
111
112 @param ProcessIndex The processor index to check.
113
114 @return TRUE is the processor is present, FALSE otherwise.
115 **/
116 BOOLEAN
117 EFIAPI
118 OemIsProcessorPresent (
119 IN UINTN ProcessorIndex
120 )
121 {
122 ASSERT (FALSE);
123 return FALSE;
124 }
125
126 /** Updates the HII string for the specified field.
127
128 @param HiiHandle The HII handle.
129 @param TokenToUpdate The string to update.
130 @param Field The field to get information about.
131 **/
132 VOID
133 EFIAPI
134 OemUpdateSmbiosInfo (
135 IN EFI_HII_HANDLE HiiHandle,
136 IN EFI_STRING_ID TokenToUpdate,
137 IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field
138 )
139 {
140 ASSERT (FALSE);
141 }
142
143 /** Fetches the chassis status when it was last booted.
144
145 @return Chassis status.
146 **/
147 MISC_CHASSIS_STATE
148 EFIAPI
149 OemGetChassisBootupState (
150 VOID
151 )
152 {
153 ASSERT (FALSE);
154 return ChassisStateSafe;
155 }
156
157 /** Fetches the chassis power supply/supplies status when last booted.
158
159 @return Chassis power supply/supplies status.
160 **/
161 MISC_CHASSIS_STATE
162 EFIAPI
163 OemGetChassisPowerSupplyState (
164 VOID
165 )
166 {
167 ASSERT (FALSE);
168 return ChassisStateSafe;
169 }
170
171 /** Fetches the chassis thermal status when last booted.
172
173 @return Chassis thermal status.
174 **/
175 MISC_CHASSIS_STATE
176 EFIAPI
177 OemGetChassisThermalState (
178 VOID
179 )
180 {
181 ASSERT (FALSE);
182 return ChassisStateSafe;
183 }
184
185 /** Fetches the chassis security status when last booted.
186
187 @return Chassis security status.
188 **/
189 MISC_CHASSIS_SECURITY_STATE
190 EFIAPI
191 OemGetChassisSecurityStatus (
192 VOID
193 )
194 {
195 ASSERT (FALSE);
196 return ChassisSecurityStatusNone;
197 }
198
199 /** Fetches the chassis height in RMUs (Rack Mount Units).
200
201 @return The height of the chassis.
202 **/
203 UINT8
204 EFIAPI
205 OemGetChassisHeight (
206 VOID
207 )
208 {
209 ASSERT (FALSE);
210 return 1U;
211 }
212
213 /** Fetches the number of power cords.
214
215 @return The number of power cords.
216 **/
217 UINT8
218 EFIAPI
219 OemGetChassisNumPowerCords (
220 VOID
221 )
222 {
223 ASSERT (FALSE);
224 return 1;
225 }