]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/IndustryStandard: Update IPMI definitions
authorAbner Chang <abner.chang@amd.com>
Fri, 23 Dec 2022 06:20:06 +0000 (14:20 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 19 Jan 2023 02:32:26 +0000 (02:32 +0000)
This change updates IPMI header files to support
build up SMBIOS 42 Redfish Host Interface record
using the information retrieved via IPMI App/Net
Function.

In IpmiNetFnApp.h, we also remove the duplicate
definition of IPMI_APP_GET_CHANNEL_INFO.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdePkg/Include/IndustryStandard/Ipmi.h
MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h

index 9d1d412b53eed325e80fbed36d74dc713de21ee9..d6e7436b5ae849e0f6e503ba73fda4c236d54763 100644 (file)
@@ -6,6 +6,7 @@
   and Appendix H, Sub-function Assignments.\r
 \r
   Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
 #define IPMI_COMP_CODE_SUBFUNCTION_DISABLED             0xD6\r
 #define IPMI_COMP_CODE_UNSPECIFIED                      0xFF\r
 \r
+#define IPMI_CHANNEL_NUMBER_PRIMARY_IPMB                0x00\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_1   0x01\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_2   0x02\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_3   0x03\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_4   0x04\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_5   0x05\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_6   0x06\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_7   0x07\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_8   0x08\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_9   0x09\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_10  0x0A\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_11  0x0B\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_RESERVED_12  0x0C\r
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_RESERVED_13  0x0D\r
+#define IPMI_CHANNEL_NUMBER_PRIMARY_PRESENT_IF          0x0E\r
+#define IPMI_CHANNEL_NUMBER_PRIMARY_SYSTEM_INTERFACE    0x0F\r
 #endif\r
index 0721bc6b2717ba7131abb534c525ede41b9b104c..a5835ba08c00bfcc4cf6366147a48d91614aeb9c 100644 (file)
@@ -12,6 +12,7 @@
   and Appendix H, Sub-function Assignments.\r
 \r
   Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
@@ -486,6 +487,11 @@ typedef struct {
 //\r
 #define IPMI_APP_GET_SYSTEM_GUID  0x37\r
 \r
+typedef struct {\r
+  UINT8       CompletionCode;\r
+  EFI_GUID    SystemUuid;\r
+} IPMI_GET_SYSTEM_UUID_RESPONSE;\r
+\r
 //\r
 //  Constants and Structure definitions for "Get System GUID" command to follow here\r
 //\r
@@ -671,6 +677,30 @@ typedef struct {
 #define IPMI_CHANNEL_MEDIA_TYPE_OEM_START  0x60\r
 #define IPMI_CHANNEL_MEDIA_TYPE_OEM_END    0x7F\r
 \r
+//\r
+//  Definitions for channel protocol type\r
+//\r
+// Not available\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_NA  0x00\r
+// IPMB-1.0\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_IPMB_1_0  0x01\r
+// ICMB-1.0\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_ICMB_1_0  0x02\r
+// Reserved\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED  0x03\r
+// IPMI SMBUS\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_IPMI_SMBUS  0x04\r
+// KCS\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_KCS  0x05\r
+// SMIC\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_SMIC  0x06\r
+// BT-10\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_BT_10  0x07\r
+// BT-15\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_BT_15  0x08\r
+// TMode\r
+#define IPMI_CHANNEL_PROTOCOL_TYPE_TMODE  0x09\r
+\r
 typedef union {\r
   struct {\r
     UINT8    ChannelNo : 4;\r
@@ -713,10 +743,9 @@ typedef struct {
   UINT16                               AuxChannelInfo;\r
 } IPMI_GET_CHANNEL_INFO_RESPONSE;\r
 \r
-//\r
-//  Definitions for Get Channel Info command\r
-//\r
-#define IPMI_APP_GET_CHANNEL_INFO  0x42\r
+typedef struct {\r
+  IPMI_CHANNEL_INFO_CHANNEL_NUMBER    ChannelNumber;\r
+} IPMI_GET_CHANNEL_INFO_REQUEST;\r
 \r
 //\r
 //  Constants and Structure definitions for "Get Channel Info" command to follow here\r
index 19db84e5122e5d9500497975c34f258bc27e9c52..2024c35f7faa7bed2845660604941ef0ca64e912 100644 (file)
@@ -11,6 +11,7 @@
   and Appendix H, Sub-function Assignments.\r
 \r
   Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 \r
@@ -60,6 +61,7 @@ typedef enum {
   IpmiLanReserved3,\r
   IpmiLanDestinationType,\r
   IpmiLanDestinationAddress,\r
+  IpmiLanVlanId         = 0x14,\r
   IpmiIpv4OrIpv6Support = 0x32,\r
   IpmiIpv4OrIpv6AddressEnable,\r
   IpmiIpv6HdrStatTrafficClass,\r
@@ -103,6 +105,14 @@ typedef enum {
   IpmiOem2\r
 } IPMI_LAN_DEST_TYPE_DEST_TYPE;\r
 \r
+//\r
+// Destination address format\r
+//\r
+typedef enum {\r
+  IpmiDestinationAddressVersion4,\r
+  IpmiDestinationAddressVersion6\r
+} IPMI_LAN_DEST_ADDRESS_VERSION;\r
+\r
 typedef union {\r
   struct {\r
     UINT8    NoAuth       : 1;\r
@@ -177,6 +187,10 @@ typedef struct {
   UINT8    ArpInterval;\r
 } IPMI_LAN_ARP_INTERVAL;\r
 \r
+typedef struct {\r
+  UINT8    IpAddress[4];\r
+} IPMI_LAN_DEFAULT_GATEWAY;\r
+\r
 typedef struct {\r
   UINT8    Data[18];\r
 } IPMI_LAN_COMMUNITY_STRING;\r
@@ -227,6 +241,24 @@ typedef struct {
   IPMI_LAN_MAC_ADDRESS         AlertingMacAddress;\r
 } IPMI_LAN_DEST_ADDRESS;\r
 \r
+typedef struct {\r
+  UINT8    VanIdLowByte;\r
+} IPMI_LAN_VLAN_ID_DATA1;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8    VanIdHighByte : 4;\r
+    UINT8    Reserved      : 3;\r
+    UINT8    Enabled       : 1;\r
+  } Bits;\r
+  UINT8    Uint8;\r
+} IPMI_LAN_VLAN_ID_DATA2;\r
+\r
+typedef struct {\r
+  IPMI_LAN_VLAN_ID_DATA1    Data1;\r
+  IPMI_LAN_VLAN_ID_DATA2    Data2;\r
+} IPMI_LAN_VLAN_ID;\r
+\r
 typedef union {\r
   IPMI_LAN_AUTH_TYPE                    IpmiLanAuthType;\r
   IPMI_LAN_IP_ADDRESS                   IpmiLanIpAddress;\r