]> git.proxmox.com Git - mirror_edk2.git/commitdiff
RedfishPkg/Include: PCD definitions of Host Interface EFI device path
authorAbner Chang <abner.chang@hpe.com>
Mon, 12 Oct 2020 06:00:24 +0000 (14:00 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 15 Oct 2020 01:07:24 +0000 (01:07 +0000)
The definitions of Host Interface EFI device path structure PCD.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Fan Wang <fan.wang@intel.com>
Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
RedfishPkg/Include/Pcd/RestExServiceDevicePath.h [new file with mode: 0644]
RedfishPkg/RedfishPkg.dec

diff --git a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h
new file mode 100644 (file)
index 0000000..89de3b1
--- /dev/null
@@ -0,0 +1,38 @@
+/** @file\r
+  This library defines the UEFI device path data of network device for REST\r
+  service to decide which should be used as the Redfish host interface.\r
+\r
+  Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
+\r
+    SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef REST_EX_SERVICE_DEVICE_PATH_H_\r
+#define REST_EX_SERVICE_DEVICE_PATH_H_\r
+\r
+#include <Protocol/DevicePath.h>\r
+\r
+typedef enum {\r
+  DEVICE_PATH_MATCH_MAC_NODE = 1,\r
+  DEVICE_PATH_MATCH_PCI_NODE = 2,\r
+  DEVICE_PATH_MATCH_MODE_MAX\r
+} DEVICE_PATH_MATCH_MODE;\r
+\r
+typedef struct {\r
+  UINT32 DevicePathMatchMode;\r
+  UINT32 DevicePathNum;\r
+  //\r
+  // Example:\r
+  //   {DEVICE_PATH("PciRoot(0)/Pci(0,0)/MAC(005056C00002,0x1)")}\r
+  // DevicePath will be parsed as below:\r
+  //   {0x02,0x01,0x0c,0x00,0xd0,0x41,0x03,0x0a,0x00,0x00,0x00,0x00,\r
+  //    0x01,0x01,0x06,0x00,0x00,0x00,\r
+  //    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,\r
+  //    0x7f,0xff,0x04,0x00}\r
+  //\r
+  EFI_DEVICE_PATH_PROTOCOL      DevicePath[];\r
+} REST_EX_SERVICE_DEVICE_PATH_DATA;\r
+\r
+#endif\r
index e95ec5fe10b48645d08c7086b5939e1e652761a3..de3611252e31c117a28bf67e16f3e23bd7fd32b3 100644 (file)
@@ -13,6 +13,9 @@
   PACKAGE_GUID      = c432b76e-5232-11e7-9010-005056c00008\r
   PACKAGE_VERSION   = 1.0\r
 \r
+[Includes]\r
+  Include\r
+\r
 [Guids]\r
   gEfiRedfishPkgTokenSpaceGuid      = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}\r
 \r