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