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.web12.15216.1601219756246227625 for ; Sun, 27 Sep 2020 08:15:56 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@hpe.com header.s=pps0720 header.b=ANwLz+9h; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=05397b83fd=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 08RFF3nc029633; Sun, 27 Sep 2020 15:15:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pps0720; bh=4m9NcYFc2C/71vW2bwxNKjrh8rko9yPvrQRluWPRPFg=; b=ANwLz+9hvcuwIllIVN2p2YJv0xD1Hwy6q1TrT4uByWS4/ShZSJP0Z9B3imaRGOC7XdSh AkOyhzKCL6TT4leMsKuPmirZTzI+WymKKoO/OyjtHkLF5WuCVW0nwz+tTqIQ4OZFSHxY i4JaV7/r01VI1S/TzC8s32ji6H8TC+20184N9xFov/XN8GgJFX7naTKdwzO+AFXa7tFt 45ZpMwukCqOsK3ZPRFquUD/0WINsiL5hqbJS8uMG3kt5NTdlAbH4PQlqebgjJtx+rV3I fuVfDgesh2YH4IWor2quU3T6bzXghwLWecIRtjY4S+ME8eXUjSiAd4idx1/zAouPgivu AQ== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 33sxxpemat-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 27 Sep 2020 15:15:55 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id E593E55; Sun, 27 Sep 2020 15:15:54 +0000 (UTC) Received: from SAC2XFT1JT.asiapacific.hpqcorp.net (sac2xft1jt.asiapacific.hpqcorp.net [10.43.42.132]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 44E614B; Sun, 27 Sep 2020 15:15:53 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Jiaxin Wu , Siyuan Fu , Fan Wang , Jiewen Yao , Nickle Wang Subject: [edk2-staging/RedfishHostInterfaceDxe PATCH 1/5] RedfishPkg/Include: Definitions of SMBIOS Redfish Host Interface Date: Sun, 27 Sep 2020 23:15:51 +0800 Message-Id: <20200927151552.456304-1-abner.chang@hpe.com> X-Mailer: git-send-email 2.21.0.windows.1 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-27_12:2020-09-24,2020-09-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 phishscore=0 adultscore=0 spamscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009270146 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-002e3701.pphosted.com id 08RFF3nc029633 Content-Type: text/plain; charset=unknown-8bit Content-Transfer-Encoding: quoted-printable BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2912 Add definitions of SMBIOS Type 42 Host Interface. Signed-off-by: Wu Jiaxin Signed-off-by: Ye Ting Signed-off-by: Fu Siyuan Signed-off-by: Wang Fan Signed-off-by: Abner Chang Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Fan Wang Cc: Jiewen Yao Cc: Nickle Wang --- .../BZ2912RedfishHostInterface.h | 165 ++++++++++++++++++ RedfishPkg/RedfishPkg.dec | 3 + 2 files changed, 168 insertions(+) create mode 100644 RedfishPkg/Include/IndustryStandard/BZ2912RedfishHost= Interface.h diff --git a/RedfishPkg/Include/IndustryStandard/BZ2912RedfishHostInterfa= ce.h b/RedfishPkg/Include/IndustryStandard/BZ2912RedfishHostInterface.h new file mode 100644 index 00000000000..71fb0580032 --- /dev/null +++ b/RedfishPkg/Include/IndustryStandard/BZ2912RedfishHostInterface.h @@ -0,0 +1,165 @@ +=EF=BB=BF/** @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 REDFI= SH_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 REDFI= SH_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 dev= ice, as read from the + ///< idVendor field of the US= B descriptor. + UINT16 IdProduct; ///< The Product ID of the de= vice, as read from the + ///< idProduct field of the U= SB descriptor. + UINT8 SecialNumberStr; ///< The string number for th= e Serial Number of the + ///< device. The string data = is read from the + ///< iSerialNumber.bDescripto= rType field of the USB + ///< descriptor, and is conve= rted from Unicode to ASCII + ///< and is NULL terminated. + UINT8 MacAddress [6]; ///< The MAC address of the P= CI/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 struc= ture, including Device Type and Length fields. + UINT16 VendorId; ///< The Vendor ID of th= e PCI/PCIe device. + UINT16 DeviceId; ///< The Device ID of th= e PCI/PCIe device. + UINT16 SubsystemVendorId; ///< The Subsystem Vendo= r 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 N= umber of the PCI/PCIe. + UINT8 BusNumber; ///< The Bus Number of t= he 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 th= e vendor (MSB first). + UINT8 OemDefinedData[1]; ///< OEM defined data. +} OEM_DEVICE_DESCRIPTOR; + +/// +/// Interface Specific Data starts at offset 06h of the SMBIOS Type 42 = struct. +/// This table defines the Interface Specific data for Interface Type 4= 0h. There +/// are 3 types of Device Descriptor3 defined , however only 1 may be u= sed in +/// specific Tape 42 table. +/// +typedef struct { + UINT8 DeviceType; ///< The Device Type of the interface. + union { + USB_INTERFACE_DEVICE_DESCRIPTOR_V2 UsbDeviceV2; ///< De= vice type USB V2 device discriptor. + PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 PciPcieDeviceV2; ///< De= vice type PCI/PCIe V2 device discriptor. + OEM_DEVICE_DESCRIPTOR OemDevice; ///< OE= M type device discriptor. + } DeviceDescriptor; /// Device descriptor data formated based on Devic= e Type. + +} REDFISH_INTERFACE_DATA; + +// +// the protocol-specific data for the "Redfish Over IP" protocol +// +typedef struct { + EFI_GUID ServiceUuid; //same as Redfish Service UUID in Re= dfish Service Root resource + + // + // Unknown=3D00h, + // Static=3D01h, + // DHCP=3D02h, + // AutoConfigure=3D03h, + // HostSelected=3D04h, + // other values reserved + // + UINT8 HostIpAssignmentType; + + // + // Unknown=3D00h, + // Ipv4=3D01h, + // Ipv6=3D02h, + // 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=3D00h, + // Static=3D01h, + // DHCP=3D02h, + // AutoConfigure=3D03h, + // HostSelected=3D04h, + // other values reserved + // + UINT8 RedfishServiceIpDiscoveryType; + + // + // Unknown=3D00h, + // Ipv4=3D01h, + // Ipv6=3D02h, + // 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 Auto= Configure. + UINT32 RedfishServiceVlanId; // Used for Static and Auto= Configure. + UINT8 RedfishServiceHostnameLength; // length of the f= ollowing hostname string + UINT8 RedfishServiceHostname[1]; // hostname of Redfish= Service +} REDFISH_OVER_IP_PROTOCOL_DATA; + +#pragma pack() + +#endif + diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index b4ecd13069a..4a11b7ea726 100644 --- a/RedfishPkg/RedfishPkg.dec +++ b/RedfishPkg/RedfishPkg.dec @@ -13,6 +13,9 @@ PACKAGE_GUID =3D c432b76e-5232-11e7-9010-005056c00008 PACKAGE_VERSION =3D 1.0 =20 +[Includes] + Include + [Guids] gEfiRedfishPkgTokenSpaceGuid =3D { 0x4fdbccb7, 0xe829, 0x4b4c, { = 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} =20 --=20 2.21.0.windows.1