]> git.proxmox.com Git - mirror_edk2.git/commitdiff
RedfishPkg/Include: Redfish USB Interface V2 update
authorAbner Chang <abner.chang@amd.com>
Fri, 23 Dec 2022 06:40:15 +0000 (14:40 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 19 Jan 2023 02:32:26 +0000 (02:32 +0000)
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>
Reviewed-by: Igor Kulchytskyy <igork@ami.com>
Reviewed-by: Nickle Wang <nicklew@nvidia.com>
RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h

index 49b3ceee39cc0049793d5f5ed4088d9c85ec2628..d125347cc04a84503f3115f406431e2bad790071 100644 (file)
@@ -3,6 +3,7 @@
 \r
   Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 **/\r
 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4      0x01\r
 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6      0x02\r
 \r
+///\r
+/// Definitions for IP assignment tyeps.\r
+///\r
+typedef enum {\r
+  RedfishHostIpAssignmentUnknown,\r
+  RedfishHostIpAssignmentStatic,\r
+  RedfishHostIpAssignmentDhcp,\r
+  RedfishHostIpAssignmentAutoConfigure,\r
+  RedfishHostIpAssignmentHostSelected,\r
+  RedfishHostIpAssignmentReserved\r
+} REDFISH_HOST_IP_ASSIGNMENT;\r
+\r
 #pragma pack(1)\r
 ///\r
 /// Structure definitions of Host Interface device type 04h (USB Network Interface V2)\r
@@ -40,12 +53,18 @@ typedef struct {
                                            ///< idVendor field of the USB descriptor.\r
   UINT16    IdProduct;                     ///< The Product ID of the device, as read from the\r
                                            ///< idProduct field of the USB descriptor.\r
-  UINT8     SecialNumberStr;               ///< The string number for the Serial Number of the\r
+  UINT8     SerialNumberStr;               ///< The string number for the Serial Number of the\r
                                            ///< device. The string data is read from the\r
                                            ///< iSerialNumber.bDescriptorType field of the USB\r
                                            ///< descriptor, and is converted from Unicode to ASCII\r
                                            ///< and is NULL terminated.\r
   UINT8     MacAddress[6];                 ///< The MAC address of the PCI/PCIe network device.\r
+\r
+  ///\r
+  /// Below is defined in Redfish Host Interface spec v1.3\r
+  ///\r
+  UINT16    Characteristics;               ///< Additional device characteristics.\r
+  UINT16    CredentialBootstrappingHandle; ///< Credential bootstrapping handle.\r
 } USB_INTERFACE_DEVICE_DESCRIPTOR_V2;\r
 \r
 //\r
@@ -74,6 +93,10 @@ typedef struct {
 ///\r
 /// Define union for the Host Interface Device Descriptor\r
 ///\r
+#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_3  0x11        ///< Length USB interface device v2 defined in\r
+                                                                 ///< Redfish host interface spec v1.3\r
+#define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_2  0x0d        ///< Length USB interface device v2 defined in\r
+                                                                 ///< Redfish host interface spec v1.2\r
 typedef union {\r
   USB_INTERFACE_DEVICE_DESCRIPTOR_V2            UsbDeviceV2;     ///< Device type USB V2 device discriptor.\r
   PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2    PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor.\r