public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner" <abner.chang@amd.com>
To: <devel@edk2.groups.io>
Cc: Nickle Wang <nicklew@nvidia.com>, Igor Kulchytskyy <igork@ami.com>
Subject: [PATCH V2 3/3] RedfishPkg/Include: Redfish USB Interface V2 update
Date: Wed, 28 Dec 2022 13:13:36 +0800	[thread overview]
Message-ID: <20221228051336.1769-4-abner.chang@amd.com> (raw)
In-Reply-To: <20221228051336.1769-1-abner.chang@amd.com>

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   | 25 ++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
index 49b3ceee39c..022bd1f36ef 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)
@@ -40,12 +53,18 @@ typedef struct {
                                            ///< idVendor field of the USB descriptor.
   UINT16    IdProduct;                     ///< The Product ID of the device, as read from the
                                            ///< idProduct field of the USB descriptor.
-  UINT8     SecialNumberStr;               ///< The string number for the Serial Number of the
+  UINT8     SerialNumberStr;               ///< The string number for the Serial Number of the
                                            ///< device. The string data is read from the
                                            ///< iSerialNumber.bDescriptorType field of the USB
                                            ///< 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


  parent reply	other threads:[~2022-12-28  5:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28  5:13 [PATCH V2 0/3] IPMI changes for Redfish Chang, Abner
2022-12-28  5:13 ` [PATCH V2 1/3] MdePkg/IndustryStandard: Update IPMI definitions Chang, Abner
2023-01-12 15:01   ` [edk2-devel] " manickavasakam karpagavinayagam
2023-01-12 15:12     ` Chang, Abner
2023-01-14  5:21       ` Chang, Abner
2022-12-28  5:13 ` [PATCH V2 2/3] RedfishPkg/Include: Add Redfish " Chang, Abner
2022-12-28  5:13 ` Chang, Abner [this message]
2022-12-28  6:28   ` [PATCH V2 3/3] RedfishPkg/Include: Redfish USB Interface V2 update Nickle Wang
2022-12-28 15:32     ` Igor Kulchytskyy
2022-12-29 17:37 ` [edk2-devel] [PATCH V2 0/3] IPMI changes for Redfish Michael D Kinney
2022-12-30  4:10   ` Chang, Abner
2023-01-08 15:18   ` Chang, Abner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221228051336.1769-4-abner.chang@amd.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox