From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web08.11619.1604054853961607917 for ; Fri, 30 Oct 2020 03:47:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=AJExLjk5; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0572814f16=abner.chang@hpe.com) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09UAjrwO016432; Fri, 30 Oct 2020 10:47:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pps0720; bh=k6/f9FrrHlRMQRyUj9vtJGjFQvgFRtGSRTlnwWTPVIo=; b=AJExLjk51BwQTmNOaOPMETb9vWbcGSNWISwwoYOzzPahYbEVrlfukSWvRpdStqcmI1iW IdI5q/2H/OctAgeNOhofqdT/rBeUYJOaK8kYGc3DnPx8R4/pMEaJTcWlrM3FWCmCZjar 0j7wZ/ejRyfKb159QG5E7MXYmfoaVryxFf0fnn0QU9dLBBL7GVm+OIMiLW2w9EBCvhE1 y1pP0OvfgeaAnMWZcrlEYiGeMVc7sI85XEJX0Sf5wMH/kGBNLWlqIkZzcR9sPIMf6Uxx 5/iCoH60rAaO/0F8LH3XraBYXbRTq06QBFq9+UNWN0qrXcP1WFKH3bncJAGMi/CF3zQh Ug== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com with ESMTP id 34g5ac4pwm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Oct 2020 10:47:33 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 97617A1; Fri, 30 Oct 2020 10:47:32 +0000 (UTC) Received: from abner-virtual-machine.asiapacific.hpqcorp.net (abner-virtual-machine.asiapacific.hpqcorp.net [15.119.210.153]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 3F9703A; Fri, 30 Oct 2020 10:47:31 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Jiaxin Wu , Siyuan Fu , Fan Wang , Jiewen Yao , Nickle Wang Subject: [EFI Redfish Host Interface PATCH v2 1/6] RedfishPkg/Include: Definitions of SMBIOS Redfish Host Interface Date: Fri, 30 Oct 2020 18:02:04 +0800 Message-Id: <20201030100209.9954-2-abner.chang@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201030100209.9954-1-abner.chang@hpe.com> References: <20201030100209.9954-1-abner.chang@hpe.com> X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-30_02:2020-10-30,2020-10-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=1 mlxscore=0 bulkscore=0 impostorscore=0 spamscore=0 priorityscore=1501 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010300081 Add definitions of SMBIOS Type 42 Host Interface. Signed-off-by: Jiaxin Wu Signed-off-by: Siyuan Fu Signed-off-by: Fan Wang Signed-off-by: Abner Chang Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Fan Wang Cc: Jiewen Yao Cc: Nickle Wang --- .../IndustryStandard/RedfishHostInterface.h | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h new file mode 100644 index 0000000000..3eec7a0b0e --- /dev/null +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h @@ -0,0 +1,169 @@ +/** @file + This file defines the Redfish Interface Specific Data. + + Copyright (c) 2019, Intel Corporation. All rights reserved.
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef REDFISH_HOST_INTERFACE_ +#define REDFISH_HOST_INTERFACE_ + +#include + +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB 0x02 // We don't support this type of interface. + // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 instead. +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE 0x03 // We don't support this type of interface. + // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 instead. +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 0x04 +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 0x05 + +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_UNKNOWN 0x00 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_STATIC 0x01 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_DHCP 0x02 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_AUTO_CONFIGURE 0x03 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_HOST_SELECTED 0x04 + +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_UNKNOWN 0x00 +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4 0x01 +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6 0x02 + +#pragma pack(1) +/// +/// Structure definitions of Host Interface device type 04h (USB Network Interface V2) +/// +typedef struct { + UINT8 Length; ///< Length of the structure, including Device Type + ///< and Length fields. + UINT16 IdVendor; ///< The Vendor ID of the device, as read from the + ///< 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 + ///< 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. +} USB_INTERFACE_DEVICE_DESCRIPTOR_V2; + +// +// Structure definitions of Host Interface device type 05h (PCI/PCIE V2) +// +typedef struct { + UINT8 Length; ///< Length of the structure, including Device Type and Length fields. + UINT16 VendorId; ///< The Vendor ID of the PCI/PCIe device. + UINT16 DeviceId; ///< The Device ID of the PCI/PCIe device. + UINT16 SubsystemVendorId; ///< The Subsystem Vendor ID of the PCI/PCIe device. + UINT16 SubsystemId; ///< The Subsystem ID of the PCI/PCIe device. + UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device. + UINT16 SegmemtGroupNumber; ///< The Segment Group Number of the PCI/PCIe. + UINT8 BusNumber; ///< The Bus Number of the PCI/PCIe device. + UINT8 DeviceFunctionNumber; ///< The Device/Function Number of the PCI/PCIe. +} PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2; + +/// +/// Structure definitions of Host Interface device type 80-FFh (OEM) +/// +typedef struct { + UINT32 VendorIana; ///< The IANA code for the vendor (MSB first). + UINT8 OemDefinedData[1]; ///< OEM defined data. +} OEM_DEVICE_DESCRIPTOR; + +/// +/// Define union for the Host Interface Device Descriptor +/// +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. + OEM_DEVICE_DESCRIPTOR OemDevice; ///< OEM type device discriptor. +} DEVICE_DESCRITOR; /// Device descriptor data formated based on Device Type. + +/// +/// Interface Specific Data starts at offset 06h of the SMBIOS Type 42 struct. +/// This table defines the Interface Specific data for Interface Type 40h. There +/// are 3 types of Device Descriptor3 defined , however only 1 may be used in +/// specific Tape 42 table. +/// +typedef struct { + UINT8 DeviceType; ///< The Device Type of the interface. + DEVICE_DESCRITOR DeviceDescriptor; ///< The Device descriptor. +} REDFISH_INTERFACE_DATA; + +// +// the protocol-specific data for the "Redfish Over IP" protocol +// +typedef struct { + EFI_GUID ServiceUuid; //same as Redfish Service UUID in Redfish Service Root resource + + // + // Unknown=00h, + // Static=01h, + // DHCP=02h, + // AutoConfigure=03h, + // HostSelected=04h, + // other values reserved + // + UINT8 HostIpAssignmentType; + + // + // Unknown=00h, + // Ipv4=01h, + // Ipv6=02h, + // other values reserved + // + UINT8 HostIpAddressFormat; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 HostIpAddress[16]; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 HostIpMask[16]; + + // + // Unknown=00h, + // Static=01h, + // DHCP=02h, + // AutoConfigure=03h, + // HostSelected=04h, + // other values reserved + // + UINT8 RedfishServiceIpDiscoveryType; + + // + // Unknown=00h, + // Ipv4=01h, + // Ipv6=02h, + // other values reserved + // + UINT8 RedfishServiceIpAddressFormat; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 RedfishServiceIpAddress[16]; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 RedfishServiceIpMask[16]; + + UINT16 RedfishServiceIpPort; // Used for Static and AutoConfigure. + UINT32 RedfishServiceVlanId; // Used for Static and AutoConfigure. + UINT8 RedfishServiceHostnameLength; // length of the following hostname string + UINT8 RedfishServiceHostname[1]; // hostname of Redfish Service +} REDFISH_OVER_IP_PROTOCOL_DATA; + +#pragma pack() + +#endif + -- 2.17.1