1 | /** @file
|
---|
2 | This file defines the Redfish Interface Specific Data.
|
---|
3 |
|
---|
4 | Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
---|
5 | (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
---|
6 |
|
---|
7 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #ifndef REDFISH_HOST_INTERFACE_
|
---|
11 | #define REDFISH_HOST_INTERFACE_
|
---|
12 |
|
---|
13 | #include <IndustryStandard/SmBios.h>
|
---|
14 |
|
---|
15 | #define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB 0x02 // We don't support this type of interface.
|
---|
16 | // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 instead.
|
---|
17 | #define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE 0x03 // We don't support this type of interface.
|
---|
18 | // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 instead.
|
---|
19 | #define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 0x04
|
---|
20 | #define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 0x05
|
---|
21 |
|
---|
22 | #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_UNKNOWN 0x00
|
---|
23 | #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_STATIC 0x01
|
---|
24 | #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_DHCP 0x02
|
---|
25 | #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_AUTO_CONFIGURE 0x03
|
---|
26 | #define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_HOST_SELECTED 0x04
|
---|
27 |
|
---|
28 | #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_UNKNOWN 0x00
|
---|
29 | #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4 0x01
|
---|
30 | #define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6 0x02
|
---|
31 |
|
---|
32 | #pragma pack(1)
|
---|
33 | ///
|
---|
34 | /// Structure definitions of Host Interface device type 04h (USB Network Interface V2)
|
---|
35 | ///
|
---|
36 | typedef struct {
|
---|
37 | UINT8 Length; ///< Length of the structure, including Device Type
|
---|
38 | ///< and Length fields.
|
---|
39 | UINT16 IdVendor; ///< The Vendor ID of the device, as read from the
|
---|
40 | ///< idVendor field of the USB descriptor.
|
---|
41 | UINT16 IdProduct; ///< The Product ID of the device, as read from the
|
---|
42 | ///< idProduct field of the USB descriptor.
|
---|
43 | UINT8 SecialNumberStr; ///< The string number for the Serial Number of the
|
---|
44 | ///< device. The string data is read from the
|
---|
45 | ///< iSerialNumber.bDescriptorType field of the USB
|
---|
46 | ///< descriptor, and is converted from Unicode to ASCII
|
---|
47 | ///< and is NULL terminated.
|
---|
48 | UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device.
|
---|
49 | } USB_INTERFACE_DEVICE_DESCRIPTOR_V2;
|
---|
50 |
|
---|
51 | //
|
---|
52 | // Structure definitions of Host Interface device type 05h (PCI/PCIE V2)
|
---|
53 | //
|
---|
54 | typedef struct {
|
---|
55 | UINT8 Length; ///< Length of the structure, including Device Type and Length fields.
|
---|
56 | UINT16 VendorId; ///< The Vendor ID of the PCI/PCIe device.
|
---|
57 | UINT16 DeviceId; ///< The Device ID of the PCI/PCIe device.
|
---|
58 | UINT16 SubsystemVendorId; ///< The Subsystem Vendor ID of the PCI/PCIe device.
|
---|
59 | UINT16 SubsystemId; ///< The Subsystem ID of the PCI/PCIe device.
|
---|
60 | UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device.
|
---|
61 | UINT16 SegmemtGroupNumber; ///< The Segment Group Number of the PCI/PCIe.
|
---|
62 | UINT8 BusNumber; ///< The Bus Number of the PCI/PCIe device.
|
---|
63 | UINT8 DeviceFunctionNumber; ///< The Device/Function Number of the PCI/PCIe.
|
---|
64 | } PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2;
|
---|
65 |
|
---|
66 | ///
|
---|
67 | /// Structure definitions of Host Interface device type 80-FFh (OEM)
|
---|
68 | ///
|
---|
69 | typedef struct {
|
---|
70 | UINT32 VendorIana; ///< The IANA code for the vendor (MSB first).
|
---|
71 | UINT8 OemDefinedData[1]; ///< OEM defined data.
|
---|
72 | } OEM_DEVICE_DESCRIPTOR;
|
---|
73 |
|
---|
74 | ///
|
---|
75 | /// Define union for the Host Interface Device Descriptor
|
---|
76 | ///
|
---|
77 | typedef union {
|
---|
78 | USB_INTERFACE_DEVICE_DESCRIPTOR_V2 UsbDeviceV2; ///< Device type USB V2 device discriptor.
|
---|
79 | PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor.
|
---|
80 | OEM_DEVICE_DESCRIPTOR OemDevice; ///< OEM type device discriptor.
|
---|
81 | } DEVICE_DESCRITOR; /// Device descriptor data formated based on Device Type.
|
---|
82 |
|
---|
83 | ///
|
---|
84 | /// Interface Specific Data starts at offset 06h of the SMBIOS Type 42 struct.
|
---|
85 | /// This table defines the Interface Specific data for Interface Type 40h. There
|
---|
86 | /// are 3 types of Device Descriptor3 defined , however only 1 may be used in
|
---|
87 | /// specific Tape 42 table.
|
---|
88 | ///
|
---|
89 | typedef struct {
|
---|
90 | UINT8 DeviceType; ///< The Device Type of the interface.
|
---|
91 | DEVICE_DESCRITOR DeviceDescriptor; ///< The Device descriptor.
|
---|
92 | } REDFISH_INTERFACE_DATA;
|
---|
93 |
|
---|
94 | //
|
---|
95 | // the protocol-specific data for the "Redfish Over IP" protocol
|
---|
96 | //
|
---|
97 | typedef struct {
|
---|
98 | EFI_GUID ServiceUuid; //same as Redfish Service UUID in Redfish Service Root resource
|
---|
99 |
|
---|
100 | //
|
---|
101 | // Unknown=00h,
|
---|
102 | // Static=01h,
|
---|
103 | // DHCP=02h,
|
---|
104 | // AutoConfigure=03h,
|
---|
105 | // HostSelected=04h,
|
---|
106 | // other values reserved
|
---|
107 | //
|
---|
108 | UINT8 HostIpAssignmentType;
|
---|
109 |
|
---|
110 | //
|
---|
111 | // Unknown=00h,
|
---|
112 | // Ipv4=01h,
|
---|
113 | // Ipv6=02h,
|
---|
114 | // other values reserved
|
---|
115 | //
|
---|
116 | UINT8 HostIpAddressFormat;
|
---|
117 |
|
---|
118 | //
|
---|
119 | // Used for Static and AutoConfigure.
|
---|
120 | // For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
|
---|
121 | //
|
---|
122 | UINT8 HostIpAddress[16];
|
---|
123 |
|
---|
124 | //
|
---|
125 | // Used for Static and AutoConfigure.
|
---|
126 | // For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
|
---|
127 | //
|
---|
128 | UINT8 HostIpMask[16];
|
---|
129 |
|
---|
130 | //
|
---|
131 | // Unknown=00h,
|
---|
132 | // Static=01h,
|
---|
133 | // DHCP=02h,
|
---|
134 | // AutoConfigure=03h,
|
---|
135 | // HostSelected=04h,
|
---|
136 | // other values reserved
|
---|
137 | //
|
---|
138 | UINT8 RedfishServiceIpDiscoveryType;
|
---|
139 |
|
---|
140 | //
|
---|
141 | // Unknown=00h,
|
---|
142 | // Ipv4=01h,
|
---|
143 | // Ipv6=02h,
|
---|
144 | // other values reserved
|
---|
145 | //
|
---|
146 | UINT8 RedfishServiceIpAddressFormat;
|
---|
147 |
|
---|
148 | //
|
---|
149 | // Used for Static and AutoConfigure.
|
---|
150 | // For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
|
---|
151 | //
|
---|
152 | UINT8 RedfishServiceIpAddress[16];
|
---|
153 |
|
---|
154 | //
|
---|
155 | // Used for Static and AutoConfigure.
|
---|
156 | // For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
|
---|
157 | //
|
---|
158 | UINT8 RedfishServiceIpMask[16];
|
---|
159 |
|
---|
160 | UINT16 RedfishServiceIpPort; // Used for Static and AutoConfigure.
|
---|
161 | UINT32 RedfishServiceVlanId; // Used for Static and AutoConfigure.
|
---|
162 | UINT8 RedfishServiceHostnameLength; // length of the following hostname string
|
---|
163 | UINT8 RedfishServiceHostname[1]; // hostname of Redfish Service
|
---|
164 | } REDFISH_OVER_IP_PROTOCOL_DATA;
|
---|
165 |
|
---|
166 | #pragma pack()
|
---|
167 |
|
---|
168 | #endif
|
---|
169 |
|
---|