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