Skip to content

Commit

Permalink
JadePkg: Enable Redfish modules
Browse files Browse the repository at this point in the history
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 <Vu@amperecomputing.com>
  • Loading branch information
vu-ampere authored and nhivp committed Jun 30, 2021
1 parent ba7bfd9 commit 8c0853e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Platform/Ampere/JadePkg/Jade.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -243,3 +266,8 @@
#
Platform/Ampere/JadePkg/Drivers/BootOptionsRecoveryDxe/BootOptionsRecoveryDxe.inf
Silicon/Ampere/AmpereAltraPkg/Drivers/IpmiBootDxe/IpmiBootDxe.inf

#
# Redfish
#
!include RedfishPkg/Redfish.dsc.inc
5 changes: 5 additions & 0 deletions Platform/Ampere/JadePkg/Jade.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c0853e

Please sign in to comment.