From nobody Fri Apr 26 10:14:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+66155+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66155+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1602564766; cv=none; d=zohomail.com; s=zohoarc; b=VFn0lwq0BZvoxsyF16MEIGO0TkDow5aqe8vc6Q97vu+8jE7dTdNlcioo6WnWQCumfAPxt6CGY/+RmiNnVx9fO+kbtpxARQ2XlHpT7D7NKV9o9wByl3z2DU2mjXFEw7RfRR/ZYgu8kBW3z/Z1ZpDm/ARKkUDSyzf6fvGza7uhiuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602564766; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=zEFnBaIuCKrEFT+ymTCpq/p+B6Rbg6PrI8c4Ft2tomo=; b=dyLO80MXffMYfEl6MP+B19+G7Mc21a71ROvYCQt9/lW/EJ/q2Qld4IQDP7clJHb6OaTdHQiQx30UvaPm85tgyVaR2Dv2/HQE0NoUDLvGTyJH2+I6jMq+lFSUSQXItTkGWUfW9U/vJNwq6+3G85Czh1+v9YCLz8zf2fnVpozO2DQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66155+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1602564766191283.4459685985929; Mon, 12 Oct 2020 21:52:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id OR0UYY1788612x0mPNF3ShHd; Mon, 12 Oct 2020 21:52:45 -0700 X-Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web10.4793.1602564764960523294 for ; Mon, 12 Oct 2020 21:52:45 -0700 X-Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09D4nPLf007515; Tue, 13 Oct 2020 04:52:44 GMT X-Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 343avatu7u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Oct 2020 04:52:44 +0000 X-Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 8E73D55; Tue, 13 Oct 2020 04:52:43 +0000 (UTC) X-Received: from abner-virtual-machine.asiapacific.hpqcorp.net (abner-virtual-machine.asiapacific.hpqcorp.net [15.119.210.153]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id 2CBEC46; Tue, 13 Oct 2020 04:52:42 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Jiaxin Wu , Siyuan Fu , Fan Wang , Jiewen Yao , Nickle Wang Subject: [edk2-devel] [EFI Redfish Host Interface PATCH 1/5] RedfishPkg/Include: Definitions of SMBIOS Redfish Host Interface Date: Tue, 13 Oct 2020 12:08:01 +0800 Message-Id: <20201013040805.20523-2-abner.chang@hpe.com> In-Reply-To: <20201013040805.20523-1-abner.chang@hpe.com> References: <20201013040805.20523-1-abner.chang@hpe.com> X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@hpe.com X-Gm-Message-State: m2bKL2igfy0eooYmqUq7dGbLx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1602564765; bh=9dysjpv8CoFVWKRW6HoLxJwuHz5gFG7xsaDSLkcpyN8=; h=Cc:Date:From:Reply-To:Subject:To; b=nIYQDWN5qLuEDQADetzw1y2vpeZLetV0nZSuFrQxWq4LQCf6jH1KC9Fw88Pi0KlPELF wf9nhWv+3SXZHCcSbKf1IeIUeFccuFKSmlbZc4oI3+sGCsSY3gXbjtECYDN5EHOmBzn7Z X7H1fm04g0mA1ufrcgQPkBU/nhva4tOdQB8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Nickle Wang --- .../IndustryStandard/RedfishHostInterface.h | 165 ++++++++++++++++++ RedfishPkg/RedfishPkg.dec | 3 + 2 files changed, 168 insertions(+) create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterfac= e.h diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/R= edfishPkg/Include/IndustryStandard/RedfishHostInterface.h new file mode 100644 index 0000000000..981f8a0cfb --- /dev/null +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h @@ -0,0 +1,165 @@ +/** @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 su= pport 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 su= pport 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 I= nterface V2) +/// +typedef struct { + UINT8 Length; ///< Length of the structure, i= ncluding Device Type + ///< and Length fields. + UINT16 IdVendor; ///< The Vendor ID of the devic= e, as read from the + ///< idVendor field of the USB = descriptor. + UINT16 IdProduct; ///< The Product ID of the devi= ce, 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.bDescriptorT= ype field of the USB + ///< descriptor, and is convert= ed 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 structu= re, 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 t= he PCI/PCIe device. + UINT8 MacAddress [6]; ///< The MAC address of th= e PCI/PCIe network device. + UINT16 SegmemtGroupNumber; ///< The Segment Group Num= ber of the PCI/PCIe. + UINT8 BusNumber; ///< The Bus Number of the= PCI/PCIe device. + UINT8 DeviceFunctionNumber; ///< The Device/Function N= umber 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; + +/// +/// Interface Specific Data starts at offset 06h of the SMBIOS Type 42 st= ruct. +/// This table defines the Interface Specific data for Interface Type 40h= . There +/// are 3 types of Device Descriptor3 defined , however only 1 may be use= d in +/// specific Tape 42 table. +/// +typedef struct { + UINT8 DeviceType; ///< The Device Type of the interface. + union { + USB_INTERFACE_DEVICE_DESCRIPTOR_V2 UsbDeviceV2; ///< Devi= ce type USB V2 device discriptor. + PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 PciPcieDeviceV2; ///< Devi= ce type PCI/PCIe V2 device discriptor. + OEM_DEVICE_DESCRIPTOR OemDevice; ///< OEM = type device discriptor. + } DeviceDescriptor; /// Device descriptor data formated based on Device = 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 Redf= ish 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 AutoCo= nfigure. + UINT32 RedfishServiceVlanId; // Used for Static and AutoCo= nfigure. + UINT8 RedfishServiceHostnameLength; // length of the fol= lowing hostname string + UINT8 RedfishServiceHostname[1]; // hostname of Redfish S= ervice +} REDFISH_OVER_IP_PROTOCOL_DATA; + +#pragma pack() + +#endif + diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index e95ec5fe10..de3611252e 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, { 0x= 88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66155): https://edk2.groups.io/g/devel/message/66155 Mute This Topic: https://groups.io/mt/77477501/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-