summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbner Chang <abner.chang@amd.com>2022-12-23 14:20:06 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-19 02:32:26 +0000
commitcabcc6851b74925038e51d2265c5c63ab2a912cb (patch)
tree1dfd6e2a80f41ecb39d21b829d9e99f4e5d90798
parent998ebe5ca0ae5c449e83ede533bee872f97d63af (diff)
downloadedk2-cabcc6851b74925038e51d2265c5c63ab2a912cb.tar.gz
edk2-cabcc6851b74925038e51d2265c5c63ab2a912cb.tar.bz2
edk2-cabcc6851b74925038e51d2265c5c63ab2a912cb.zip
MdePkg/IndustryStandard: Update IPMI definitions
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>
-rw-r--r--MdePkg/Include/IndustryStandard/Ipmi.h17
-rw-r--r--MdePkg/Include/IndustryStandard/IpmiNetFnApp.h37
-rw-r--r--MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h32
3 files changed, 82 insertions, 4 deletions
diff --git a/MdePkg/Include/IndustryStandard/Ipmi.h b/MdePkg/Include/IndustryStandard/Ipmi.h
index 9d1d412b53..d6e7436b5a 100644
--- a/MdePkg/Include/IndustryStandard/Ipmi.h
+++ b/MdePkg/Include/IndustryStandard/Ipmi.h
@@ -6,6 +6,7 @@
and Appendix H, Sub-function Assignments.
Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -52,4 +53,20 @@
#define IPMI_COMP_CODE_SUBFUNCTION_DISABLED 0xD6
#define IPMI_COMP_CODE_UNSPECIFIED 0xFF
+#define IPMI_CHANNEL_NUMBER_PRIMARY_IPMB 0x00
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_1 0x01
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_2 0x02
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_3 0x03
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_4 0x04
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_5 0x05
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_6 0x06
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_7 0x07
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_8 0x08
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_9 0x09
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_10 0x0A
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_11 0x0B
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_RESERVED_12 0x0C
+#define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_RESERVED_13 0x0D
+#define IPMI_CHANNEL_NUMBER_PRIMARY_PRESENT_IF 0x0E
+#define IPMI_CHANNEL_NUMBER_PRIMARY_SYSTEM_INTERFACE 0x0F
#endif
diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
index 0721bc6b27..a5835ba08c 100644
--- a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
+++ b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
@@ -12,6 +12,7 @@
and Appendix H, Sub-function Assignments.
Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -486,6 +487,11 @@ typedef struct {
//
#define IPMI_APP_GET_SYSTEM_GUID 0x37
+typedef struct {
+ UINT8 CompletionCode;
+ EFI_GUID SystemUuid;
+} IPMI_GET_SYSTEM_UUID_RESPONSE;
+
//
// Constants and Structure definitions for "Get System GUID" command to follow here
//
@@ -671,6 +677,30 @@ typedef struct {
#define IPMI_CHANNEL_MEDIA_TYPE_OEM_START 0x60
#define IPMI_CHANNEL_MEDIA_TYPE_OEM_END 0x7F
+//
+// Definitions for channel protocol type
+//
+// Not available
+#define IPMI_CHANNEL_PROTOCOL_TYPE_NA 0x00
+// IPMB-1.0
+#define IPMI_CHANNEL_PROTOCOL_TYPE_IPMB_1_0 0x01
+// ICMB-1.0
+#define IPMI_CHANNEL_PROTOCOL_TYPE_ICMB_1_0 0x02
+// Reserved
+#define IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED 0x03
+// IPMI SMBUS
+#define IPMI_CHANNEL_PROTOCOL_TYPE_IPMI_SMBUS 0x04
+// KCS
+#define IPMI_CHANNEL_PROTOCOL_TYPE_KCS 0x05
+// SMIC
+#define IPMI_CHANNEL_PROTOCOL_TYPE_SMIC 0x06
+// BT-10
+#define IPMI_CHANNEL_PROTOCOL_TYPE_BT_10 0x07
+// BT-15
+#define IPMI_CHANNEL_PROTOCOL_TYPE_BT_15 0x08
+// TMode
+#define IPMI_CHANNEL_PROTOCOL_TYPE_TMODE 0x09
+
typedef union {
struct {
UINT8 ChannelNo : 4;
@@ -713,10 +743,9 @@ typedef struct {
UINT16 AuxChannelInfo;
} IPMI_GET_CHANNEL_INFO_RESPONSE;
-//
-// Definitions for Get Channel Info command
-//
-#define IPMI_APP_GET_CHANNEL_INFO 0x42
+typedef struct {
+ IPMI_CHANNEL_INFO_CHANNEL_NUMBER ChannelNumber;
+} IPMI_GET_CHANNEL_INFO_REQUEST;
//
// Constants and Structure definitions for "Get Channel Info" command to follow here
diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h b/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h
index 19db84e512..2024c35f7f 100644
--- a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h
+++ b/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h
@@ -11,6 +11,7 @@
and Appendix H, Sub-function Assignments.
Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -60,6 +61,7 @@ typedef enum {
IpmiLanReserved3,
IpmiLanDestinationType,
IpmiLanDestinationAddress,
+ IpmiLanVlanId = 0x14,
IpmiIpv4OrIpv6Support = 0x32,
IpmiIpv4OrIpv6AddressEnable,
IpmiIpv6HdrStatTrafficClass,
@@ -103,6 +105,14 @@ typedef enum {
IpmiOem2
} IPMI_LAN_DEST_TYPE_DEST_TYPE;
+//
+// Destination address format
+//
+typedef enum {
+ IpmiDestinationAddressVersion4,
+ IpmiDestinationAddressVersion6
+} IPMI_LAN_DEST_ADDRESS_VERSION;
+
typedef union {
struct {
UINT8 NoAuth : 1;
@@ -178,6 +188,10 @@ typedef struct {
} IPMI_LAN_ARP_INTERVAL;
typedef struct {
+ UINT8 IpAddress[4];
+} IPMI_LAN_DEFAULT_GATEWAY;
+
+typedef struct {
UINT8 Data[18];
} IPMI_LAN_COMMUNITY_STRING;
@@ -227,6 +241,24 @@ typedef struct {
IPMI_LAN_MAC_ADDRESS AlertingMacAddress;
} IPMI_LAN_DEST_ADDRESS;
+typedef struct {
+ UINT8 VanIdLowByte;
+} IPMI_LAN_VLAN_ID_DATA1;
+
+typedef union {
+ struct {
+ UINT8 VanIdHighByte : 4;
+ UINT8 Reserved : 3;
+ UINT8 Enabled : 1;
+ } Bits;
+ UINT8 Uint8;
+} IPMI_LAN_VLAN_ID_DATA2;
+
+typedef struct {
+ IPMI_LAN_VLAN_ID_DATA1 Data1;
+ IPMI_LAN_VLAN_ID_DATA2 Data2;
+} IPMI_LAN_VLAN_ID;
+
typedef union {
IPMI_LAN_AUTH_TYPE IpmiLanAuthType;
IPMI_LAN_IP_ADDRESS IpmiLanIpAddress;