diff options
author | Abner Chang <abner.chang@amd.com> | 2023-11-23 17:20:28 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-05 03:27:03 +0000 |
commit | 843ed207144ad450eacec75de7b7a240cde7eedd (patch) | |
tree | 8d09efa8aab6e99ef112a0362e41078959226451 | |
parent | a3b56f93e1914339be8c256b7dee406f958034b2 (diff) | |
download | edk2-843ed207144ad450eacec75de7b7a240cde7eedd.zip edk2-843ed207144ad450eacec75de7b7a240cde7eedd.tar.gz edk2-843ed207144ad450eacec75de7b7a240cde7eedd.tar.bz2 |
RedfishPkg/RedfishHostInterfaceDxe: Add Redfish HI readiness notification
Introduce gEdkIIRedfishHostInterfaceReadyProtocolGuid
and produce it when Redfish Host Interface is installed
on system.
Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Mike Maslenkin <mike.maslenkin@gmail.com>
Reviewed-by: Nickle Wang <nicklew@nvidia.com>
Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
-rw-r--r-- | RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c | 18 | ||||
-rw-r--r-- | RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf | 3 | ||||
-rw-r--r-- | RedfishPkg/RedfishPkg.dec | 3 |
3 files changed, 23 insertions, 1 deletions
diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c index 55a66de..02d5f14 100644 --- a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c @@ -53,7 +53,9 @@ RedfishCreateSmbiosTable42 ( SMBIOS_TABLE_TYPE42 *Type42Record;
EFI_SMBIOS_PROTOCOL *Smbios;
EFI_SMBIOS_HANDLE MemArrayMappedAddrSmbiosHandle;
+ EFI_HANDLE Handle;
+ Handle = NULL;
//
// Get platform Redfish host interface device type descriptor data.
//
@@ -226,6 +228,22 @@ RedfishCreateSmbiosTable42 ( goto ON_EXIT;
}
+ //
+ // Install Redfish Host Interface ready protocol.
+ //
+ Status = gBS->InstallProtocolInterface (
+ &Handle,
+ &gEdkIIRedfishHostInterfaceReadyProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ (VOID *)NULL
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "Failed to install gEdkIIRedfishHostInterfaceReadyProtocolGuid.\n"));
+ DEBUG ((DEBUG_ERROR, "PlatformConfigHandler driver may not be triggered to acquire Redfish service.\n"));
+ }
+
+ // Set Status to EFI_SUCCESS that indicates SMBIOS 42 record was installed
+ // on the platform sucessfully.
Status = EFI_SUCCESS;
ON_EXIT:
diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf index 1cdae14..f969e75 100644 --- a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf @@ -43,7 +43,8 @@ UefiLib
[Protocols]
- gEfiSmbiosProtocolGuid ## TO_START
+ gEfiSmbiosProtocolGuid ## TO_START
+ gEdkIIRedfishHostInterfaceReadyProtocolGuid ## PRODUCED
[Depex]
gEfiSmbiosProtocolGuid
diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index 077f1e8..3ea9ff3 100644 --- a/RedfishPkg/RedfishPkg.dec +++ b/RedfishPkg/RedfishPkg.dec @@ -90,6 +90,9 @@ ## Include/Protocol/EdkIIRedfishPlatformConfig.h
gEdkIIRedfishPlatformConfigProtocolGuid = { 0X4D94A7C7, 0X4CE4, 0X4A84, { 0X88, 0XC1, 0X33, 0X0C, 0XD4, 0XA3, 0X47, 0X67 } }
+ # Redfish Host Interface ready notification protocol
+ gEdkIIRedfishHostInterfaceReadyProtocolGuid = { 0xC3F6D062, 0x3D38, 0x4EA4, { 0x92, 0xB1, 0xE8, 0xF8, 0x02, 0x27, 0x63, 0xDF } }
+
[Guids]
gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}
|