From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.40]) by mx.groups.io with SMTP id smtpd.web10.23818.1671461610956582743 for ; Mon, 19 Dec 2022 06:53:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=Nen7KnMC; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.236.40, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gTUPdCE9JE4LmatTG8Go/dmL9PaK17cQiCS0UtGWaDm3hDub2uX38eiB+KIRU1DB7AVqr0rqriBbf0VYT1f4MWKQ2fULjXL70rzYAxjWGAoKVebdTSbZNWJG9iTGMJSvSju+E8Ou+e8yHEDTNjrArsn6Rskfs1ZYmpseUt0Q31qglrunQW/KdC/wv90DLhyHyyy2SqgtaGDLGJVk7YXSYU7mQwT1hUpuHdYPOCjGcoQAVTbcxhkP9duShCsN1PCRy8i7ywZI74Jj4Era9EAgi1tXfRCknL6MoGBo7q7n+6vJHzxCnrh/2c5acBnSgjlKTpOt/77Je1TjQOTUG0PMKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yiLdvNl3zDNxSvP7mKfp7cE9ODCkMB0cr2Qk3u9yXWw=; b=AicNTQadiXDjQxeo7b8W2Scfw2yWras/p+BC+TUZOLxTmEgetW+5PVS9EVJkT2s5hxlKeliqQctqkfd0nPaWVRFi6dOTf/8d3MYGjy+0jIheDOqmbhtgmxBm5D2FVnmsi91+4nQPCXg4P2d8nZbEfmkkw52tyO+nHrrsWC57pelF/YxPkUv16nZGLxO0PtSUyFpaZbBeDSeXgxmlw47N442dsWDudcjoFIJ1aChyNSTCIQTZtVJOFBdYp67WXu5j8k7CX2FE8qjMdleLJFIlkCeJHDBhtGF/4dheslu/4kcvXFhvRJOmoyOG/AjPmZFJmKSrFfaMwBEFUHvE9nbn6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yiLdvNl3zDNxSvP7mKfp7cE9ODCkMB0cr2Qk3u9yXWw=; b=Nen7KnMCrCUFrdbUXsF1zdIIlW6hCwUFPsdkkGVjyNiT5kUpEqOEFiesfNW2AQ/zxISjczi5FtEXfuHfS+zW6OdrftbuEWMFEN2aG3bRjDpmkk8Xl9AFcwDrZn1e6Uuy+Yftxd4P36PEt7Zwakj3ZZl4VJ584DD+O2+39fhmffY= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by SN7PR12MB7024.namprd12.prod.outlook.com (2603:10b6:806:262::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Mon, 19 Dec 2022 14:53:28 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::cddb:3de9:cd1d:26e4]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::cddb:3de9:cd1d:26e4%5]) with mapi id 15.20.5924.016; Mon, 19 Dec 2022 14:53:28 +0000 From: "Chang, Abner" To: Nickle Wang , "devel@edk2.groups.io" CC: Igor Kulchytskyy Subject: Re: [PATCH 1/2] RedfishPkg/RedfishHostInterface: Platform Redfish HI notification Thread-Topic: [PATCH 1/2] RedfishPkg/RedfishHostInterface: Platform Redfish HI notification Thread-Index: AQHZE7SbshlCa+w+vEOjMVk27orvxK51R25AgAAEXEA= Date: Mon, 19 Dec 2022 14:53:28 +0000 Message-ID: References: <20221219141648.1620-1-abner.chang@amd.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-12-19T14:53:25Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=127e93f1-1036-466c-9f04-af12008e0c69; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|SN7PR12MB7024:EE_ x-ms-office365-filtering-correlation-id: c4f862c6-a17c-4b09-6460-08dae1d0c9f9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Lq3JYDRbZHQ+ihXvLePpnWdF3jr7CcAaAr8k6udIpjCz9owmh7i4txDRlroCn783UURM/IuKIZFmMPpqyDAZ5CTHue3tsqrasRESjqtWoEIHZnuuVrqQh+qYNuKZE8H5Vr1BowiJCT00HOlwUx/IHw9JFXhDgdXtSnsvh5GZ7WxEeQO9WfEncHzKklxODG3HW7hMvfqh6THM8QnuseMzrQwC6wQL9NFjJy4OYP15OXbrbcECKYALMs+jiG442D8Y3efspNXTGe0ECSy/qDAh5u2CMztiic1lhow+UU4LmIs6ECl87GS50ZWVQCxGQGN8mfKXe9m/2Vu/PsD0Rx3coCP1DQkCYXWsPQHWSMEWYn2X8oU5Gvm3a3SmRTY6C0OhrlieCQtchW10TwYW6rE9c7TfgBpuS5uTQ4JJPzRXnyGLuhRGYLUafevfIevvLcPFFYmrD8X8WkpJUbBQS2/yXwgNRmnlJkjekXkiLrW/SIYgmas3lG+10k2aaB2862YSqx3yxwXlaJOSmjaokXFVTyQHo23pXBX/pKxnCSak+5IlOYR7BoE+7mbsQ71w4NlRULt7+Vy+WS5qEzgC28H+aj6IpjBdGlRCf7EmpS43Hq+t5H51thsyGpYTX3UvR8mYBhXCI0FaehjwZLkjfxhtTbVXoPzkxopBIN3YyHtx7ioy0LT+5mke2QSbYlTA0PAkjRPhBjFfp6uuplStwmcddg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(376002)(39860400002)(366004)(346002)(136003)(451199015)(83380400001)(86362001)(55016003)(33656002)(122000001)(38070700005)(19627235002)(38100700002)(316002)(8936002)(110136005)(52536014)(2906002)(66446008)(66476007)(64756008)(66556008)(76116006)(66946007)(5660300002)(4326008)(15650500001)(8676002)(9686003)(186003)(41300700001)(53546011)(7696005)(26005)(6506007)(71200400001)(478600001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?JeA51LGxTeZL/Ns1nzinh7HKCxMyYxOE686Ns1M2RD6+7AGsBsdnHe0Evo0M?= =?us-ascii?Q?X4/LSQg8A7fNcfN/BxLIAbXtDlY7gnsy+CniUUT1htBwCU1EISvO8VSGxBYF?= =?us-ascii?Q?a1+vVK0K1Ti/tCjPvv1IRKRK+OGrvhWFvYKpcgowA/YlmZMTyYy4Meh7A+2Z?= =?us-ascii?Q?cgfyVTqajRu6IglEM6TNmRxU7a/gKbq6UocH5dlR8/LDirIY9hoDkRdSDxA2?= =?us-ascii?Q?YQgPC2R9RjmGSrj857T+Bv/InEifbieKm3ry58am7WYXxsZET/VV1nS3ddrJ?= =?us-ascii?Q?e8rOpXnUFg6/napWEFzVBTGl+sys13o/Oj7LinwkR1l8E4/bd/EE3N0i4PQW?= =?us-ascii?Q?dxN+V+uD84gCKoF50EJCTJbNnRQ3qqT/0LIO6d9Wf8hPRlc2keSyNcMFwXjr?= =?us-ascii?Q?JA0RH4H8ds4LfWlBxLEZJKgK2VuausqO6GaBah1U8o8VzjGiMJc1gcJYz1+T?= =?us-ascii?Q?3FZyz2w39/Dica+FkDZzyvEVlWT0QFRJcj89kX3JhlhAaNxzUFcIyRXnz1vI?= =?us-ascii?Q?Qm4mgouVbIYdzSVz/1tln2eHwMWknlcSiUnFBO25gPz1uti+O2vQOiLNZrgW?= =?us-ascii?Q?umiBxJYRaT15H3v/0FZIe5Xxomyiwb+WxR8FbE81A9xWGFspnAtSW6Q70h+n?= =?us-ascii?Q?+6YJxHDGnK4GKtw15whBfUgMcT16wRwAf+cJLLTklUWSUcb2DGsto215LW7w?= =?us-ascii?Q?cStk7HULalOPBKvw/k+K+gdyjijZMxeKGUQkrymyWCjVWG/FUpTkZJndIVCR?= =?us-ascii?Q?5Pejdd2SlcDJr9RQLQQD5IzlyVn+2Td7xT1KR4XzAxpPi96MkpEFiywRRLgo?= =?us-ascii?Q?ftrhR/yaBTYT9zUSD9er7iseX4Rv7a4R5k/q8Sh7zsJXNVdm4qPPQtQf7pqk?= =?us-ascii?Q?pXDXm7yvTOE7/rycpM2R2cRROweWFijlpdGYZNV6CZArG0rwqo591c+edv+6?= =?us-ascii?Q?1SO6XU4dKAcQJl26zXFu3vEoGSt334uyVKWrZh//NltjhWjkSeclr4xUAxtp?= =?us-ascii?Q?ZVwSdQE5pMh8iSpDmikUXeJxfBMVaOowmhArIszqtcY8egpOv4O/nKIRTeBY?= =?us-ascii?Q?0SVV6Mjml24mj7L5vjnm9EfEAtM95GLhqzsPG2HVoAnJvsj/X1PjQijgkhVE?= =?us-ascii?Q?yL6QoeZbev5zrnPTjG53dQWhAQFasgr7aUrEhi3tNLZYBXcwxe7+wRWeFgD0?= =?us-ascii?Q?2ILc9EugqxwsaqOi4f3Xzl2DzZpciC8VN7WbyUDhZWYx8f7Dim4MDcZSZxuw?= =?us-ascii?Q?eUt+HLDCDa+dBV+AlEV7NNggY8p6x2kO8dnzfBrD5yTnHsxA4XeIf3Qm/8Ch?= =?us-ascii?Q?pDpXJyphB/Bmo9lf5WSJQWQqAUC7yY2sdX7+fRabcNONI8378wxzzpc5nvxy?= =?us-ascii?Q?Va8Bq+i9ZAnwfLkTDJDykkxkCFUaV6wLd+y1fW/9sUEqIeuRYS3LY0sJbgsE?= =?us-ascii?Q?G1JT7YgjUp5J1KsL6M5PWxiEyG+7jjpHfN1sJEhG9obk8IORXEKlr1godcXn?= =?us-ascii?Q?C3WTZCCtn12nKFKy61U9YBhCXrYC0a7JRn8govqTTcF5fgMlmYtPF7SsjkAw?= =?us-ascii?Q?f9u3Z68dYTcXKGdeMohMNPFyG/dqmcFEbT6sWoSW?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4f862c6-a17c-4b09-6460-08dae1d0c9f9 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2022 14:53:28.4201 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KMcShOiIwwmO/fwWrU3Un9evAPwzAQrbvPjp/+qE/ezv3Op/RZ7PVWW6yTO0KTl/c2ceCGGZhTOmrK2/KGhiaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7024 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] It could be removed by accident, V2 is sent. Thanks Abner > -----Original Message----- > From: Nickle Wang > Sent: Monday, December 19, 2022 10:39 PM > To: Chang, Abner ; devel@edk2.groups.io > Cc: Igor Kulchytskyy > Subject: RE: [PATCH 1/2] RedfishPkg/RedfishHostInterface: Platform Redfis= h HI > notification >=20 > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. >=20 >=20 > Hi Abner, >=20 > @@ -119,7 +123,7 @@ RedfishCreateSmbiosTable42 ( > } else { > NewProtocolRecords =3D ReallocatePool (CurrentProtocolsDataLength, > NewProtocolsDataLength, (VOID *)ProtocolRecords); > if (NewProtocolRecords =3D=3D NULL) { > - DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish ho= st > interface protocol data.", __FUNCTION__)); > + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish > + host interface protocol data.")); >=20 > I think we need "__FUNCTION__" above. Not sure why you remove it but "%a" > relies on it. >=20 > Thanks, > Nickle >=20 > -----Original Message----- > From: abner.chang@amd.com > Sent: Monday, December 19, 2022 10:17 PM > To: devel@edk2.groups.io > Cc: Nickle Wang ; Igor Kulchytskyy > Subject: [PATCH 1/2] RedfishPkg/RedfishHostInterface: Platform Redfish HI > notification >=20 > External email: Use caution opening links or attachments >=20 >=20 > From: Abner Chang >=20 > For some use cases, Redfish host interface table relies on the certain EF= I > protocols installation at the driver connection. > Redfish host interface DXE driver is not able to build the SMBIOS type 42= h record > at driver entry point. This patch adds the mechanism in Redfish host inte= rface > DXE driver to listen to EFI protocol installed by platform library that i= ndicates the > necessary information is ready for building SMBIOS 42h record. >=20 > Signed-off-by: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > --- > .../Include/Library/RedfishHostInterfaceLib.h | 27 ++++++- > .../PlatformHostInterfaceLibNull.c | 26 ++++++- > .../RedfishHostInterfaceDxe.c | 73 ++++++++++++++++++- > 3 files changed, 119 insertions(+), 7 deletions(-) >=20 > diff --git a/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h > b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h > index 8d8389b9647..fa9f2d64eea 100644 > --- a/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h > +++ b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h > @@ -2,6 +2,7 @@ > Definitinos of RedfishHostInterfaceDxe driver. >=20 > (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> + Copyright (C) 2022 Advanced Micro Devices, Inc. All rights > + reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -19,7 +20,7 @@ > /** > Get platform Redfish host interface device descriptor. >=20 > - @param[in] DeviceType Pointer to retrieve device type. > + @param[out] DeviceType Pointer to retrieve device type. > @param[out] DeviceDescriptor Pointer to retrieve > REDFISH_INTERFACE_DATA, caller has to free > this memory using FreePool(). > @retval EFI_SUCCESS Device descriptor is returned successfully in > DeviceDescriptor. > @@ -28,7 +29,7 @@ > **/ > EFI_STATUS > RedfishPlatformHostInterfaceDeviceDescriptor ( > - IN UINT8 *DeviceType, > + OUT UINT8 *DeviceType, > OUT REDFISH_INTERFACE_DATA **DeviceDescriptor > ); >=20 > @@ -40,7 +41,7 @@ RedfishPlatformHostInterfaceDeviceDescriptor ( > @param[in, out] ProtocolRecord Pointer to retrieve the first or the n= ext > protocol record. > caller has to free the new protocol re= cord returned from > this function using FreePool(). > - param[in] IndexOfProtocolData The index of protocol data. > + @param[in] IndexOfProtocolData The index of protocol data. >=20 > @retval EFI_SUCCESS Protocol records are all returned. > @retval EFI_NOT_FOUND No more protocol records. > @@ -52,4 +53,24 @@ RedfishPlatformHostInterfaceProtocolData ( > IN UINT8 IndexOfProtocolData > ); >=20 > +/** > + Get the EFI protocol GUID installed by platform library which > + indicates the necessary information is ready for building > + SMBIOS 42h record. > + > + @param[out] InformationReadinessGuid Pointer to retrive the protocol > + GUID. > + > + @retval EFI_SUCCESS Notification is required for building up > + SMBIOS type 42h record. > + @retval EFI_UNSUPPORTED Notification is not required for building= up > + SMBIOS type 42h record. > + @retval EFI_ALREADY_STARTED Platform host information is already read= y. > + @retval Others Other errors. > +**/ > + > +EFI_STATUS > +RedfishPlatformHostInterfaceNotification ( > + OUT EFI_GUID **InformationReadinessGuid > + ); > #endif > diff --git > a/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLi= bN > ull.c > b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLi= bN > ull.c > index b30f9e37a4d..f83f5418d47 100644 > --- > a/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLi= bN > ull.c > +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterf > +++ aceLibNull.c > @@ -2,6 +2,7 @@ > NULL instace of RedfishPlatformHostInterfaceLib >=20 > (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> + Copyright (C) 2022 Advanced Micro Devices, Inc. All rights > + reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -23,7 +24,7 @@ > **/ > EFI_STATUS > RedfishPlatformHostInterfaceDeviceDescriptor ( > - IN UINT8 *DeviceType, > + OUT UINT8 *DeviceType, > OUT REDFISH_INTERFACE_DATA **DeviceDescriptor > ) > { > @@ -51,3 +52,26 @@ RedfishPlatformHostInterfaceProtocolData ( { > return EFI_NOT_FOUND; > } > + > +/** > + Get the EFI protocol GUID installed by platform library which > + indicates the necessary information is ready for building > + SMBIOS 42h record. > + > + @param[out] InformationReadinessGuid Pointer to retrive the protocol > + GUID. > + > + @retval EFI_SUCCESS Notification is required for building up > + SMBIOS type 42h record. > + @retval EFI_UNSUPPORTED Notification is not required for building= up > + SMBIOS type 42h record. > + @retval EFI_ALREADY_STARTED Platform host information is already read= y. > + @retval Others Other errors. > +**/ > +EFI_STATUS > +RedfishPlatformHostInterfaceNotification ( > + OUT EFI_GUID **InformationReadinessGuid > + ) > +{ > + return EFI_UNSUPPORTED; > +} > diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > index 623350bc261..e5b2bb225f9 100644 > --- a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > @@ -6,6 +6,7 @@ >=20 > Copyright (c) 2019, Intel Corporation. All rights reserved.
> (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> + Copyright (C) 2022 Advanced Micro Devices, Inc. All rights > + reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -21,6 +22,9 @@ > #include > #include >=20 > +static EFI_EVENT mPlatformHostInterfaceReadylEvent =3D NULL; static VOID > +*mPlatformHostInterfaceReadyRegistration =3D NULL; > + > /** > Create SMBIOS type 42 record for Redfish host interface. >=20 > @@ -119,7 +123,7 @@ RedfishCreateSmbiosTable42 ( > } else { > NewProtocolRecords =3D ReallocatePool (CurrentProtocolsDataLength, > NewProtocolsDataLength, (VOID *)ProtocolRecords); > if (NewProtocolRecords =3D=3D NULL) { > - DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish ho= st > interface protocol data.", __FUNCTION__)); > + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish > + host interface protocol data.")); > FreePool (ProtocolRecords); > FreePool (ProtocolRecord); > return EFI_OUT_OF_RESOURCES; > @@ -238,6 +242,27 @@ ON_EXIT: > return Status; > } >=20 > +/** > + Notification event of platform Redfish Host Interface readiness. > + > + @param[in] Event Event whose notification function is being invok= ed. > + @param[in] Context The pointer to the notification function's conte= xt, > + which is implementation-dependent. > + > +**/ > +VOID > +EFIAPI > +PlatformHostInterfaceInformationReady ( > + IN EFI_EVENT Event, > + IN VOID *Context > + ) > +{ > + DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion > +is ready\n", __FUNCTION__)); > + > + RedfishCreateSmbiosTable42 (); > + return; > +} > + > /** > Main entry for this driver. >=20 > @@ -254,8 +279,50 @@ RedfishHostInterfaceDxeEntryPoint ( > IN EFI_SYSTEM_TABLE *SystemTable > ) > { > + EFI_STATUS Status; > + EFI_GUID *ReadyGuid; > + > + DEBUG ((DEBUG_INFO, "%a: Entry\n.", __FUNCTION__)); > + > // > - // Create SMBIOS type 42 record. > + // Check if the Redfish Host Interface depends on // the specific > + protocol installation. > // > - return RedfishCreateSmbiosTable42 (); > + Status =3D RedfishPlatformHostInterfaceNotification (&ReadyGuid); if > + (Status =3D=3D EFI_SUCCESS) { > + DEBUG ((DEBUG_INFO, " Create protocol install notification to kn= ow the > installation of platform Redfish host interface readiness\n")); > + DEBUG ((DEBUG_INFO, " Protocol GUID: %g\n", ReadyGuid)); > + // > + // Register event for ReadyGuid protocol installed by > + // platform Redfish host interface library. > + // > + Status =3D gBS->CreateEvent ( > + EVT_NOTIFY_SIGNAL, > + TPL_CALLBACK, > + PlatformHostInterfaceInformationReady, > + NULL, > + &mPlatformHostInterfaceReadylEvent > + ); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, " Fail to create event for the installatio= n of > platform Redfish host interface readiness.\n")); > + return Status; > + } > + > + Status =3D gBS->RegisterProtocolNotify ( > + ReadyGuid, > + mPlatformHostInterfaceReadylEvent, > + &mPlatformHostInterfaceReadyRegistration > + ); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, " Fail to register event for the installat= ion of > platform Redfish host interface readiness.\n")); > + return Status; > + } > + return EFI_SUCCESS; > + } > + if (Status =3D=3D EFI_UNSUPPORTED || EFI_ALREADY_STARTED) { > + Status =3D RedfishCreateSmbiosTable42 (); } > + > + // Return other erros. > + return Status; > } > -- > 2.37.1.windows.1