From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web08.9181.1604589882088078375 for ; Thu, 05 Nov 2020 07:24:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=ngnDPBO1; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0578d2b66c=abner.chang@hpe.com) Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A5FI7GJ008661; Thu, 5 Nov 2020 15:24:40 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=stbn4inJE5eFB2/+ni6rGUpF9CstgtH/TlfjyK5MD5c=; b=ngnDPBO1Pi/4ysK1Yd3WCuKwEtuARK7wZs1R1vM709wc+iGKUOySaFeI+tXlxZYEHzlj V4jL0JtM/IwfSWA2v5NWeMHlBKeiU4ptn5f483j0Ki81HbqXDKrUBoAguOCFTaDC2rLl E2mpvUvvzT7U9I6oX4njA/yR+g892A119f8O8EyTXhQyPMQDAygrtNe1XFMg4bmS+PVi MrvSj4eLbTKjBKzhd+ZqSGUve8UWhm18ggmD3ecALWLlZ1fhCX2IIfik83pGyZ+RsGKq 4+L1EuQQSSc/2t9p12C4bbIAjSYFSubqiYwpCqtFjyoszGbYK3k2dybY4G1XcbK2u12v 7A== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0a-002e3701.pphosted.com with ESMTP id 34kr4td01k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 05 Nov 2020 15:24:40 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 6B6B451; Thu, 5 Nov 2020 15:24:39 +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 0921148; Thu, 5 Nov 2020 15:24:37 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Jordan Justen , Andrew Fish , Ray Ni , Nickle Wang , Peter O'Hanley Subject: [Platform Redfish Host Interface PATCH 6/6] EmulatorPkg: Redfish related changes on EmulatorPkg Date: Thu, 5 Nov 2020 22:38:53 +0800 Message-Id: <20201105143853.2180-7-abner.chang@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201105143853.2180-1-abner.chang@hpe.com> References: <20201105143853.2180-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-11-05_09:2020-11-05,2020-11-05 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 malwarescore=0 suspectscore=1 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011050105 - REDFISH_ENABLE definition to control EFI Redfish support - Add Redfish platform host interface library to EmulatorPkg build. - Set RestExServiceDevicePath PCD value. - Add Redfish host interface config EFI application to EmulatorPkg build. - Use Redfish DSC/FDF include file. Signed-off-by: Abner Chang Cc: Jordan Justen Cc: Andrew Fish Cc: Ray Ni Cc: Nickle Wang Cc: Peter O'Hanley --- EmulatorPkg/EmulatorPkg.dsc | 26 +++++++++++++++++++++++++- EmulatorPkg/EmulatorPkg.fdf | 5 +++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc index a27cb1beb0..aa5504c137 100644 --- a/EmulatorPkg/EmulatorPkg.dsc +++ b/EmulatorPkg/EmulatorPkg.dsc @@ -34,6 +34,11 @@ DEFINE NETWORK_ISCSI_ENABLE = FALSE DEFINE SECURE_BOOT_ENABLE = FALSE + # + # Redfish definition + # + DEFINE REDFISH_ENABLE = FALSE + [SkuIds] 0|DEFAULT @@ -95,7 +100,9 @@ # PlatformBootManagerLib|EmulatorPkg/Library/PlatformBmLib/PlatformBmLib.inf KeyMapLib|EmulatorPkg/Library/KeyMapLibNull/KeyMapLibNull.inf - + !if $(REDFISH_ENABLE) == TRUE + RedfishPlatformHostInterfaceLib|EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHostInterfaceLib.inf + !endif # # Misc # @@ -249,6 +256,18 @@ # 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1 +!if $(REDFISH_ENABLE) == TRUE + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePathMatchMode|DEVICE_PATH_MATCH_MAC_NODE + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePathNum|1 + # + # Below is the MAC address of network adapter on EDK2 Emulator platform. + # You can use ifconfig under EFI shell to get the MAC address of network adapter on EDK2 Emulator platform. + # + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceDevicePath.DevicePath|{DEVICE_PATH("MAC(000000000000,0x1)")} + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceAccessModeInBand|False + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDiscoverAccessModeInBand|False +!endif + [PcdsDynamicDefault.common.DEFAULT] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 @@ -447,6 +466,11 @@ !include NetworkPkg/Network.dsc.inc +!if $(REDFISH_ENABLE) == TRUE + EmulatorPkg/Application/RedfishPlatformConfig/RedfishPlatformConfig.inf +!endif +!include RedfishPkg/Redfish.dsc.inc + [BuildOptions] # # Disable deprecated APIs. diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf index b256aa9397..5420756eaa 100644 --- a/EmulatorPkg/EmulatorPkg.fdf +++ b/EmulatorPkg/EmulatorPkg.fdf @@ -208,6 +208,11 @@ INF EmulatorPkg/EmuSnpDxe/EmuSnpDxe.inf !endif !include NetworkPkg/Network.fdf.inc +# +# EFI Redfish drivers +# +!include RedfishPkg/Redfish.fdf.inc + INF FatPkg/EnhancedFatDxe/Fat.inf !if "XCODE5" not in $(TOOL_CHAIN_TAG) -- 2.17.1