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.web11.35522.1602488935742415251 for ; Mon, 12 Oct 2020 00:48:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=ZMBUuE0A; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0554bb03a2=abner.chang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09C7hBIt001438; Mon, 12 Oct 2020 07:48:55 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=0YkipdGd6XmLQfJSYctvG1sR/dHdfp437pm4fKem6pQ=; b=ZMBUuE0A0D6P7ki9RLKlYsfzw+Cp8gNr9v+kEZmrL9ni30etqmxR3Bj852/z8KDLDwO2 Bjw4moxvLqRpUldAKVPa29vWQMajqHctyphmIG26DxNWlhDeC7tpL6ydkpLD7xny+6zA 1VsxleiTR0brwqYkj64LNeJki5eL8I1pHZzHsaYWtHe2mSQKTDDsAdfUSHp/ji+T+O0p gFGCgrwvrsGi/uDp+ss1YeY/IZpBExPLM+LEkEE2WUm9QiuJ2IXeQ/8VZXKNiwN6QzmM /P66PKpbaxJawCDuqcT61TED/jBiDj7dx0qTULUjehpSqqJGUHjh27zntpUOKBu5QTbt Bg== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 343fq00vtr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Oct 2020 07:48:54 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 501DC55; Mon, 12 Oct 2020 07:48:54 +0000 (UTC) Received: from abner-virtual-machine.asiapacific.hpqcorp.net (abner-virtual-machine.asiapacific.hpqcorp.net [15.119.210.153]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 6D1094D; Mon, 12 Oct 2020 07:48:53 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Jiewen Yao , Nickle Wang Subject: [Rest Ex Definition PATCH 2/2] RedfishPkg/Include: PCD definitions of Host Interface EFI device path Date: Mon, 12 Oct 2020 15:04:15 +0800 Message-Id: <20201012070415.5878-3-abner.chang@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201012070415.5878-1-abner.chang@hpe.com> References: <20201012070415.5878-1-abner.chang@hpe.com> X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-10-12_03:2020-10-12,2020-10-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 spamscore=0 suspectscore=1 malwarescore=0 mlxlogscore=999 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010120066 The definitions of Host Interface EFI device path structure PCD. Signed-off-by: Jiaxin Wu Signed-off-by: Siyuan Fu Signed-off-by: Fan Wang Signed-off-by: Abner Chang Cc: Jiewen Yao Cc: Nickle Wang --- .../Include/Pcd/RestExServiceDevicePath.h | 38 +++++++++++++++++++ RedfishPkg/RedfishPkg.dec | 3 ++ 2 files changed, 41 insertions(+) create mode 100644 RedfishPkg/Include/Pcd/RestExServiceDevicePath.h diff --git a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h new file mode 100644 index 0000000000..89de3b1a21 --- /dev/null +++ b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h @@ -0,0 +1,38 @@ +/** @file + This library defines the UEFI device path data of network device for REST + service to decide which should be used as the Redfish host interface. + + Copyright (c) 2019, Intel Corporation. All rights reserved.
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef REST_EX_SERVICE_DEVICE_PATH_H_ +#define REST_EX_SERVICE_DEVICE_PATH_H_ + +#include + +typedef enum { + DEVICE_PATH_MATCH_MAC_NODE = 1, + DEVICE_PATH_MATCH_PCI_NODE = 2, + DEVICE_PATH_MATCH_MODE_MAX +} DEVICE_PATH_MATCH_MODE; + +typedef struct { + UINT32 DevicePathMatchMode; + UINT32 DevicePathNum; + // + // Example: + // {DEVICE_PATH("PciRoot(0)/Pci(0,0)/MAC(005056C00002,0x1)")} + // DevicePath will be parsed as below: + // {0x02,0x01,0x0c,0x00,0xd0,0x41,0x03,0x0a,0x00,0x00,0x00,0x00, + // 0x01,0x01,0x06,0x00,0x00,0x00, + // 0x03,0x0b,0x25,0x00,0x00,0x50,0x56,0xc0,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, + // 0x7f,0xff,0x04,0x00} + // + EFI_DEVICE_PATH_PROTOCOL DevicePath[]; +} REST_EX_SERVICE_DEVICE_PATH_DATA; + +#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 = c432b76e-5232-11e7-9010-005056c00008 PACKAGE_VERSION = 1.0 +[Includes] + Include + [Guids] gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} -- 2.17.1