public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/3] IPMI changes for Redfish
@ 2022-12-23 12:33 Chang, Abner
  2022-12-23 12:33 ` [PATCH 1/3] MdePkg/IndustryStandard: Update IPMI definitions Chang, Abner
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Chang, Abner @ 2022-12-23 12:33 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang,
	Igor Kulchytskyy, Isaac Oram, Nate DeSimone

From: Abner Chang <abner.chang@amd.com>

This patch updates IPMI related definitions for supporting
Redfish Host interface Credential bootstrapping spec and
building up SMBIOS 42 record for the USB NIC host
interface exposed by BMC.
The corresponding updates on IpmiFeaturePkg is in the
separate pacth for edk2-platforms.

This is the part I of upstream, the follow up patche sets are:
- RedfishPlatformCredentialLib contributed by NVidia.
- Relocate IpmiCommandLib.h from edk2-platforms
  to edk2/MdePkg. A NULL instance of IpmiCommandLib is created
  and located under MdePkg. With above, RedfishPkg doesn't have the
  dependence with edk2-platforms. The implementation of IpmiCommandLib
  stays in edk2-platforms without relocation, which can be pulled in
  to platform DSC as needed.
- PlatformHostInterfaceBmcUsbNic would be upstream to edk2-staging
  temporarily because some requirements are necessray to be spec out
  in the Redfish section in UEFI spec.

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>

Abner Chang (3):
  MdePkg/IndustryStandard: Update IPMI definitions
  RedfishPkg/Include: Add Redfish IPMI definitions
  RedfishPkg/Include: Redfish USB Interface V2 update

 MdePkg/Include/IndustryStandard/Ipmi.h        | 17 +++++++
 .../Include/IndustryStandard/IpmiNetFnApp.h   | 37 ++++++++++++--
 .../IndustryStandard/IpmiNetFnTransport.h     | 32 ++++++++++++
 .../IndustryStandard/RedfishHostInterface.h   | 23 +++++++++
 .../RedfishHostInterfaceIpmi.h                | 50 +++++++++++++++++++
 5 files changed, 155 insertions(+), 4 deletions(-)
 create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h

-- 
2.37.1.windows.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] MdePkg/IndustryStandard: Update IPMI definitions
  2022-12-23 12:33 [PATCH 0/3] IPMI changes for Redfish Chang, Abner
@ 2022-12-23 12:33 ` Chang, Abner
  2022-12-23 12:33 ` [PATCH 2/3] RedfishPkg/Include: Add Redfish " Chang, Abner
  2022-12-23 12:33 ` [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update Chang, Abner
  2 siblings, 0 replies; 10+ messages in thread
From: Chang, Abner @ 2022-12-23 12:33 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang,
	Igor Kulchytskyy, Isaac Oram, Nate DeSimone

From: Abner Chang <abner.chang@amd.com>

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.

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>
---
 MdePkg/Include/IndustryStandard/Ipmi.h        | 17 +++++++++
 .../Include/IndustryStandard/IpmiNetFnApp.h   | 37 +++++++++++++++++--
 .../IndustryStandard/IpmiNetFnTransport.h     | 32 ++++++++++++++++
 3 files changed, 82 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/Ipmi.h b/MdePkg/Include/IndustryStandard/Ipmi.h
index 9d1d412b53e..e16c1281862 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) 2022 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 0721bc6b271..08f977f2087 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) 2022 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 19db84e5122..2eb6cd9b344 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) 2022 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;
@@ -177,6 +187,10 @@ typedef struct {
   UINT8    ArpInterval;
 } 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;
-- 
2.37.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI definitions
  2022-12-23 12:33 [PATCH 0/3] IPMI changes for Redfish Chang, Abner
  2022-12-23 12:33 ` [PATCH 1/3] MdePkg/IndustryStandard: Update IPMI definitions Chang, Abner
@ 2022-12-23 12:33 ` Chang, Abner
  2022-12-23 17:19   ` Igor Kulchytskyy
  2022-12-23 12:33 ` [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update Chang, Abner
  2 siblings, 1 reply; 10+ messages in thread
From: Chang, Abner @ 2022-12-23 12:33 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Igor Kulchytskyy

From: Abner Chang <abner.chang@amd.com>

Add the definitions of Redfish Host Interface
credential bootstrapping IPMI commands.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../RedfishHostInterfaceIpmi.h                | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h

diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
new file mode 100644
index 00000000000..892b744c458
--- /dev/null
+++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
@@ -0,0 +1,50 @@
+/** @file
+  Redfish Host Interface IPMI command
+
+  Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef REDFISH_HOST_INTERFACE_IPMI_H_
+#define REDFISH_HOST_INTERFACE_IPMI_H_
+
+#include <Uefi.h>
+#include <IndustryStandard/IpmiNetFnGroupExtension.h>
+
+#define REDFISH_IPMI_GROUP_EXTENSION                          0x52
+#define REDFISH_IPMI_GET_BOOTSTRAP_CREDENTIALS_CMD            0x02
+#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_ENABLE              0xA5
+#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_DISABLE             0x00
+#define REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED  0x80
+
+///
+/// Per Redfish Host Interface Specification 1.3, The maximum lenght of
+/// username and password is 16 characters long.
+//
+#define USERNAME_MAX_LENGTH  16
+#define PASSWORD_MAX_LENGTH  16
+#define USERNAME_MAX_SIZE    (USERNAME_MAX_LENGTH + 1)  // NULL terminator
+#define PASSWORD_MAX_SIZE    (PASSWORD_MAX_LENGTH + 1)  // NULL terminator
+
+#pragma pack(1)
+
+///
+/// The definition of IPMI command to get bootstrap account credentials
+/// typedef struct {
+typedef struct {
+  UINT8    GroupExtensionId;
+  UINT8    DisableBootstrapControl;
+} IPMI_BOOTSTRAP_CREDENTIALS_COMMAND_DATA;
+
+///
+/// The response data of getting bootstrap credential /// typedef
+typedef struct {
+  UINT8    CompletionCode;
+  UINT8    GroupExtensionId;
+  CHAR8    Username[USERNAME_MAX_LENGTH];
+  CHAR8    Password[PASSWORD_MAX_LENGTH];
+} IPMI_BOOTSTRAP_CREDENTIALS_RESULT_RESPONSE;
+
+#pragma pack()
+
+#endif
-- 
2.37.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update
  2022-12-23 12:33 [PATCH 0/3] IPMI changes for Redfish Chang, Abner
  2022-12-23 12:33 ` [PATCH 1/3] MdePkg/IndustryStandard: Update IPMI definitions Chang, Abner
  2022-12-23 12:33 ` [PATCH 2/3] RedfishPkg/Include: Add Redfish " Chang, Abner
@ 2022-12-23 12:33 ` Chang, Abner
  2022-12-23 17:31   ` Igor Kulchytskyy
  2022-12-28  0:56   ` Nickle Wang
  2 siblings, 2 replies; 10+ messages in thread
From: Chang, Abner @ 2022-12-23 12:33 UTC (permalink / raw)
  To: devel; +Cc: Nickle Wang, Igor Kulchytskyy

From: Abner Chang <abner.chang@amd.com>

Support USB_INTERFACE_DEVICE_DESCRIPTOR_V2 which
is updated in Redfish Host Interface spec v1.3.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../IndustryStandard/RedfishHostInterface.h   | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
index 49b3ceee39c..5337c3234b2 100644
--- a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
+++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
@@ -3,6 +3,7 @@
 
   Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
   (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+  Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
@@ -29,6 +30,18 @@
 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4      0x01
 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6      0x02
 
+///
+/// Definitions for IP assignment tyeps.
+///
+typedef enum {
+  RedfishHostIpAssignmentUnknown,
+  RedfishHostIpAssignmentStatic,
+  RedfishHostIpAssignmentDhcp,
+  RedfishHostIpAssignmentAutoConfigure,
+  RedfishHostIpAssignmentHostSelected,
+  RedfishHostIpAssignmentReserved
+} REDFISH_HOST_IP_ASSIGNMENT;
+
 #pragma pack(1)
 ///
 /// Structure definitions of Host Interface device type 04h (USB Network Interface V2)
@@ -46,6 +59,12 @@ typedef struct {
                                            ///< descriptor, and is converted from Unicode to ASCII
                                            ///< and is NULL terminated.
   UINT8     MacAddress[6];                 ///< The MAC address of the PCI/PCIe network device.
+
+  ///
+  /// Below is defined in Redfish Host Interface spec v1.3
+  ///
+  UINT16    Characteristics;               ///< Additional device characteristics.
+  UINT16    CredentialBootstrappingHandle; ///< Credential bootstrapping handle.
 } USB_INTERFACE_DEVICE_DESCRIPTOR_V2;
 
 //
@@ -74,6 +93,10 @@ typedef struct {
 ///
 /// Define union for the Host Interface Device Descriptor
 ///
+#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_3  0x11        ///< Length USB interface device v2 defined in
+                                                                 ///< Redfish host interface spec v1.3
+#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_2  0x0d        ///< Length USB interface device v2 defined in
+                                                                 ///< Redfish host interface spec v1.2
 typedef union {
   USB_INTERFACE_DEVICE_DESCRIPTOR_V2            UsbDeviceV2;     ///< Device type USB V2 device discriptor.
   PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2    PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor.
-- 
2.37.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI definitions
  2022-12-23 12:33 ` [PATCH 2/3] RedfishPkg/Include: Add Redfish " Chang, Abner
@ 2022-12-23 17:19   ` Igor Kulchytskyy
  2022-12-29  1:55     ` Chang, Abner
  0 siblings, 1 reply; 10+ messages in thread
From: Igor Kulchytskyy @ 2022-12-23 17:19 UTC (permalink / raw)
  To: abner.chang@amd.com, devel@edk2.groups.io

Hi Abner,
Please see my comments in the text below.
Thank you,
Igor

-----Original Message-----
From: abner.chang@amd.com <abner.chang@amd.com>
Sent: Friday, December 23, 2022 7:34 AM
To: devel@edk2.groups.io
Cc: Abner Chang <abner.chang@amd.com>; Igor Kulchytskyy <igork@ami.com>
Subject: [EXTERNAL] [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI definitions


**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**

From: Abner Chang <abner.chang@amd.com>

Add the definitions of Redfish Host Interface credential bootstrapping IPMI commands.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../RedfishHostInterfaceIpmi.h                | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h

diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
new file mode 100644
index 00000000000..892b744c458
--- /dev/null
+++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
@@ -0,0 +1,50 @@
+/** @file
+  Redfish Host Interface IPMI command
+
+  Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent **/
+
+#ifndef REDFISH_HOST_INTERFACE_IPMI_H_
+#define REDFISH_HOST_INTERFACE_IPMI_H_
+
+#include <Uefi.h>
+#include <IndustryStandard/IpmiNetFnGroupExtension.h>
+
+#define REDFISH_IPMI_GROUP_EXTENSION                          0x52
+#define REDFISH_IPMI_GET_BOOTSTRAP_CREDENTIALS_CMD            0x02
+#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_ENABLE              0xA5
+#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_DISABLE             0x00
+#define REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED  0x80
+
+///
+/// Per Redfish Host Interface Specification 1.3, The maximum lenght of
+/// username and password is 16 characters long.
+//
Igor: One '/' symbol missed

+#define USERNAME_MAX_LENGTH  16
+#define PASSWORD_MAX_LENGTH  16
+#define USERNAME_MAX_SIZE    (USERNAME_MAX_LENGTH + 1)  // NULL terminator
+#define PASSWORD_MAX_SIZE    (PASSWORD_MAX_LENGTH + 1)  // NULL terminator
+
+#pragma pack(1)
+
+///
+/// The definition of IPMI command to get bootstrap account credentials
+/// typedef struct { typedef struct {
Igor: Duplication of typedef

+  UINT8    GroupExtensionId;
+  UINT8    DisableBootstrapControl;
+} IPMI_BOOTSTRAP_CREDENTIALS_COMMAND_DATA;
+
+///
+/// The response data of getting bootstrap credential /// typedef
Igor: Duplication of typedef

+typedef struct {
+  UINT8    CompletionCode;
+  UINT8    GroupExtensionId;
+  CHAR8    Username[USERNAME_MAX_LENGTH];
+  CHAR8    Password[PASSWORD_MAX_LENGTH];
+} IPMI_BOOTSTRAP_CREDENTIALS_RESULT_RESPONSE;
+
+#pragma pack()
+
+#endif
--
2.37.1.windows.1

-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update
  2022-12-23 12:33 ` [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update Chang, Abner
@ 2022-12-23 17:31   ` Igor Kulchytskyy
  2022-12-24  2:08     ` Chang, Abner
  2022-12-28  0:56   ` Nickle Wang
  1 sibling, 1 reply; 10+ messages in thread
From: Igor Kulchytskyy @ 2022-12-23 17:31 UTC (permalink / raw)
  To: abner.chang@amd.com, devel@edk2.groups.io; +Cc: Nickle Wang

Hi Abner,
I'm not sure if I did something wrong, but when I tried to apply that patch I got an error:
error: corrupt patch at line 30
Thank you,
Igor

-----Original Message-----
From: abner.chang@amd.com <abner.chang@amd.com>
Sent: Friday, December 23, 2022 7:34 AM
To: devel@edk2.groups.io
Cc: Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>
Subject: [EXTERNAL] [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update


**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**

From: Abner Chang <abner.chang@amd.com>

Support USB_INTERFACE_DEVICE_DESCRIPTOR_V2 which is updated in Redfish Host Interface spec v1.3.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../IndustryStandard/RedfishHostInterface.h   | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
index 49b3ceee39c..5337c3234b2 100644
--- a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
+++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
@@ -3,6 +3,7 @@

   Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
   (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+  Copyright (C) 2022 Advanced Micro Devices, Inc. All rights
+ reserved.<BR>

   SPDX-License-Identifier: BSD-2-Clause-Patent  **/ @@ -29,6 +30,18 @@
 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4      0x01
 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6      0x02

+///
+/// Definitions for IP assignment tyeps.
+///
+typedef enum {
+  RedfishHostIpAssignmentUnknown,
+  RedfishHostIpAssignmentStatic,
+  RedfishHostIpAssignmentDhcp,
+  RedfishHostIpAssignmentAutoConfigure,
+  RedfishHostIpAssignmentHostSelected,
+  RedfishHostIpAssignmentReserved
+} REDFISH_HOST_IP_ASSIGNMENT;
+
 #pragma pack(1)
 ///
 /// Structure definitions of Host Interface device type 04h (USB Network Interface V2) @@ -46,6 +59,12 @@ typedef struct {
                                            ///< descriptor, and is converted from Unicode to ASCII
                                            ///< and is NULL terminated.
   UINT8     MacAddress[6];                 ///< The MAC address of the PCI/PCIe network device.
+
+  ///
+  /// Below is defined in Redfish Host Interface spec v1.3  ///
+  UINT16    Characteristics;               ///< Additional device characteristics.
+  UINT16    CredentialBootstrappingHandle; ///< Credential bootstrapping handle.
 } USB_INTERFACE_DEVICE_DESCRIPTOR_V2;

 //
@@ -74,6 +93,10 @@ typedef struct {
 ///
 /// Define union for the Host Interface Device Descriptor  ///
+#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_3  0x11        ///< Length USB interface device v2 defined in
+                                                                 ///< Redfish host interface spec v1.3
+#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_2  0x0d        ///< Length USB interface device v2 defined in
+                                                                 ///<
+Redfish host interface spec v1.2
 typedef union {
   USB_INTERFACE_DEVICE_DESCRIPTOR_V2            UsbDeviceV2;     ///< Device type USB V2 device discriptor.
   PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2    PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor.
--
2.37.1.windows.1

-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update
  2022-12-23 17:31   ` Igor Kulchytskyy
@ 2022-12-24  2:08     ` Chang, Abner
  0 siblings, 0 replies; 10+ messages in thread
From: Chang, Abner @ 2022-12-24  2:08 UTC (permalink / raw)
  To: Igor Kulchytskyy, devel@edk2.groups.io; +Cc: Nickle Wang

[AMD Official Use Only - General]

Hi Igor,
I just tried it and applied patch successfully, however I got the patch from group.io (copy and paste to Notepad++) but not from the email. Outlook often breaks the content. Please also check if your code is up to data (specifically to RedfishPkg for patch 3/3). The patch was created based on the master branch of edk2.

Thanks and happy new year!! 😊
Abner

> -----Original Message-----
> From: Igor Kulchytskyy <igork@ami.com>
> Sent: Saturday, December 24, 2022 1:32 AM
> To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
> Cc: Nickle Wang <nicklew@nvidia.com>
> Subject: RE: [EXTERNAL] [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface
> V2 update
> 
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
> 
> 
> Hi Abner,
> I'm not sure if I did something wrong, but when I tried to apply that patch I got
> an error:
> error: corrupt patch at line 30
> Thank you,
> Igor
> 
> -----Original Message-----
> From: abner.chang@amd.com <abner.chang@amd.com>
> Sent: Friday, December 23, 2022 7:34 AM
> To: devel@edk2.groups.io
> Cc: Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>
> Subject: [EXTERNAL] [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2
> update
> 
> 
> **CAUTION: The e-mail below is from an external source. Please exercise
> caution before opening attachments, clicking links, or following guidance.**
> 
> From: Abner Chang <abner.chang@amd.com>
> 
> Support USB_INTERFACE_DEVICE_DESCRIPTOR_V2 which is updated in Redfish
> Host Interface spec v1.3.
> 
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  .../IndustryStandard/RedfishHostInterface.h   | 23 +++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
> b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
> index 49b3ceee39c..5337c3234b2 100644
> --- a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
> +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
> @@ -3,6 +3,7 @@
> 
>    Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
>    (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
> +  Copyright (C) 2022 Advanced Micro Devices, Inc. All rights
> + reserved.<BR>
> 
>    SPDX-License-Identifier: BSD-2-Clause-Patent  **/ @@ -29,6 +30,18 @@
>  #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4      0x01
>  #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6      0x02
> 
> +///
> +/// Definitions for IP assignment tyeps.
> +///
> +typedef enum {
> +  RedfishHostIpAssignmentUnknown,
> +  RedfishHostIpAssignmentStatic,
> +  RedfishHostIpAssignmentDhcp,
> +  RedfishHostIpAssignmentAutoConfigure,
> +  RedfishHostIpAssignmentHostSelected,
> +  RedfishHostIpAssignmentReserved
> +} REDFISH_HOST_IP_ASSIGNMENT;
> +
>  #pragma pack(1)
>  ///
>  /// Structure definitions of Host Interface device type 04h (USB Network
> Interface V2) @@ -46,6 +59,12 @@ typedef struct {
>                                             ///< descriptor, and is converted from Unicode to ASCII
>                                             ///< and is NULL terminated.
>    UINT8     MacAddress[6];                 ///< The MAC address of the PCI/PCIe
> network device.
> +
> +  ///
> +  /// Below is defined in Redfish Host Interface spec v1.3  ///
> +  UINT16    Characteristics;               ///< Additional device characteristics.
> +  UINT16    CredentialBootstrappingHandle; ///< Credential bootstrapping
> handle.
>  } USB_INTERFACE_DEVICE_DESCRIPTOR_V2;
> 
>  //
> @@ -74,6 +93,10 @@ typedef struct {
>  ///
>  /// Define union for the Host Interface Device Descriptor  ///
> +#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_3  0x11        ///<
> Length USB interface device v2 defined in
> +                                                                 ///< Redfish host interface spec v1.3
> +#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_2  0x0d        ///<
> Length USB interface device v2 defined in
> +                                                                 ///<
> +Redfish host interface spec v1.2
>  typedef union {
>    USB_INTERFACE_DEVICE_DESCRIPTOR_V2            UsbDeviceV2;     ///< Device
> type USB V2 device discriptor.
>    PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2    PciPcieDeviceV2; ///<
> Device type PCI/PCIe V2 device discriptor.
> --
> 2.37.1.windows.1
> 
> -The information contained in this message may be confidential and proprietary
> to American Megatrends (AMI). This communication is intended to be read only
> by the individual or entity to whom it is addressed or by their designee. If the
> reader of this message is not the intended recipient, you are on notice that any
> distribution of this message, in any form, is strictly prohibited. Please promptly
> notify the sender by reply e-mail or by telephone at 770-246-8600, and then
> delete or destroy all copies of the transmission.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update
  2022-12-23 12:33 ` [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update Chang, Abner
  2022-12-23 17:31   ` Igor Kulchytskyy
@ 2022-12-28  0:56   ` Nickle Wang
  1 sibling, 0 replies; 10+ messages in thread
From: Nickle Wang @ 2022-12-28  0:56 UTC (permalink / raw)
  To: abner.chang@amd.com, devel@edk2.groups.io; +Cc: Igor Kulchytskyy

Hi Abner,

Could you please also fix the typo in USB_INTERFACE_DEVICE_DESCRIPTOR_V2 structure together? 

There is typo at line 43: https://github.com/tianocore/edk2/blob/a086f4a63bc0295b0b02f8ee76381c6b437122bf/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h#L43

UINT8     SecialNumberStr;

It should be SerialNumberStr.

Thanks,
Nickle

-----Original Message-----
From: abner.chang@amd.com <abner.chang@amd.com> 
Sent: Friday, December 23, 2022 8:34 PM
To: devel@edk2.groups.io
Cc: Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>
Subject: [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update

External email: Use caution opening links or attachments


From: Abner Chang <abner.chang@amd.com>

Support USB_INTERFACE_DEVICE_DESCRIPTOR_V2 which is updated in Redfish Host Interface spec v1.3.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../IndustryStandard/RedfishHostInterface.h   | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
index 49b3ceee39c..5337c3234b2 100644
--- a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
+++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
@@ -3,6 +3,7 @@

   Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
   (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+  Copyright (C) 2022 Advanced Micro Devices, Inc. All rights 
+ reserved.<BR>

   SPDX-License-Identifier: BSD-2-Clause-Patent  **/ @@ -29,6 +30,18 @@
 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4      0x01
 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6      0x02

+///
+/// Definitions for IP assignment tyeps.
+///
+typedef enum {
+  RedfishHostIpAssignmentUnknown,
+  RedfishHostIpAssignmentStatic,
+  RedfishHostIpAssignmentDhcp,
+  RedfishHostIpAssignmentAutoConfigure,
+  RedfishHostIpAssignmentHostSelected,
+  RedfishHostIpAssignmentReserved
+} REDFISH_HOST_IP_ASSIGNMENT;
+
 #pragma pack(1)
 ///
 /// Structure definitions of Host Interface device type 04h (USB Network Interface V2) @@ -46,6 +59,12 @@ typedef struct {
                                            ///< descriptor, and is converted from Unicode to ASCII
                                            ///< and is NULL terminated.
   UINT8     MacAddress[6];                 ///< The MAC address of the PCI/PCIe network device.
+
+  ///
+  /// Below is defined in Redfish Host Interface spec v1.3  ///
+  UINT16    Characteristics;               ///< Additional device characteristics.
+  UINT16    CredentialBootstrappingHandle; ///< Credential bootstrapping handle.
 } USB_INTERFACE_DEVICE_DESCRIPTOR_V2;

 //
@@ -74,6 +93,10 @@ typedef struct {
 ///
 /// Define union for the Host Interface Device Descriptor  ///
+#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_3  0x11        ///< Length USB interface device v2 defined in
+                                                                 ///< Redfish host interface spec v1.3
+#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_2  0x0d        ///< Length USB interface device v2 defined in
+                                                                 ///< 
+Redfish host interface spec v1.2
 typedef union {
   USB_INTERFACE_DEVICE_DESCRIPTOR_V2            UsbDeviceV2;     ///< Device type USB V2 device discriptor.
   PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2    PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor.
--
2.37.1.windows.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI definitions
  2022-12-23 17:19   ` Igor Kulchytskyy
@ 2022-12-29  1:55     ` Chang, Abner
  2022-12-29  2:41       ` Igor Kulchytskyy
  0 siblings, 1 reply; 10+ messages in thread
From: Chang, Abner @ 2022-12-29  1:55 UTC (permalink / raw)
  To: Igor Kulchytskyy, devel@edk2.groups.io

[AMD Official Use Only - General]

I forgot to address these comments on V2. The V3 just sent for this.
Thanks
Abner

> -----Original Message-----
> From: Igor Kulchytskyy <igork@ami.com>
> Sent: Saturday, December 24, 2022 1:20 AM
> To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
> Subject: RE: [EXTERNAL] [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI
> definitions
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Hi Abner,
> Please see my comments in the text below.
> Thank you,
> Igor
> 
> -----Original Message-----
> From: abner.chang@amd.com <abner.chang@amd.com>
> Sent: Friday, December 23, 2022 7:34 AM
> To: devel@edk2.groups.io
> Cc: Abner Chang <abner.chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>
> Subject: [EXTERNAL] [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI
> definitions
> 
> 
> **CAUTION: The e-mail below is from an external source. Please exercise
> caution before opening attachments, clicking links, or following guidance.**
> 
> From: Abner Chang <abner.chang@amd.com>
> 
> Add the definitions of Redfish Host Interface credential bootstrapping IPMI
> commands.
> 
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  .../RedfishHostInterfaceIpmi.h                | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644
> RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
> 
> diff --git
> a/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
> b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
> new file mode 100644
> index 00000000000..892b744c458
> --- /dev/null
> +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
> @@ -0,0 +1,50 @@
> +/** @file
> +  Redfish Host Interface IPMI command
> +
> +  Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#ifndef REDFISH_HOST_INTERFACE_IPMI_H_
> +#define REDFISH_HOST_INTERFACE_IPMI_H_
> +
> +#include <Uefi.h>
> +#include <IndustryStandard/IpmiNetFnGroupExtension.h>
> +
> +#define REDFISH_IPMI_GROUP_EXTENSION                          0x52
> +#define REDFISH_IPMI_GET_BOOTSTRAP_CREDENTIALS_CMD            0x02
> +#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_ENABLE              0xA5
> +#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_DISABLE             0x00
> +#define REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED
> 0x80
> +
> +///
> +/// Per Redfish Host Interface Specification 1.3, The maximum lenght of
> +/// username and password is 16 characters long.
> +//
> Igor: One '/' symbol missed
> 
> +#define USERNAME_MAX_LENGTH  16
> +#define PASSWORD_MAX_LENGTH  16
> +#define USERNAME_MAX_SIZE    (USERNAME_MAX_LENGTH + 1)  // NULL
> terminator
> +#define PASSWORD_MAX_SIZE    (PASSWORD_MAX_LENGTH + 1)  // NULL
> terminator
> +
> +#pragma pack(1)
> +
> +///
> +/// The definition of IPMI command to get bootstrap account credentials
> +/// typedef struct { typedef struct {
> Igor: Duplication of typedef
> 
> +  UINT8    GroupExtensionId;
> +  UINT8    DisableBootstrapControl;
> +} IPMI_BOOTSTRAP_CREDENTIALS_COMMAND_DATA;
> +
> +///
> +/// The response data of getting bootstrap credential /// typedef
> Igor: Duplication of typedef
> 
> +typedef struct {
> +  UINT8    CompletionCode;
> +  UINT8    GroupExtensionId;
> +  CHAR8    Username[USERNAME_MAX_LENGTH];
> +  CHAR8    Password[PASSWORD_MAX_LENGTH];
> +} IPMI_BOOTSTRAP_CREDENTIALS_RESULT_RESPONSE;
> +
> +#pragma pack()
> +
> +#endif
> --
> 2.37.1.windows.1
> 
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is intended
> to be read only by the individual or entity to whom it is addressed or by their
> designee. If the reader of this message is not the intended recipient, you are
> on notice that any distribution of this message, in any form, is strictly
> prohibited. Please promptly notify the sender by reply e-mail or by
> telephone at 770-246-8600, and then delete or destroy all copies of the
> transmission.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI definitions
  2022-12-29  1:55     ` Chang, Abner
@ 2022-12-29  2:41       ` Igor Kulchytskyy
  0 siblings, 0 replies; 10+ messages in thread
From: Igor Kulchytskyy @ 2022-12-29  2:41 UTC (permalink / raw)
  To: Chang, Abner, devel@edk2.groups.io

Got it, thanks!

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com>
Sent: Wednesday, December 28, 2022 8:55 PM
To: Igor Kulchytskyy <igork@ami.com>; devel@edk2.groups.io
Subject: RE: [EXTERNAL] [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI definitions

[AMD Official Use Only - General]

I forgot to address these comments on V2. The V3 just sent for this.
Thanks
Abner

> -----Original Message-----
> From: Igor Kulchytskyy <igork@ami.com>
> Sent: Saturday, December 24, 2022 1:20 AM
> To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
> Subject: RE: [EXTERNAL] [PATCH 2/3] RedfishPkg/Include: Add Redfish
> IPMI definitions
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Hi Abner,
> Please see my comments in the text below.
> Thank you,
> Igor
>
> -----Original Message-----
> From: abner.chang@amd.com <abner.chang@amd.com>
> Sent: Friday, December 23, 2022 7:34 AM
> To: devel@edk2.groups.io
> Cc: Abner Chang <abner.chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>
> Subject: [EXTERNAL] [PATCH 2/3] RedfishPkg/Include: Add Redfish IPMI
> definitions
>
>
> **CAUTION: The e-mail below is from an external source. Please
> exercise caution before opening attachments, clicking links, or
> following guidance.**
>
> From: Abner Chang <abner.chang@amd.com>
>
> Add the definitions of Redfish Host Interface credential bootstrapping
> IPMI commands.
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  .../RedfishHostInterfaceIpmi.h                | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644
> RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
>
> diff --git
> a/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
> b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
> new file mode 100644
> index 00000000000..892b744c458
> --- /dev/null
> +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
> @@ -0,0 +1,50 @@
> +/** @file
> +  Redfish Host Interface IPMI command
> +
> +  Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#ifndef REDFISH_HOST_INTERFACE_IPMI_H_ #define
> +REDFISH_HOST_INTERFACE_IPMI_H_
> +
> +#include <Uefi.h>
> +#include <IndustryStandard/IpmiNetFnGroupExtension.h>
> +
> +#define REDFISH_IPMI_GROUP_EXTENSION                          0x52
> +#define REDFISH_IPMI_GET_BOOTSTRAP_CREDENTIALS_CMD            0x02
> +#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_ENABLE              0xA5
> +#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_DISABLE             0x00
> +#define REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED
> 0x80
> +
> +///
> +/// Per Redfish Host Interface Specification 1.3, The maximum lenght
> +of /// username and password is 16 characters long.
> +//
> Igor: One '/' symbol missed
>
> +#define USERNAME_MAX_LENGTH  16
> +#define PASSWORD_MAX_LENGTH  16
> +#define USERNAME_MAX_SIZE    (USERNAME_MAX_LENGTH + 1)  // NULL
> terminator
> +#define PASSWORD_MAX_SIZE    (PASSWORD_MAX_LENGTH + 1)  // NULL
> terminator
> +
> +#pragma pack(1)
> +
> +///
> +/// The definition of IPMI command to get bootstrap account
> +credentials /// typedef struct { typedef struct {
> Igor: Duplication of typedef
>
> +  UINT8    GroupExtensionId;
> +  UINT8    DisableBootstrapControl;
> +} IPMI_BOOTSTRAP_CREDENTIALS_COMMAND_DATA;
> +
> +///
> +/// The response data of getting bootstrap credential /// typedef
> Igor: Duplication of typedef
>
> +typedef struct {
> +  UINT8    CompletionCode;
> +  UINT8    GroupExtensionId;
> +  CHAR8    Username[USERNAME_MAX_LENGTH];
> +  CHAR8    Password[PASSWORD_MAX_LENGTH];
> +} IPMI_BOOTSTRAP_CREDENTIALS_RESULT_RESPONSE;
> +
> +#pragma pack()
> +
> +#endif
> --
> 2.37.1.windows.1
>
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is
> intended to be read only by the individual or entity to whom it is
> addressed or by their designee. If the reader of this message is not
> the intended recipient, you are on notice that any distribution of
> this message, in any form, is strictly prohibited. Please promptly
> notify the sender by reply e-mail or by telephone at 770-246-8600, and
> then delete or destroy all copies of the transmission.
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-12-29  2:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-23 12:33 [PATCH 0/3] IPMI changes for Redfish Chang, Abner
2022-12-23 12:33 ` [PATCH 1/3] MdePkg/IndustryStandard: Update IPMI definitions Chang, Abner
2022-12-23 12:33 ` [PATCH 2/3] RedfishPkg/Include: Add Redfish " Chang, Abner
2022-12-23 17:19   ` Igor Kulchytskyy
2022-12-29  1:55     ` Chang, Abner
2022-12-29  2:41       ` Igor Kulchytskyy
2022-12-23 12:33 ` [PATCH 3/3] RedfishPkg/Include: Redfish USB Interface V2 update Chang, Abner
2022-12-23 17:31   ` Igor Kulchytskyy
2022-12-24  2:08     ` Chang, Abner
2022-12-28  0:56   ` Nickle Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox