From 8c0853e7366b346120763e3cf3ac30709270e90e Mon Sep 17 00:00:00 2001 From: Vu Nguyen Date: Tue, 18 May 2021 17:47:06 +0700 Subject: [PATCH] JadePkg: Enable Redfish modules This change enables necessary modules to allow the communication between UEFI Host and BMC via Redfish interface. In order to establish a success and secure connection, few things need to be done: - Redfish service must be configured with a valid CA certificate and a proper Root CA certificate is installed on UEFI through TLS Server menu. - PcdRedfishRestExServiceDevicePath.DevicePath in Jade.dsc should be modified with MAC address of target network interface. Ex: DEVICE_PATH("MAC(001B21DC35B0,0x1)") - Use Shell app RedfishPlatformConfig provided by EmulatorPkg to config the Redfish service info. Ex: RedfishPlatformConfig -a 10.38.64.20 255.255.255.0 443 Signed-off-by: Vu Nguyen --- Platform/Ampere/JadePkg/Jade.dsc | 28 ++++++++++++++++++++++++++++ Platform/Ampere/JadePkg/Jade.fdf | 5 +++++ 2 files changed, 33 insertions(+) diff --git a/Platform/Ampere/JadePkg/Jade.dsc b/Platform/Ampere/JadePkg/Jade.dsc index f39e5ff24b0..a51fef6f97d 100755 --- a/Platform/Ampere/JadePkg/Jade.dsc +++ b/Platform/Ampere/JadePkg/Jade.dsc @@ -62,6 +62,7 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE DEFINE NETWORK_TLS_ENABLE = TRUE + DEFINE REDFISH_ENABLE = TRUE !include MdePkg/MdeLibs.dsc.inc @@ -107,6 +108,15 @@ # PcieBoardLib|Platform/Ampere/JadePkg/Library/PcieBoardLib/PcieBoardLib.inf + # + # EFI Redfish drivers + # +!if $(REDFISH_ENABLE) == TRUE + RedfishPlatformHostInterfaceLib|EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHostInterfaceLib.inf + RedfishPlatformCredentialLib|Platform/Ampere/JadePkg/Library/RedfishPlatformCredentialLib/RedfishPlatformCredentialLib.inf + RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLibNull.inf +!endif + [LibraryClasses.common.DXE_RUNTIME_DRIVER] CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf @@ -156,6 +166,19 @@ gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04 !endif +!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(001B21DC35B0,0x1)") } + + # Allow Redish Service while Secure boot is disabled + gAmpereTokenSpaceGuid.PcdRedfishServiceStopIfSecureBootDisabled|FALSE +!endif + [PcdsDynamicDefault.common.DEFAULT] # SMBIOS Type 0 - BIOS Information gAmpereTokenSpaceGuid.PcdSmbiosTables0BiosReleaseDate|"MM/DD/YYYY" @@ -243,3 +266,8 @@ # Platform/Ampere/JadePkg/Drivers/BootOptionsRecoveryDxe/BootOptionsRecoveryDxe.inf Silicon/Ampere/AmpereAltraPkg/Drivers/IpmiBootDxe/IpmiBootDxe.inf + + # + # Redfish + # +!include RedfishPkg/Redfish.dsc.inc diff --git a/Platform/Ampere/JadePkg/Jade.fdf b/Platform/Ampere/JadePkg/Jade.fdf index 55b4f649a87..eeb60c1d907 100755 --- a/Platform/Ampere/JadePkg/Jade.fdf +++ b/Platform/Ampere/JadePkg/Jade.fdf @@ -415,6 +415,11 @@ APRIORI DXE { INF Platform/Ampere/JadePkg/Drivers/BootOptionsRecoveryDxe/BootOptionsRecoveryDxe.inf INF Silicon/Ampere/AmpereAltraPkg/Drivers/IpmiBootDxe/IpmiBootDxe.inf + # + # EFI Redfish drivers + # +!include RedfishPkg/Redfish.fdf.inc + [FV.SystemFirmwareDescriptor] FvAlignment = 8 ERASE_POLARITY = 1