]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.h
ShellPkg/UefiShellDebug1CommandsLib: Update to support SmBios 3.3.0
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / PrintInfo.h
index a6c8ef6ba8d771e931b3d449e24a356a7684d72a..fd219773de174a2d216618f34a3972f54cc8a9c5 100644 (file)
@@ -1,21 +1,16 @@
 /** @file\r
   Module to clarify the element info of the smbios structure.\r
 \r
-  Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2017 - 2019 Hewlett Packard Enterprise Development LP<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
-#ifndef _SMBIOS_PRINT_INFO_H\r
-#define _SMBIOS_PRINT_INFO_H\r
+#ifndef _SMBIOS_PRINT_INFO_H_\r
+#define _SMBIOS_PRINT_INFO_H_\r
 \r
-#include "LibSmbios.h"\r
+#include <IndustryStandard/SmBios.h>\r
 \r
 extern UINT8  SmbiosMajorVersion;\r
 extern UINT8  SmbiosMinorVersion;\r
@@ -34,159 +29,413 @@ extern UINT8  SmbiosMinorVersion;
 #define AS_UINT32(pData)  (*((UINT32 *) pData))\r
 #define AS_UINT64(pData)  (*((UINT64 *) pData))\r
 \r
+/**\r
+  Print the info of EPS(Entry Point Structure).\r
+\r
+  @param[in] SmbiosTable    Pointer to the SMBIOS table entry point.\r
+  @param[in] Option         Display option.\r
+**/\r
 VOID\r
 SmbiosPrintEPSInfo (\r
-  IN  SMBIOS_STRUCTURE_TABLE  *pSmbiosTable,\r
-  IN  UINT8                   Option\r
+  IN  SMBIOS_TABLE_ENTRY_POINT  *SmbiosTable,\r
+  IN  UINT8                     Option\r
+  );\r
+\r
+/**\r
+  Print the info of 64-bit EPS(Entry Point Structure).\r
+\r
+  @param[in] SmbiosTable    Pointer to the SMBIOS table entry point.\r
+  @param[in] Option         Display option.\r
+**/\r
+VOID\r
+Smbios64BitPrintEPSInfo (\r
+  IN  SMBIOS_TABLE_3_0_ENTRY_POINT  *SmbiosTable,\r
+  IN  UINT8                         Option\r
   );\r
 \r
+/**\r
+  This function print the content of the structure pointed by Struct.\r
+\r
+  @param[in] Struct       Point to the structure to be printed.\r
+  @param[in] Option       Print option of information detail.\r
+\r
+  @retval EFI_SUCCESS               Successfully Printing this function.\r
+  @retval EFI_INVALID_PARAMETER     Invalid Structure.\r
+  @retval EFI_UNSUPPORTED           Unsupported.\r
+**/\r
 EFI_STATUS\r
 SmbiosPrintStructure (\r
-  IN  SMBIOS_STRUCTURE_POINTER  *pStruct,\r
+  IN  SMBIOS_STRUCTURE_POINTER  *Struct,\r
   IN  UINT8                     Option\r
   );\r
 \r
-//\r
-// BIOS Information (Type 0)\r
-//\r
+/**\r
+  Display BIOS Information (Type 0) information.\r
+\r
+  @param[in] Chara    The information bits.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristics (\r
-  UINT64  chara,\r
-  UINT8   Option\r
+  IN UINT64  Chara,\r
+  IN UINT8   Option\r
   );\r
+\r
+/**\r
+  Display Bios Characteristice extensions1 information.\r
+\r
+  @param[in] Byte1    The information.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristicsExt1 (\r
-  UINT8 byte1,\r
-  UINT8 Option\r
+  IN UINT8 Byte1,\r
+  IN UINT8 Option\r
   );\r
+\r
+/**\r
+  Display Bios Characteristice extensions2 information.\r
+\r
+  @param[in] Byte2    The information.\r
+  @param[in] Option   The optional information.\r
+**/\r
 VOID\r
 DisplayBiosCharacteristicsExt2 (\r
-  UINT8 byte2,\r
-  UINT8 Option\r
+  IN UINT8 Byte2,\r
+  IN UINT8 Option\r
   );\r
 \r
-//\r
-// Processor Information (Type 4)\r
-//\r
+/**\r
+  Display Processor Information (Type 4) information.\r
+\r
+  @param[in] Family       The family value.\r
+  @param[in] Option       The option value.\r
+**/\r
 VOID\r
 DisplayProcessorFamily (\r
   UINT8 Family,\r
   UINT8 Option\r
   );\r
 \r
+/**\r
+  Display processor family information.\r
+\r
+  @param[in] Family2      The family value.\r
+  @param[in] Option       The option value.\r
+**/\r
 VOID\r
 DisplayProcessorFamily2 (\r
-  UINT16 Family2,\r
-  UINT8  Option\r
+  IN UINT16 Family2,\r
+  IN UINT8  Option\r
   );\r
 \r
+/**\r
+  Display processor voltage information.\r
+\r
+  @param[in] Voltage      The Voltage.\r
+                      Bit 7 Set to 0, indicating 'legacy' mode for processor voltage\r
+                      Bits 6:4  Reserved, must be zero\r
+                      Bits 3:0  Voltage Capability.\r
+                                A Set bit indicates that the voltage is supported.\r
+                        Bit 0 - 5V\r
+                        Bit 1 - 3.3V\r
+                        Bit 2 - 2.9V\r
+                        Bit 3 - Reserved, must be zero.\r
+\r
+                      Note:\r
+                        Setting of multiple bits indicates the socket is configurable\r
+                        If bit 7 is set to 1, the remaining seven bits of the field are set to\r
+                        contain the processor's current voltage times 10.\r
+                        For example, the field value for a processor voltage of 1.8 volts would be\r
+                        92h = 80h + (1.8 * 10) = 80h + 18 = 80h +12h.\r
+\r
+  @param[in] Option       The option.\r
+**/\r
 VOID\r
 DisplayProcessorVoltage (\r
-  UINT8 Voltage,\r
-  UINT8 Option\r
+  IN UINT8 Voltage,\r
+  IN UINT8 Option\r
   );\r
+\r
+/**\r
+  Display processor information.\r
+\r
+  @param[in] Status   The status.\r
+Bit 7 Reserved, must be 0\r
+Bit 6 CPU Socket Populated\r
+  1 - CPU Socket Populated\r
+  0 - CPU Socket Unpopulated\r
+Bits 5:3 Reserved, must be zero\r
+Bits 2:0 CPU Status\r
+  0h - Unknown\r
+  1h - CPU Enabled\r
+  2h - CPU Disabled by User via BIOS Setup\r
+  3h - CPU Disabled By BIOS (POST Error)\r
+  4h - CPU is Idle, waiting to be enabled.\r
+  5-6h - Reserved\r
+  7h - Other\r
+\r
+  @param[in] Option   The option\r
+**/\r
 VOID\r
 DisplayProcessorStatus (\r
-  UINT8 Status,\r
-  UINT8 Option\r
+  IN UINT8 Status,\r
+  IN UINT8 Option\r
   );\r
 \r
-//\r
-// Memory Controller Information (Type 5)\r
-//\r
+/**\r
+  Display information about Memory Controller Information (Type 5).\r
+\r
+  @param[in] Size     Memory size.\r
+  @param[in] SlotNum  Which slot is this about.\r
+  @param[in] Option   Option for the level of detail output required.\r
+**/\r
 VOID\r
 DisplayMaxMemoryModuleSize (\r
-  UINT8 Size,\r
-  UINT8 SlotNum,\r
-  UINT8 Option\r
+  IN UINT8 Size,\r
+  IN UINT8 SlotNum,\r
+  IN UINT8 Option\r
   );\r
+\r
+/**\r
+  Display information about memory configuration handles.\r
+\r
+  @param[in] Handles  The buffer of handles to output info on.\r
+  @param[in] SlotNum  The number of handles in the above buffer.\r
+  @param[in] Option   Option for the level of detail output required.\r
+**/\r
 VOID\r
 DisplayMemoryModuleConfigHandles (\r
-  UINT16  *pHandles,\r
-  UINT8   SlotNum,\r
-  UINT8   Option\r
+  IN UINT16 *Handles,\r
+  IN UINT8  SlotNum,\r
+  IN UINT8  Option\r
   );\r
 \r
-//\r
-// Memory Module Information (Type 6)\r
-//\r
+/**\r
+  Display Memory Module Information (Type 6).\r
+\r
+  @param[in] BankConnections\r
+  @param[in] Option\r
+**/\r
 VOID\r
 DisplayMmBankConnections (\r
-  UINT8 BankConnections,\r
-  UINT8 Option\r
+  IN UINT8 BankConnections,\r
+  IN UINT8 Option\r
   );\r
+\r
+/**\r
+  Display memory informcation.\r
+\r
+  Bits 0:6  Size (n),\r
+      where 2**n is the size in MB with three special-case values:\r
+      7Dh Not determinable (Installed Size only)\r
+      7Eh Module is installed, but no memory has been enabled\r
+      7Fh Not installed\r
+  Bit  7  Defines whether the memory module has a single- (0)\r
+          or double-bank (1) connection.\r
+\r
+  @param[in] Size   - The size\r
+  @param[in] Option - The option\r
+**/\r
 VOID\r
 DisplayMmMemorySize (\r
-  UINT8 Size,\r
-  UINT8 Option\r
+  IN UINT8 Size,\r
+  IN UINT8 Option\r
   );\r
 \r
-//\r
-// System Slots (Type 9)\r
-//\r
+/**\r
+  Display Cache Configuration.\r
+\r
+  @param[in] CacheConfiguration   Cache Configuration.\r
+Bits 15:10 Reserved, must be 0\r
+Bits 9:8 Operational Mode\r
+  0h - Write Through\r
+  1h - Write Back\r
+  2h - Varies with Memory Address\r
+  3h - Unknown\r
+Bit 7 Enabled/Disabled\r
+  1 - Enabled\r
+  0 - Disabled\r
+Bits 6:5 Location\r
+  0h - Internal\r
+  1h - External\r
+  2h - Reserved\r
+  3h - Unknown\r
+Bit 4 Reserved, must be zero\r
+Bit 3 Cache Socketed\r
+  1 - Socketed\r
+  0 - Unsocketed\r
+Bits 2:0 Cache Level\r
+  1 through 8 (For example, an L1 cache would\r
+  use value 000b and an L3 cache would use 010b.)\r
+\r
+  @param[in] Option   The option\r
+**/\r
+VOID\r
+DisplayCacheConfiguration (\r
+  IN UINT16 CacheConfiguration,\r
+  IN UINT8 Option\r
+  );\r
+\r
+/**\r
+  The Slot ID field of the System Slot structure provides a mechanism to\r
+  correlate the physical attributes of the slot to its logical access method\r
+  (which varies based on the Slot Type field).\r
+\r
+  @param[in] SlotId   - The slot ID\r
+  @param[in] SlotType - The slot type\r
+  @param[in] Option   - The Option\r
+**/\r
 VOID\r
 DisplaySystemSlotId (\r
-  UINT16  SlotId,\r
-  UINT8   SlotType,\r
-  UINT8   Option\r
+  IN UINT16  SlotId,\r
+  IN UINT8   SlotType,\r
+  IN UINT8   Option\r
   );\r
 \r
-//\r
-// Physical Memory Array (Type 16)\r
-// Memory Device (Type 17)\r
-// Memory Array Mapped Address (Type 19)\r
-// Memory Device Mapped Address (Type 20)\r
-// Portable Battery (Type 22)\r
-//\r
+/**\r
+  Display Portable Battery (Type 22) information.\r
+\r
+  The date the cell pack was manufactured, in packed format:\r
+   Bits 15:9  Year, biased by 1980, in the range 0 to 127.\r
+   Bits 8:5 Month, in the range 1 to 12.\r
+   Bits 4:0 Date, in the range 1 to 31.\r
+  For example, 01 February 2000 would be identified as\r
+  0010 1000 0100 0001b (0x2841).\r
+\r
+  @param[in] Date     The date\r
+  @param[in] Option   The option\r
+**/\r
 VOID\r
 DisplaySBDSManufactureDate (\r
-  UINT16  Date,\r
-  UINT8   Option\r
+  IN UINT16  Date,\r
+  IN UINT8   Option\r
   );\r
 \r
-//\r
-// System Reset  (Type 23)\r
-//\r
+/**\r
+  Display System Reset  (Type 23) information.\r
+\r
+  Routine Description:\r
+  Identifies the system-reset capabilities for the system.\r
+   Bits 7:6 Reserved for future assignment via this specification, set to 00b.\r
+   Bit 5  System contains a watchdog timer, either True (1) or False (0).\r
+   Bits 4:3 Boot Option on Limit.\r
+    Identifies the system action to be taken when the Reset Limit is reached, one of:\r
+    00b Reserved, do not use.\r
+    01b Operating system\r
+    10b System utilities\r
+    11b Do not rebootBits\r
+   2:1  Boot Option.  Indicates the action to be taken following a watchdog reset, one of:\r
+    00b Reserved, do not use.\r
+    01b Operating system\r
+    10b System utilities\r
+    11b Do not reboot\r
+   Bit 0  Status.\r
+    1b The system reset is enabled by the user\r
+    0b The system reset is not enabled by the user\r
+\r
+  @param[in] Reset   Reset\r
+  @param[in] Option  The option\r
+**/\r
 VOID\r
 DisplaySystemResetCapabilities (\r
-  UINT8 Reset,\r
-  UINT8 Option\r
+  IN UINT8 Reset,\r
+  IN UINT8 Option\r
   );\r
 \r
-//\r
-// Hardware Security (Type 24)\r
-//\r
+/**\r
+  Display Hardware Security (Type 24) information.\r
+\r
+    Routine Description:\r
+    Identifies the password and reset status for the system:\r
+\r
+    Bits 7:6    Power-on Password Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 5:4    Keyboard Password Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 3:2    Administrator Password Status, one  of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+    Bits 1:0    Front Panel Reset Status, one of:\r
+      00b Disabled\r
+      01b Enabled\r
+      10b Not Implemented\r
+      11b Unknown\r
+\r
+  @param[in] Settings The device settings.\r
+  @param[in] Option   The device options.\r
+**/\r
 VOID\r
 DisplayHardwareSecuritySettings (\r
-  UINT8 Settings,\r
-  UINT8 Option\r
+  IN UINT8 Settings,\r
+  IN UINT8 Option\r
   );\r
 \r
-//\r
-// Out-of-Band Remote Access (Type 30)\r
-//\r
+/**\r
+  Display Out-of-Band Remote Access (Type 30) information.\r
+\r
+  @param[in] Connections        The device characteristics.\r
+  @param[in] Option             The device options.\r
+**/\r
 VOID\r
 DisplayOBRAConnections (\r
-  UINT8   Connections,\r
-  UINT8   Option\r
+  IN UINT8   Connections,\r
+  IN UINT8   Option\r
   );\r
 \r
-//\r
-// System Boot Information (Type 32)\r
-//\r
+/**\r
+  Display System Boot Information (Type 32) information.\r
+\r
+  @param[in] Parameter      The parameter.\r
+  @param[in] Option         The options.\r
+**/\r
 VOID\r
 DisplaySystemBootStatus (\r
-  UINT8 Parameter,\r
-  UINT8 Option\r
+  IN UINT8 Parameter,\r
+  IN UINT8 Option\r
   );\r
 \r
-//\r
-// System Power Supply (Type 39)\r
-//\r
+/**\r
+  Display System Power Supply (Type 39) information.\r
+\r
+  @param[in] Characteristics    The device characteristics.\r
+  @param[in] Option             The device options.\r
+**/\r
 VOID\r
 DisplaySPSCharacteristics (\r
-  UINT16  Characteristics,\r
-  UINT8   Option\r
+  IN UINT16  Characteristics,\r
+  IN UINT8   Option\r
   );\r
 \r
+/**\r
+  Display TPM Device (Type 43) Characteristics.\r
+\r
+  @param[in] Chara    The information bits.\r
+  @param[in] Option   The optional information.\r
+**/\r
+VOID\r
+DisplayTpmDeviceCharacteristics (\r
+  IN UINT64  Chara,\r
+  IN UINT8   Option\r
+  );\r
+\r
+/**\r
+  Display Processor Architecture Type (Type 44).\r
+\r
+  @param[in] Key            The key of the structure.\r
+  @param[in] Option         The optional information.\r
+**/\r
+VOID\r
+DisplayProcessorArchitectureType (\r
+  IN UINT8 Key,\r
+  IN UINT8 Option\r
+  );\r
 #endif\r