2 This file defines the Redfish Interface Specific Data.
4 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
6 Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #ifndef REDFISH_HOST_INTERFACE_
12 #define REDFISH_HOST_INTERFACE_
14 #include <IndustryStandard/SmBios.h>
16 #define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB 0x02 // We don't support this type of interface.
17 // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 instead.
18 #define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE 0x03 // We don't support this type of interface.
19 // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 instead.
20 #define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 0x04
21 #define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 0x05
23 #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_UNKNOWN 0x00
24 #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_STATIC 0x01
25 #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_DHCP 0x02
26 #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_AUTO_CONFIGURE 0x03
27 #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_HOST_SELECTED 0x04
29 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_UNKNOWN 0x00
30 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4 0x01
31 #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6 0x02
34 /// Definitions for IP assignment tyeps.
37 RedfishHostIpAssignmentUnknown
,
38 RedfishHostIpAssignmentStatic
,
39 RedfishHostIpAssignmentDhcp
,
40 RedfishHostIpAssignmentAutoConfigure
,
41 RedfishHostIpAssignmentHostSelected
,
42 RedfishHostIpAssignmentReserved
43 } REDFISH_HOST_IP_ASSIGNMENT
;
47 /// Structure definitions of Host Interface device type 04h (USB Network Interface V2)
50 UINT8 Length
; ///< Length of the structure, including Device Type
51 ///< and Length fields.
52 UINT16 IdVendor
; ///< The Vendor ID of the device, as read from the
53 ///< idVendor field of the USB descriptor.
54 UINT16 IdProduct
; ///< The Product ID of the device, as read from the
55 ///< idProduct field of the USB descriptor.
56 UINT8 SerialNumberStr
; ///< The string number for the Serial Number of the
57 ///< device. The string data is read from the
58 ///< iSerialNumber.bDescriptorType field of the USB
59 ///< descriptor, and is converted from Unicode to ASCII
60 ///< and is NULL terminated.
61 UINT8 MacAddress
[6]; ///< The MAC address of the PCI/PCIe network device.
64 /// Below is defined in Redfish Host Interface spec v1.3
66 UINT16 Characteristics
; ///< Additional device characteristics.
67 UINT16 CredentialBootstrappingHandle
; ///< Credential bootstrapping handle.
68 } USB_INTERFACE_DEVICE_DESCRIPTOR_V2
;
71 // Structure definitions of Host Interface device type 05h (PCI/PCIE V2)
74 UINT8 Length
; ///< Length of the structure, including Device Type and Length fields.
75 UINT16 VendorId
; ///< The Vendor ID of the PCI/PCIe device.
76 UINT16 DeviceId
; ///< The Device ID of the PCI/PCIe device.
77 UINT16 SubsystemVendorId
; ///< The Subsystem Vendor ID of the PCI/PCIe device.
78 UINT16 SubsystemId
; ///< The Subsystem ID of the PCI/PCIe device.
79 UINT8 MacAddress
[6]; ///< The MAC address of the PCI/PCIe network device.
80 UINT16 SegmemtGroupNumber
; ///< The Segment Group Number of the PCI/PCIe.
81 UINT8 BusNumber
; ///< The Bus Number of the PCI/PCIe device.
82 UINT8 DeviceFunctionNumber
; ///< The Device/Function Number of the PCI/PCIe.
83 } PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2
;
86 /// Structure definitions of Host Interface device type 80-FFh (OEM)
89 UINT32 VendorIana
; ///< The IANA code for the vendor (MSB first).
90 UINT8 OemDefinedData
[1]; ///< OEM defined data.
91 } OEM_DEVICE_DESCRIPTOR
;
94 /// Define union for the Host Interface Device Descriptor
96 #define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_3 0x11 ///< Length USB interface device v2 defined in
97 ///< Redfish host interface spec v1.3
98 #define USB_INTERFACE_DEVICE_DESCRIPTOR_V2_SIZE_1_2 0x0d ///< Length USB interface device v2 defined in
99 ///< Redfish host interface spec v1.2
101 USB_INTERFACE_DEVICE_DESCRIPTOR_V2 UsbDeviceV2
; ///< Device type USB V2 device discriptor.
102 PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 PciPcieDeviceV2
; ///< Device type PCI/PCIe V2 device discriptor.
103 OEM_DEVICE_DESCRIPTOR OemDevice
; ///< OEM type device discriptor.
104 } DEVICE_DESCRITOR
; /// Device descriptor data formated based on Device Type.
107 /// Interface Specific Data starts at offset 06h of the SMBIOS Type 42 struct.
108 /// This table defines the Interface Specific data for Interface Type 40h. There
109 /// are 3 types of Device Descriptor3 defined , however only 1 may be used in
110 /// specific Tape 42 table.
113 UINT8 DeviceType
; ///< The Device Type of the interface.
114 DEVICE_DESCRITOR DeviceDescriptor
; ///< The Device descriptor.
115 } REDFISH_INTERFACE_DATA
;
118 // the protocol-specific data for the "Redfish Over IP" protocol
121 EFI_GUID ServiceUuid
; // same as Redfish Service UUID in Redfish Service Root resource
127 // AutoConfigure=03h,
129 // other values reserved
131 UINT8 HostIpAssignmentType
;
137 // other values reserved
139 UINT8 HostIpAddressFormat
;
142 // Used for Static and AutoConfigure.
143 // For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
145 UINT8 HostIpAddress
[16];
148 // Used for Static and AutoConfigure.
149 // For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
151 UINT8 HostIpMask
[16];
157 // AutoConfigure=03h,
159 // other values reserved
161 UINT8 RedfishServiceIpDiscoveryType
;
167 // other values reserved
169 UINT8 RedfishServiceIpAddressFormat
;
172 // Used for Static and AutoConfigure.
173 // For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
175 UINT8 RedfishServiceIpAddress
[16];
178 // Used for Static and AutoConfigure.
179 // For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
181 UINT8 RedfishServiceIpMask
[16];
183 UINT16 RedfishServiceIpPort
; // Used for Static and AutoConfigure.
184 UINT32 RedfishServiceVlanId
; // Used for Static and AutoConfigure.
185 UINT8 RedfishServiceHostnameLength
; // length of the following hostname string
186 UINT8 RedfishServiceHostname
[1]; // hostname of Redfish Service
187 } REDFISH_OVER_IP_PROTOCOL_DATA
;