]>
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 - 2019, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef _SMBIOS_QUERY_TABLE_H_
11 #define _SMBIOS_QUERY_TABLE_H_
13 #include <IndustryStandard/SmBios.h>
15 #define QUERY_TABLE_UNFOUND 0xFF
17 typedef struct TABLE_ITEM
{
23 // Print info by option
25 #define PRINT_INFO_OPTION(Value, Option) \
27 if (Option == SHOW_NONE) { \
30 if (Option < SHOW_DETAIL) { \
31 Print (L"0x%x\n", Value); \
37 Given a table and a Key, return the responding info.
40 Table[Index].Key is change from UINT8 to UINT16,
41 in order to deal with "0xaa - 0xbb".
44 DisplaySELVariableDataFormatTypes(UINT8 Type, UINT8 Option)
47 Now define Key = 0x7F07, that is to say: High = 0x7F, Low = 0x07.
48 Then all the Key Value between Low and High gets the same string
51 @param[in] Table The begin address of table.
52 @param[in] Number The number of table items.
53 @param[in] Key The query Key.
54 @param[in, out] Info Input as empty buffer; output as data buffer.
55 @param[in] InfoLen The max number of characters for Info.
57 @return the found Key and Info is valid.
58 @retval QUERY_TABLE_UNFOUND and Info should be NULL.
70 Display the structure type information.
72 @param[in] Key The key of the structure.
73 @param[in] Option The optional information.
76 DisplayStructureTypeInfo (
82 Display System Information (Type 1) Type.
84 @param[in] Type The key of the structure.
85 @param[in] Option The optional information.
88 DisplaySystemWakeupType (
94 Display Base Board (Type 2) Feature Flags.
96 @param[in] FeatureFlags The key of the structure.
97 @param[in] Option The optional information.
100 DisplayBaseBoardFeatureFlags (
101 IN UINT8 FeatureFlags
,
106 Display Base Board (Type 2) Board Type.
108 @param[in] Type The key of the structure.
109 @param[in] Option The optional information.
112 DisplayBaseBoardBoardType(
118 Display System Enclosure (Type 3) Enclosure Type.
120 @param[in] Type The key of the structure.
121 @param[in] Option The optional information.
124 DisplaySystemEnclosureType (
130 Display System Enclosure (Type 3) Enclosure Status.
132 @param[in] Status The key of the structure.
133 @param[in] Option The optional information.
136 DisplaySystemEnclosureStatus (
142 Display System Enclosure (Type 3) Security Status.
144 @param[in] Status The key of the structure.
145 @param[in] Option The optional information.
148 DisplaySESecurityStatus (
155 Display Processor Information (Type 4) Type.
157 @param[in] Type The key of the structure.
158 @param[in] Option The optional information.
161 DisplayProcessorType (
167 Display Processor Information (Type 4) Upgrade.
169 @param[in] Upgrade The key of the structure.
170 @param[in] Option The optional information.
173 DisplayProcessorUpgrade (
179 Display Processor Information (Type 4) Characteristics.
181 @param[in] Type The key of the structure.
182 @param[in] Option The optional information.
185 DisplayProcessorCharacteristics (
191 Display Memory Controller Information (Type 5) method.
193 @param[in] Method The key of the structure.
194 @param[in] Option The optional information.
197 DisplayMcErrorDetectMethod (
203 Display Memory Controller Information (Type 5) Capability.
205 @param[in] Capability The key of the structure.
206 @param[in] Option The optional information.
209 DisplayMcErrorCorrectCapability (
215 Display Memory Controller Information (Type 5) Support.
217 @param[in] Support The key of the structure.
218 @param[in] Option The optional information.
221 DisplayMcInterleaveSupport (
227 Display Memory Controller Information (Type 5) speeds.
229 @param[in] Speed The key of the structure.
230 @param[in] Option The optional information.
233 DisplayMcMemorySpeeds (
239 Display Memory Controller Information (Type 5) voltage.
241 @param[in] Voltage The key of the structure.
242 @param[in] Option The optional information.
245 DisplayMemoryModuleVoltage (
251 Display Memory Module Information (Type 6) type.
253 @param[in] Type The key of the structure.
254 @param[in] Option The optional information.
257 DisplayMmMemoryType (
263 Display Memory Module Information (Type 6) status.
265 @param[in] Status The key of the structure.
266 @param[in] Option The optional information.
269 DisplayMmErrorStatus (
275 Display Cache Information (Type 7) SRAM Type.
277 @param[in] Type The key of the structure.
278 @param[in] Option The optional information.
281 DisplayCacheSRAMType (
287 Display Cache Information (Type 7) correcting Type.
289 @param[in] Type The key of the structure.
290 @param[in] Option The optional information.
293 DisplayCacheErrCorrectingType (
299 Display Cache Information (Type 7) Type.
301 @param[in] Type The key of the structure.
302 @param[in] Option The optional information.
305 DisplayCacheSystemCacheType (
311 Display Cache Information (Type 7) Associativity.
313 @param[in] Associativity The key of the structure.
314 @param[in] Option The optional information.
317 DisplayCacheAssociativity (
318 IN UINT8 Associativity
,
323 Display Port Connector Information (Type 8) type.
325 @param[in] Type The key of the structure.
326 @param[in] Option The optional information.
329 DisplayPortConnectorType (
335 Display Port Connector Information (Type 8) port type.
337 @param[in] Type The key of the structure.
338 @param[in] Option The optional information.
347 Display System Slots (Type 9) slot type.
349 @param[in] Type The key of the structure.
350 @param[in] Option The optional information.
353 DisplaySystemSlotType (
359 Display System Slots (Type 9) data bus width.
361 @param[in] Width The key of the structure.
362 @param[in] Option The optional information.
365 DisplaySystemSlotDataBusWidth (
371 Display System Slots (Type 9) usage information.
373 @param[in] Usage The key of the structure.
374 @param[in] Option The optional information.
377 DisplaySystemSlotCurrentUsage (
383 Display System Slots (Type 9) slot length.
385 @param[in] Length The key of the structure.
386 @param[in] Option The optional information.
389 DisplaySystemSlotLength (
395 Display System Slots (Type 9) characteristics.
397 @param[in] Chara1 The key of the structure.
398 @param[in] Option The optional information.
401 DisplaySlotCharacteristics1 (
407 Display System Slots (Type 9) characteristics.
409 @param[in] Chara2 The key of the structure.
410 @param[in] Option The optional information.
413 DisplaySlotCharacteristics2 (
419 Display On Board Devices Information (Type 10) types.
421 @param[in] Type The key of the structure.
422 @param[in] Option The optional information.
425 DisplayOnboardDeviceTypes (
431 Display System Event Log (Type 15) types.
433 @param[in] Type The key of the structure.
434 @param[in] Option The optional information.
443 Display System Event Log (Type 15) format type.
445 @param[in] Type The key of the structure.
446 @param[in] Option The optional information.
449 DisplaySELVarDataFormatType (
455 Display System Event Log (Type 15) dw1.
457 @param[in] Key The key of the structure.
458 @param[in] Option The optional information.
461 DisplayPostResultsBitmapDw1 (
467 Display System Event Log (Type 15) dw2.
469 @param[in] Key The key of the structure.
470 @param[in] Option The optional information.
473 DisplayPostResultsBitmapDw2 (
479 Display System Event Log (Type 15) type.
481 @param[in] SMType The key of the structure.
482 @param[in] Option The optional information.
485 DisplaySELSysManagementTypes (
491 Display Physical Memory Array (Type 16) Location.
493 @param[in] Location The key of the structure.
494 @param[in] Option The optional information.
503 Display Physical Memory Array (Type 16) Use.
505 @param[in] Use The key of the structure.
506 @param[in] Option The optional information.
515 Display Physical Memory Array (Type 16) Types.
517 @param[in] Type The key of the structure.
518 @param[in] Option The optional information.
521 DisplayPMAErrorCorrectionTypes (
527 Display Memory Device (Type 17) form factor.
529 @param[in] FormFactor The key of the structure.
530 @param[in] Option The optional information.
533 DisplayMemoryDeviceFormFactor (
539 Display Memory Device (Type 17) type.
541 @param[in] Type The key of the structure.
542 @param[in] Option The optional information.
545 DisplayMemoryDeviceType (
551 Display Memory Device (Type 17) details.
553 @param[in] Para The key of the structure.
554 @param[in] Option The optional information.
557 DisplayMemoryDeviceTypeDetail (
563 Display Memory Device (Type 17) memory technology.
565 @param[in] Para The key of the structure.
566 @param[in] Option The optional information.
569 DisplayMemoryDeviceMemoryTechnology (
575 Display Memory Device (Type 17) memory operating mode capability.
577 @param[in] Para The key of the structure.
578 @param[in] Option The optional information.
581 DisplayMemoryDeviceMemoryOperatingModeCapability (
587 Display 32-bit Memory Error Information (Type 18) type.
589 @param[in] ErrorType The key of the structure.
590 @param[in] Option The optional information.
593 DisplayMemoryErrorType (
599 Display 32-bit Memory Error Information (Type 18) error granularity.
601 @param[in] Granularity The key of the structure.
602 @param[in] Option The optional information.
605 DisplayMemoryErrorGranularity (
606 IN UINT8 Granularity
,
611 Display 32-bit Memory Error Information (Type 18) error information.
613 @param[in] Operation The key of the structure.
614 @param[in] Option The optional information.
617 DisplayMemoryErrorOperation (
623 Display Built-in Pointing Device (Type 21) type information.
625 @param[in] Type The key of the structure.
626 @param[in] Option The optional information.
629 DisplayPointingDeviceType (
635 Display Built-in Pointing Device (Type 21) information.
637 @param[in] Interface The key of the structure.
638 @param[in] Option The optional information.
641 DisplayPointingDeviceInterface (
647 Display Portable Battery (Type 22) information.
649 @param[in] Key The key of the structure.
650 @param[in] Option The optional information.
653 DisplayPBDeviceChemistry (
659 Display Voltage Probe (Type 26) location information.
661 @param[in] Key The key of the structure.
662 @param[in] Option The optional information.
671 Display Voltage Probe (Type 26) status ype information.
673 @param[in] Key The key of the structure.
674 @param[in] Option The optional information.
683 Display Cooling (Type 27) status information.
685 @param[in] Key The key of the structure.
686 @param[in] Option The optional information.
689 DisplayCoolingDeviceStatus (
695 Display Cooling (Type 27) type information.
697 @param[in] Key The key of the structure.
698 @param[in] Option The optional information.
701 DisplayCoolingDeviceType (
707 Display Temperature Probe (Type 28) status information.
709 @param[in] Key The key of the structure.
710 @param[in] Option The optional information.
713 DisplayTemperatureProbeStatus (
719 Display Temperature Probe (Type 28) location information.
721 @param[in] Key The key of the structure.
722 @param[in] Option The optional information.
725 DisplayTemperatureProbeLoc (
731 Display Electrical Current Probe (Type 29) status information.
733 @param[in] Key The key of the structure.
734 @param[in] Option The optional information.
743 Display Electrical Current Probe (Type 29) location information.
745 @param[in] Key The key of the structure.
746 @param[in] Option The optional information.
755 Display Management Device (Type 34) Type.
757 @param[in] Key The key of the structure.
758 @param[in] Option The optional information.
767 Display Management Device (Type 34) Address Type.
769 @param[in] Key The key of the structure.
770 @param[in] Option The optional information.
773 DisplayMDAddressType (
779 Display Memory Channel (Type 37) information.
781 @param[in] Key The key of the structure.
782 @param[in] Option The optional information.
785 DisplayMemoryChannelType (
791 Display IPMI Device Information (Type 38) information.
793 @param[in] Key The key of the structure.
794 @param[in] Option The optional information.
797 DisplayIPMIDIBMCInterfaceType (
803 Display Management Controller Host Interface (Type 42) information.
805 @param[in] Key The key of the structure.
806 @param[in] Option The optional information.
809 DisplayMCHostInterfaceType (