]>
git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h
2 Build a table, each item is (key, info) pair.
3 and give a interface of query a string out of a table.
5 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _SMBIOS_QUERY_TABLE_H_
17 #define _SMBIOS_QUERY_TABLE_H_
19 #define QUERY_TABLE_UNFOUND 0xFF
21 typedef struct TABLE_ITEM
{
27 // Print info by option
29 #define PRINT_INFO_OPTION(Value, Option) \
31 if (Option == SHOW_NONE) { \
34 if (Option < SHOW_DETAIL) { \
35 Print (L"0x%x\n", Value); \
41 Given a table and a Key, return the responding info.
44 Table[Index].Key is change from UINT8 to UINT16,
45 in order to deal with "0xaa - 0xbb".
48 DisplaySELVariableDataFormatTypes(UINT8 Type, UINT8 Option)
51 Now define Key = 0x7F07, that is to say: High = 0x7F, Low = 0x07.
52 Then all the Key Value between Low and High gets the same string
55 @param[in] Table The begin address of table.
56 @param[in] Number The number of table items.
57 @param[in] Key The query Key.
58 @param[in, out] Info Input as empty buffer; output as data buffer.
59 @param[in] InfoLen The max number of characters for Info.
61 @return the found Key and Info is valid.
62 @retval QUERY_TABLE_UNFOUND and Info should be NULL.
74 Display the structure type information.
76 @param[in] Key The key of the structure.
77 @param[in] Option The optional information.
80 DisplayStructureTypeInfo (
86 Display System Information (Type 1) Type.
88 @param[in] Type The key of the structure.
89 @param[in] Option The optional information.
92 DisplaySystemWakeupType (
98 Display System Enclosure (Type 3) Enclosure Type.
100 @param[in] Type The key of the structure.
101 @param[in] Option The optional information.
104 DisplaySystemEnclosureType (
110 Display System Enclosure (Type 3) Enclosure Status.
112 @param[in] Status The key of the structure.
113 @param[in] Option The optional information.
116 DisplaySystemEnclosureStatus (
122 Display System Enclosure (Type 3) Security Status.
124 @param[in] Status The key of the structure.
125 @param[in] Option The optional information.
128 DisplaySESecurityStatus (
135 Display Processor Information (Type 4) Type.
137 @param[in] Type The key of the structure.
138 @param[in] Option The optional information.
141 DisplayProcessorType (
147 Display Processor Information (Type 4) Upgrade.
149 @param[in] Upgrade The key of the structure.
150 @param[in] Option The optional information.
153 DisplayProcessorUpgrade (
159 Display Memory Controller Information (Type 5) method.
161 @param[in] Method The key of the structure.
162 @param[in] Option The optional information.
165 DisplayMcErrorDetectMethod (
171 Display Memory Controller Information (Type 5) Capability.
173 @param[in] Capability The key of the structure.
174 @param[in] Option The optional information.
177 DisplayMcErrorCorrectCapability (
183 Display Memory Controller Information (Type 5) Support.
185 @param[in] Support The key of the structure.
186 @param[in] Option The optional information.
189 DisplayMcInterleaveSupport (
195 Display Memory Controller Information (Type 5) speeds.
197 @param[in] Speed The key of the structure.
198 @param[in] Option The optional information.
201 DisplayMcMemorySpeeds (
207 Display Memory Controller Information (Type 5) voltage.
209 @param[in] Voltage The key of the structure.
210 @param[in] Option The optional information.
213 DisplayMemoryModuleVoltage (
219 Display Memory Module Information (Type 6) type.
221 @param[in] Type The key of the structure.
222 @param[in] Option The optional information.
225 DisplayMmMemoryType (
231 Display Memory Module Information (Type 6) status.
233 @param[in] Status The key of the structure.
234 @param[in] Option The optional information.
237 DisplayMmErrorStatus (
243 Display Cache Information (Type 7) SRAM Type.
245 @param[in] Type The key of the structure.
246 @param[in] Option The optional information.
249 DisplayCacheSRAMType (
255 Display Cache Information (Type 7) correcting Type.
257 @param[in] Type The key of the structure.
258 @param[in] Option The optional information.
261 DisplayCacheErrCorrectingType (
267 Display Cache Information (Type 7) Type.
269 @param[in] Type The key of the structure.
270 @param[in] Option The optional information.
273 DisplayCacheSystemCacheType (
279 Display Cache Information (Type 7) Associativity.
281 @param[in] Associativity The key of the structure.
282 @param[in] Option The optional information.
285 DisplayCacheAssociativity (
286 IN UINT8 Associativity
,
291 Display Port Connector Information (Type 8) type.
293 @param[in] Type The key of the structure.
294 @param[in] Option The optional information.
297 DisplayPortConnectorType (
303 Display Port Connector Information (Type 8) port type.
305 @param[in] Type The key of the structure.
306 @param[in] Option The optional information.
315 Display System Slots (Type 9) slot type.
317 @param[in] Type The key of the structure.
318 @param[in] Option The optional information.
321 DisplaySystemSlotType (
327 Display System Slots (Type 9) data bus width.
329 @param[in] Width The key of the structure.
330 @param[in] Option The optional information.
333 DisplaySystemSlotDataBusWidth (
339 Display System Slots (Type 9) usage information.
341 @param[in] Usage The key of the structure.
342 @param[in] Option The optional information.
345 DisplaySystemSlotCurrentUsage (
351 Display System Slots (Type 9) slot length.
353 @param[in] Length The key of the structure.
354 @param[in] Option The optional information.
357 DisplaySystemSlotLength (
363 Display System Slots (Type 9) characteristics.
365 @param[in] Chara1 The key of the structure.
366 @param[in] Option The optional information.
369 DisplaySlotCharacteristics1 (
375 Display System Slots (Type 9) characteristics.
377 @param[in] Chara2 The key of the structure.
378 @param[in] Option The optional information.
381 DisplaySlotCharacteristics2 (
387 Display On Board Devices Information (Type 10) types.
389 @param[in] Type The key of the structure.
390 @param[in] Option The optional information.
393 DisplayOnboardDeviceTypes (
399 Display System Event Log (Type 15) types.
401 @param[in] Type The key of the structure.
402 @param[in] Option The optional information.
411 Display System Event Log (Type 15) format type.
413 @param[in] Type The key of the structure.
414 @param[in] Option The optional information.
417 DisplaySELVarDataFormatType (
423 Display System Event Log (Type 15) dw1.
425 @param[in] Key The key of the structure.
426 @param[in] Option The optional information.
429 DisplayPostResultsBitmapDw1 (
435 Display System Event Log (Type 15) dw2.
437 @param[in] Key The key of the structure.
438 @param[in] Option The optional information.
441 DisplayPostResultsBitmapDw2 (
447 Display System Event Log (Type 15) type.
449 @param[in] SMType The key of the structure.
450 @param[in] Option The optional information.
453 DisplaySELSysManagementTypes (
459 Display Physical Memory Array (Type 16) Location.
461 @param[in] Location The key of the structure.
462 @param[in] Option The optional information.
471 Display Physical Memory Array (Type 16) Use.
473 @param[in] Use The key of the structure.
474 @param[in] Option The optional information.
483 Display Physical Memory Array (Type 16) Types.
485 @param[in] Type The key of the structure.
486 @param[in] Option The optional information.
489 DisplayPMAErrorCorrectionTypes (
495 Display Memory Device (Type 17) form factor.
497 @param[in] FormFactor The key of the structure.
498 @param[in] Option The optional information.
501 DisplayMemoryDeviceFormFactor (
507 Display Memory Device (Type 17) type.
509 @param[in] Type The key of the structure.
510 @param[in] Option The optional information.
513 DisplayMemoryDeviceType (
519 Display Memory Device (Type 17) details.
521 @param[in] Para The key of the structure.
522 @param[in] Option The optional information.
525 DisplayMemoryDeviceTypeDetail (
531 Display 32-bit Memory Error Information (Type 18) type.
533 @param[in] ErrorType The key of the structure.
534 @param[in] Option The optional information.
537 DisplayMemoryErrorType (
543 Display 32-bit Memory Error Information (Type 18) error granularity.
545 @param[in] Granularity The key of the structure.
546 @param[in] Option The optional information.
549 DisplayMemoryErrorGranularity (
550 IN UINT8 Granularity
,
555 Display 32-bit Memory Error Information (Type 18) error information.
557 @param[in] Operation The key of the structure.
558 @param[in] Option The optional information.
561 DisplayMemoryErrorOperation (
567 Display Built-in Pointing Device (Type 21) type information.
569 @param[in] Type The key of the structure.
570 @param[in] Option The optional information.
573 DisplayPointingDeviceType (
579 Display Built-in Pointing Device (Type 21) information.
581 @param[in] Interface The key of the structure.
582 @param[in] Option The optional information.
585 DisplayPointingDeviceInterface (
591 Display Portable Battery (Type 22) information.
593 @param[in] Key The key of the structure.
594 @param[in] Option The optional information.
597 DisplayPBDeviceChemistry (
603 Display Voltage Probe (Type 26) location information.
605 @param[in] Key The key of the structure.
606 @param[in] Option The optional information.
615 Display Voltage Probe (Type 26) status ype information.
617 @param[in] Key The key of the structure.
618 @param[in] Option The optional information.
627 Display Cooling (Type 27) status information.
629 @param[in] Key The key of the structure.
630 @param[in] Option The optional information.
633 DisplayCoolingDeviceStatus (
639 Display Cooling (Type 27) type information.
641 @param[in] Key The key of the structure.
642 @param[in] Option The optional information.
645 DisplayCoolingDeviceType (
651 Display Temperature Probe (Type 28) status information.
653 @param[in] Key The key of the structure.
654 @param[in] Option The optional information.
657 DisplayTemperatureProbeStatus (
663 Display Temperature Probe (Type 28) location information.
665 @param[in] Key The key of the structure.
666 @param[in] Option The optional information.
669 DisplayTemperatureProbeLoc (
675 Display Electrical Current Probe (Type 29) status information.
677 @param[in] Key The key of the structure.
678 @param[in] Option The optional information.
687 Display Electrical Current Probe (Type 29) location information.
689 @param[in] Key The key of the structure.
690 @param[in] Option The optional information.
699 Display Management Device (Type 34) information.
701 @param[in] Key The key of the structure.
702 @param[in] Option The optional information.
711 Display Memory Channel (Type 37) information.
713 @param[in] Key The key of the structure.
714 @param[in] Option The optional information.
717 DisplayMemoryChannelType (
723 Display IPMI Device Information (Type 38) information.
725 @param[in] Key The key of the structure.
726 @param[in] Option The optional information.
729 DisplayIPMIDIBMCInterfaceType (