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