VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h

Last change on this file was 101291, checked in by vboxsync, 19 months ago

EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette