]>
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 - 2017, 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 Base Board (Type 2) Feature Flags.
100 @param[in] FeatureFlags The key of the structure.
101 @param[in] Option The optional information.
104 DisplayBaseBoardFeatureFlags (
105 IN UINT8 FeatureFlags
,
110 Display Base Board (Type 2) Board Type.
112 @param[in] Type The key of the structure.
113 @param[in] Option The optional information.
116 DisplayBaseBoardBoardType(
122 Display System Enclosure (Type 3) Enclosure Type.
124 @param[in] Type The key of the structure.
125 @param[in] Option The optional information.
128 DisplaySystemEnclosureType (
134 Display System Enclosure (Type 3) Enclosure Status.
136 @param[in] Status The key of the structure.
137 @param[in] Option The optional information.
140 DisplaySystemEnclosureStatus (
146 Display System Enclosure (Type 3) Security Status.
148 @param[in] Status The key of the structure.
149 @param[in] Option The optional information.
152 DisplaySESecurityStatus (
159 Display Processor Information (Type 4) Type.
161 @param[in] Type The key of the structure.
162 @param[in] Option The optional information.
165 DisplayProcessorType (
171 Display Processor Information (Type 4) Upgrade.
173 @param[in] Upgrade The key of the structure.
174 @param[in] Option The optional information.
177 DisplayProcessorUpgrade (
183 Display Processor Information (Type 4) Characteristics.
185 @param[in] Type The key of the structure.
186 @param[in] Option The optional information.
189 DisplayProcessorCharacteristics (
195 Display Memory Controller Information (Type 5) method.
197 @param[in] Method The key of the structure.
198 @param[in] Option The optional information.
201 DisplayMcErrorDetectMethod (
207 Display Memory Controller Information (Type 5) Capability.
209 @param[in] Capability The key of the structure.
210 @param[in] Option The optional information.
213 DisplayMcErrorCorrectCapability (
219 Display Memory Controller Information (Type 5) Support.
221 @param[in] Support The key of the structure.
222 @param[in] Option The optional information.
225 DisplayMcInterleaveSupport (
231 Display Memory Controller Information (Type 5) speeds.
233 @param[in] Speed The key of the structure.
234 @param[in] Option The optional information.
237 DisplayMcMemorySpeeds (
243 Display Memory Controller Information (Type 5) voltage.
245 @param[in] Voltage The key of the structure.
246 @param[in] Option The optional information.
249 DisplayMemoryModuleVoltage (
255 Display Memory Module Information (Type 6) type.
257 @param[in] Type The key of the structure.
258 @param[in] Option The optional information.
261 DisplayMmMemoryType (
267 Display Memory Module Information (Type 6) status.
269 @param[in] Status The key of the structure.
270 @param[in] Option The optional information.
273 DisplayMmErrorStatus (
279 Display Cache Information (Type 7) SRAM Type.
281 @param[in] Type The key of the structure.
282 @param[in] Option The optional information.
285 DisplayCacheSRAMType (
291 Display Cache Information (Type 7) correcting Type.
293 @param[in] Type The key of the structure.
294 @param[in] Option The optional information.
297 DisplayCacheErrCorrectingType (
303 Display Cache Information (Type 7) Type.
305 @param[in] Type The key of the structure.
306 @param[in] Option The optional information.
309 DisplayCacheSystemCacheType (
315 Display Cache Information (Type 7) Associativity.
317 @param[in] Associativity The key of the structure.
318 @param[in] Option The optional information.
321 DisplayCacheAssociativity (
322 IN UINT8 Associativity
,
327 Display Port Connector Information (Type 8) type.
329 @param[in] Type The key of the structure.
330 @param[in] Option The optional information.
333 DisplayPortConnectorType (
339 Display Port Connector Information (Type 8) port type.
341 @param[in] Type The key of the structure.
342 @param[in] Option The optional information.
351 Display System Slots (Type 9) slot type.
353 @param[in] Type The key of the structure.
354 @param[in] Option The optional information.
357 DisplaySystemSlotType (
363 Display System Slots (Type 9) data bus width.
365 @param[in] Width The key of the structure.
366 @param[in] Option The optional information.
369 DisplaySystemSlotDataBusWidth (
375 Display System Slots (Type 9) usage information.
377 @param[in] Usage The key of the structure.
378 @param[in] Option The optional information.
381 DisplaySystemSlotCurrentUsage (
387 Display System Slots (Type 9) slot length.
389 @param[in] Length The key of the structure.
390 @param[in] Option The optional information.
393 DisplaySystemSlotLength (
399 Display System Slots (Type 9) characteristics.
401 @param[in] Chara1 The key of the structure.
402 @param[in] Option The optional information.
405 DisplaySlotCharacteristics1 (
411 Display System Slots (Type 9) characteristics.
413 @param[in] Chara2 The key of the structure.
414 @param[in] Option The optional information.
417 DisplaySlotCharacteristics2 (
423 Display On Board Devices Information (Type 10) types.
425 @param[in] Type The key of the structure.
426 @param[in] Option The optional information.
429 DisplayOnboardDeviceTypes (
435 Display System Event Log (Type 15) types.
437 @param[in] Type The key of the structure.
438 @param[in] Option The optional information.
447 Display System Event Log (Type 15) format type.
449 @param[in] Type The key of the structure.
450 @param[in] Option The optional information.
453 DisplaySELVarDataFormatType (
459 Display System Event Log (Type 15) dw1.
461 @param[in] Key The key of the structure.
462 @param[in] Option The optional information.
465 DisplayPostResultsBitmapDw1 (
471 Display System Event Log (Type 15) dw2.
473 @param[in] Key The key of the structure.
474 @param[in] Option The optional information.
477 DisplayPostResultsBitmapDw2 (
483 Display System Event Log (Type 15) type.
485 @param[in] SMType The key of the structure.
486 @param[in] Option The optional information.
489 DisplaySELSysManagementTypes (
495 Display Physical Memory Array (Type 16) Location.
497 @param[in] Location The key of the structure.
498 @param[in] Option The optional information.
507 Display Physical Memory Array (Type 16) Use.
509 @param[in] Use The key of the structure.
510 @param[in] Option The optional information.
519 Display Physical Memory Array (Type 16) Types.
521 @param[in] Type The key of the structure.
522 @param[in] Option The optional information.
525 DisplayPMAErrorCorrectionTypes (
531 Display Memory Device (Type 17) form factor.
533 @param[in] FormFactor The key of the structure.
534 @param[in] Option The optional information.
537 DisplayMemoryDeviceFormFactor (
543 Display Memory Device (Type 17) type.
545 @param[in] Type The key of the structure.
546 @param[in] Option The optional information.
549 DisplayMemoryDeviceType (
555 Display Memory Device (Type 17) details.
557 @param[in] Para The key of the structure.
558 @param[in] Option The optional information.
561 DisplayMemoryDeviceTypeDetail (
567 Display 32-bit Memory Error Information (Type 18) type.
569 @param[in] ErrorType The key of the structure.
570 @param[in] Option The optional information.
573 DisplayMemoryErrorType (
579 Display 32-bit Memory Error Information (Type 18) error granularity.
581 @param[in] Granularity The key of the structure.
582 @param[in] Option The optional information.
585 DisplayMemoryErrorGranularity (
586 IN UINT8 Granularity
,
591 Display 32-bit Memory Error Information (Type 18) error information.
593 @param[in] Operation The key of the structure.
594 @param[in] Option The optional information.
597 DisplayMemoryErrorOperation (
603 Display Built-in Pointing Device (Type 21) type information.
605 @param[in] Type The key of the structure.
606 @param[in] Option The optional information.
609 DisplayPointingDeviceType (
615 Display Built-in Pointing Device (Type 21) information.
617 @param[in] Interface The key of the structure.
618 @param[in] Option The optional information.
621 DisplayPointingDeviceInterface (
627 Display Portable Battery (Type 22) information.
629 @param[in] Key The key of the structure.
630 @param[in] Option The optional information.
633 DisplayPBDeviceChemistry (
639 Display Voltage Probe (Type 26) location information.
641 @param[in] Key The key of the structure.
642 @param[in] Option The optional information.
651 Display Voltage Probe (Type 26) status ype information.
653 @param[in] Key The key of the structure.
654 @param[in] Option The optional information.
663 Display Cooling (Type 27) status information.
665 @param[in] Key The key of the structure.
666 @param[in] Option The optional information.
669 DisplayCoolingDeviceStatus (
675 Display Cooling (Type 27) type information.
677 @param[in] Key The key of the structure.
678 @param[in] Option The optional information.
681 DisplayCoolingDeviceType (
687 Display Temperature Probe (Type 28) status information.
689 @param[in] Key The key of the structure.
690 @param[in] Option The optional information.
693 DisplayTemperatureProbeStatus (
699 Display Temperature Probe (Type 28) location information.
701 @param[in] Key The key of the structure.
702 @param[in] Option The optional information.
705 DisplayTemperatureProbeLoc (
711 Display Electrical Current Probe (Type 29) status information.
713 @param[in] Key The key of the structure.
714 @param[in] Option The optional information.
723 Display Electrical Current Probe (Type 29) location information.
725 @param[in] Key The key of the structure.
726 @param[in] Option The optional information.
735 Display Management Device (Type 34) Type.
737 @param[in] Key The key of the structure.
738 @param[in] Option The optional information.
747 Display Management Device (Type 34) Address Type.
749 @param[in] Key The key of the structure.
750 @param[in] Option The optional information.
753 DisplayMDAddressType (
759 Display Memory Channel (Type 37) information.
761 @param[in] Key The key of the structure.
762 @param[in] Option The optional information.
765 DisplayMemoryChannelType (
771 Display IPMI Device Information (Type 38) information.
773 @param[in] Key The key of the structure.
774 @param[in] Option The optional information.
777 DisplayIPMIDIBMCInterfaceType (
783 Display Management Controller Host Interface (Type 42) information.
785 @param[in] Key The key of the structure.
786 @param[in] Option The optional information.
789 DisplayMCHostInterfaceType (