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