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