]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / PrintInfo.h
1 /** @file
2 Module to clarify the element info of the smbios structure.
3
4 Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2017 - 2019 Hewlett Packard Enterprise Development LP<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef _SMBIOS_PRINT_INFO_H_
11 #define _SMBIOS_PRINT_INFO_H_
12
13 #include <IndustryStandard/SmBios.h>
14
15 extern UINT8 SmbiosMajorVersion;
16 extern UINT8 SmbiosMinorVersion;
17
18 #define SHOW_NONE 0x00
19 #define SHOW_OUTLINE 0x01
20 #define SHOW_NORMAL 0x02
21 #define SHOW_DETAIL 0x03
22 //
23 // SHOW_ALL: WaitEnter() not wait input.
24 //
25 #define SHOW_ALL 0x04
26 #define SHOW_STATISTICS 0x05
27
28 #define AS_UINT16(pData) (*((UINT16 *) pData))
29 #define AS_UINT32(pData) (*((UINT32 *) pData))
30 #define AS_UINT64(pData) (*((UINT64 *) pData))
31
32 /**
33 Print the info of EPS(Entry Point Structure).
34
35 @param[in] SmbiosTable Pointer to the SMBIOS table entry point.
36 @param[in] Option Display option.
37 **/
38 VOID
39 SmbiosPrintEPSInfo (
40 IN SMBIOS_TABLE_ENTRY_POINT *SmbiosTable,
41 IN UINT8 Option
42 );
43
44 /**
45 Print the info of 64-bit EPS(Entry Point Structure).
46
47 @param[in] SmbiosTable Pointer to the SMBIOS table entry point.
48 @param[in] Option Display option.
49 **/
50 VOID
51 Smbios64BitPrintEPSInfo (
52 IN SMBIOS_TABLE_3_0_ENTRY_POINT *SmbiosTable,
53 IN UINT8 Option
54 );
55
56 /**
57 This function print the content of the structure pointed by Struct.
58
59 @param[in] Struct Point to the structure to be printed.
60 @param[in] Option Print option of information detail.
61
62 @retval EFI_SUCCESS Successfully Printing this function.
63 @retval EFI_INVALID_PARAMETER Invalid Structure.
64 @retval EFI_UNSUPPORTED Unsupported.
65 **/
66 EFI_STATUS
67 SmbiosPrintStructure (
68 IN SMBIOS_STRUCTURE_POINTER *Struct,
69 IN UINT8 Option
70 );
71
72 /**
73 Display BIOS Information (Type 0) information.
74
75 @param[in] Chara The information bits.
76 @param[in] Option The optional information.
77 **/
78 VOID
79 DisplayBiosCharacteristics (
80 IN UINT64 Chara,
81 IN UINT8 Option
82 );
83
84 /**
85 Display Bios Characteristice extensions1 information.
86
87 @param[in] Byte1 The information.
88 @param[in] Option The optional information.
89 **/
90 VOID
91 DisplayBiosCharacteristicsExt1 (
92 IN UINT8 Byte1,
93 IN UINT8 Option
94 );
95
96 /**
97 Display Bios Characteristice extensions2 information.
98
99 @param[in] Byte2 The information.
100 @param[in] Option The optional information.
101 **/
102 VOID
103 DisplayBiosCharacteristicsExt2 (
104 IN UINT8 Byte2,
105 IN UINT8 Option
106 );
107
108 /**
109 Display Processor Information (Type 4) information.
110
111 @param[in] Family The family value.
112 @param[in] Option The option value.
113 **/
114 VOID
115 DisplayProcessorFamily (
116 UINT8 Family,
117 UINT8 Option
118 );
119
120 /**
121 Display processor family information.
122
123 @param[in] Family2 The family value.
124 @param[in] Option The option value.
125 **/
126 VOID
127 DisplayProcessorFamily2 (
128 IN UINT16 Family2,
129 IN UINT8 Option
130 );
131
132 /**
133 Display processor voltage information.
134
135 @param[in] Voltage The Voltage.
136 Bit 7 Set to 0, indicating 'legacy' mode for processor voltage
137 Bits 6:4 Reserved, must be zero
138 Bits 3:0 Voltage Capability.
139 A Set bit indicates that the voltage is supported.
140 Bit 0 - 5V
141 Bit 1 - 3.3V
142 Bit 2 - 2.9V
143 Bit 3 - Reserved, must be zero.
144
145 Note:
146 Setting of multiple bits indicates the socket is configurable
147 If bit 7 is set to 1, the remaining seven bits of the field are set to
148 contain the processor's current voltage times 10.
149 For example, the field value for a processor voltage of 1.8 volts would be
150 92h = 80h + (1.8 * 10) = 80h + 18 = 80h +12h.
151
152 @param[in] Option The option.
153 **/
154 VOID
155 DisplayProcessorVoltage (
156 IN UINT8 Voltage,
157 IN UINT8 Option
158 );
159
160 /**
161 Display processor information.
162
163 @param[in] Status The status.
164 Bit 7 Reserved, must be 0
165 Bit 6 CPU Socket Populated
166 1 - CPU Socket Populated
167 0 - CPU Socket Unpopulated
168 Bits 5:3 Reserved, must be zero
169 Bits 2:0 CPU Status
170 0h - Unknown
171 1h - CPU Enabled
172 2h - CPU Disabled by User via BIOS Setup
173 3h - CPU Disabled By BIOS (POST Error)
174 4h - CPU is Idle, waiting to be enabled.
175 5-6h - Reserved
176 7h - Other
177
178 @param[in] Option The option
179 **/
180 VOID
181 DisplayProcessorStatus (
182 IN UINT8 Status,
183 IN UINT8 Option
184 );
185
186 /**
187 Display information about Memory Controller Information (Type 5).
188
189 @param[in] Size Memory size.
190 @param[in] SlotNum Which slot is this about.
191 @param[in] Option Option for the level of detail output required.
192 **/
193 VOID
194 DisplayMaxMemoryModuleSize (
195 IN UINT8 Size,
196 IN UINT8 SlotNum,
197 IN UINT8 Option
198 );
199
200 /**
201 Display information about memory configuration handles.
202
203 @param[in] Handles The buffer of handles to output info on.
204 @param[in] SlotNum The number of handles in the above buffer.
205 @param[in] Option Option for the level of detail output required.
206 **/
207 VOID
208 DisplayMemoryModuleConfigHandles (
209 IN UINT16 *Handles,
210 IN UINT8 SlotNum,
211 IN UINT8 Option
212 );
213
214 /**
215 Display Memory Module Information (Type 6).
216
217 @param[in] BankConnections
218 @param[in] Option
219 **/
220 VOID
221 DisplayMmBankConnections (
222 IN UINT8 BankConnections,
223 IN UINT8 Option
224 );
225
226 /**
227 Display memory informcation.
228
229 Bits 0:6 Size (n),
230 where 2**n is the size in MB with three special-case values:
231 7Dh Not determinable (Installed Size only)
232 7Eh Module is installed, but no memory has been enabled
233 7Fh Not installed
234 Bit 7 Defines whether the memory module has a single- (0)
235 or double-bank (1) connection.
236
237 @param[in] Size - The size
238 @param[in] Option - The option
239 **/
240 VOID
241 DisplayMmMemorySize (
242 IN UINT8 Size,
243 IN UINT8 Option
244 );
245
246 /**
247 Display Cache Configuration.
248
249 @param[in] CacheConfiguration Cache Configuration.
250 Bits 15:10 Reserved, must be 0
251 Bits 9:8 Operational Mode
252 0h - Write Through
253 1h - Write Back
254 2h - Varies with Memory Address
255 3h - Unknown
256 Bit 7 Enabled/Disabled
257 1 - Enabled
258 0 - Disabled
259 Bits 6:5 Location
260 0h - Internal
261 1h - External
262 2h - Reserved
263 3h - Unknown
264 Bit 4 Reserved, must be zero
265 Bit 3 Cache Socketed
266 1 - Socketed
267 0 - Unsocketed
268 Bits 2:0 Cache Level
269 1 through 8 (For example, an L1 cache would
270 use value 000b and an L3 cache would use 010b.)
271
272 @param[in] Option The option
273 **/
274 VOID
275 DisplayCacheConfiguration (
276 IN UINT16 CacheConfiguration,
277 IN UINT8 Option
278 );
279
280 /**
281 The Slot ID field of the System Slot structure provides a mechanism to
282 correlate the physical attributes of the slot to its logical access method
283 (which varies based on the Slot Type field).
284
285 @param[in] SlotId - The slot ID
286 @param[in] SlotType - The slot type
287 @param[in] Option - The Option
288 **/
289 VOID
290 DisplaySystemSlotId (
291 IN UINT16 SlotId,
292 IN UINT8 SlotType,
293 IN UINT8 Option
294 );
295
296 /**
297 Display Portable Battery (Type 22) information.
298
299 The date the cell pack was manufactured, in packed format:
300 Bits 15:9 Year, biased by 1980, in the range 0 to 127.
301 Bits 8:5 Month, in the range 1 to 12.
302 Bits 4:0 Date, in the range 1 to 31.
303 For example, 01 February 2000 would be identified as
304 0010 1000 0100 0001b (0x2841).
305
306 @param[in] Date The date
307 @param[in] Option The option
308 **/
309 VOID
310 DisplaySBDSManufactureDate (
311 IN UINT16 Date,
312 IN UINT8 Option
313 );
314
315 /**
316 Display System Reset (Type 23) information.
317
318 Routine Description:
319 Identifies the system-reset capabilities for the system.
320 Bits 7:6 Reserved for future assignment via this specification, set to 00b.
321 Bit 5 System contains a watchdog timer, either True (1) or False (0).
322 Bits 4:3 Boot Option on Limit.
323 Identifies the system action to be taken when the Reset Limit is reached, one of:
324 00b Reserved, do not use.
325 01b Operating system
326 10b System utilities
327 11b Do not rebootBits
328 2:1 Boot Option. Indicates the action to be taken following a watchdog reset, one of:
329 00b Reserved, do not use.
330 01b Operating system
331 10b System utilities
332 11b Do not reboot
333 Bit 0 Status.
334 1b The system reset is enabled by the user
335 0b The system reset is not enabled by the user
336
337 @param[in] Reset Reset
338 @param[in] Option The option
339 **/
340 VOID
341 DisplaySystemResetCapabilities (
342 IN UINT8 Reset,
343 IN UINT8 Option
344 );
345
346 /**
347 Display Hardware Security (Type 24) information.
348
349 Routine Description:
350 Identifies the password and reset status for the system:
351
352 Bits 7:6 Power-on Password Status, one of:
353 00b Disabled
354 01b Enabled
355 10b Not Implemented
356 11b Unknown
357 Bits 5:4 Keyboard Password Status, one of:
358 00b Disabled
359 01b Enabled
360 10b Not Implemented
361 11b Unknown
362 Bits 3:2 Administrator Password Status, one of:
363 00b Disabled
364 01b Enabled
365 10b Not Implemented
366 11b Unknown
367 Bits 1:0 Front Panel Reset Status, one of:
368 00b Disabled
369 01b Enabled
370 10b Not Implemented
371 11b Unknown
372
373 @param[in] Settings The device settings.
374 @param[in] Option The device options.
375 **/
376 VOID
377 DisplayHardwareSecuritySettings (
378 IN UINT8 Settings,
379 IN UINT8 Option
380 );
381
382 /**
383 Display Out-of-Band Remote Access (Type 30) information.
384
385 @param[in] Connections The device characteristics.
386 @param[in] Option The device options.
387 **/
388 VOID
389 DisplayOBRAConnections (
390 IN UINT8 Connections,
391 IN UINT8 Option
392 );
393
394 /**
395 Display System Boot Information (Type 32) information.
396
397 @param[in] Parameter The parameter.
398 @param[in] Option The options.
399 **/
400 VOID
401 DisplaySystemBootStatus (
402 IN UINT8 Parameter,
403 IN UINT8 Option
404 );
405
406 /**
407 Display System Power Supply (Type 39) information.
408
409 @param[in] Characteristics The device characteristics.
410 @param[in] Option The device options.
411 **/
412 VOID
413 DisplaySPSCharacteristics (
414 IN UINT16 Characteristics,
415 IN UINT8 Option
416 );
417
418 /**
419 Display TPM Device (Type 43) Characteristics.
420
421 @param[in] Chara The information bits.
422 @param[in] Option The optional information.
423 **/
424 VOID
425 DisplayTpmDeviceCharacteristics (
426 IN UINT64 Chara,
427 IN UINT8 Option
428 );
429
430 /**
431 Display Processor Architecture Type (Type 44).
432
433 @param[in] Key The key of the structure.
434 @param[in] Option The optional information.
435 **/
436 VOID
437 DisplayProcessorArchitectureType (
438 IN UINT8 Key,
439 IN UINT8 Option
440 );
441
442 #endif