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