From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.86]) by mx.groups.io with SMTP id smtpd.web08.1695.1658799619779958467 for ; Mon, 25 Jul 2022 18:40:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=ru5NA7PD; 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.243.86, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=igMxonvq4bRmVjOtXTQ5h9BbOgJM6r6bz4e6PX/zttFk1orYoQln7EE+enPqryflFiCbw/eK9nfkNOWtGdLcYMF2K1ypEyyFzFuxCl4xJ1RGdU9wQoYCqyV6uOe2zHBn8Bkz5FLAvCo+5R7a9eboYMoJrVXDLy3Ke5TftCwYQTQHI+2n8vjNJfhOYOnkX2V0zIcZgkvBCF/6sk369yHChoT9X/oxSj9I+5nZbTn7jpLUQ3r4NOzC1cljWaFUXzRfDHS3pQL4bkPBR+Dwjnev2BtPLJ4TSVBmuuqygomixgfUCSGv1F6Sk919e6UyHz1V9nYHfPJ8WOPx5HzikdynBA== 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=J7O23Hm4TK28ZKnw+LEq0WdxWjGP9/u/HVh8ctbKEk0=; b=HHYuaoI5/CF9tC3Jr8bQxKle0ygGcNa0/jJIJa+T5k+PiRWlQ5qP2kmwCfzWRu3lHwzM2WxFl7CH+f8+IGOPpKIKcQw9bGv1DkSC6gy6uCyNyE6mW3/qOxHyVbninrLN8NWvmLHQNWd0Y3TxOyL7uF6bk6vyxu8OiSqwgjQK6dEI5NU+mrBTPiy+6tmtj3Ty+LBFza2gQxtf3C8zNgWJIv9lNdMgdYeagTDbE6lYq9hh0NSUjOEbNO8aEa+C7PcPDxYerzgKehVVaVTKytMXDZP9YurXBNABYRkwYQKOsVJkj9MERvaV5iMojw3dKR/RcVb0N3hs1GtdeX+wNMlMIw== 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=J7O23Hm4TK28ZKnw+LEq0WdxWjGP9/u/HVh8ctbKEk0=; b=ru5NA7PDBH5hXcZTrb38YUaSK/KZ9sENT4rbEqa0/hGG2kcmusOZy69a3gNYMXjD/O6yIqe3QPA++HdMrka3tXTUhIJKrzfb0RnY7c7wNrq9litGY+2pc/AMuHzLc6DsKRq3fj2yorltcXvgWeOetgIAM2DAcsRLBWppPcHv88M= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by DM8PR12MB5496.namprd12.prod.outlook.com (2603:10b6:8:38::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Tue, 26 Jul 2022 01:40:17 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::605a:11f4:fc16:8b06]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::605a:11f4:fc16:8b06%5]) with mapi id 15.20.5458.024; Tue, 26 Jul 2022 01:40:17 +0000 From: "Chang, Abner" To: Nickle Wang , "devel@edk2.groups.io" CC: "Yang, Atom" , Nick Ramirez Subject: Re: [edk2-staging][PATCH v2 01/15] edk2-staging/RedfishClientPkg: Introduce Redfish event library Thread-Topic: [edk2-staging][PATCH v2 01/15] edk2-staging/RedfishClientPkg: Introduce Redfish event library Thread-Index: AQHYn8bmilBleLT9qk69qnQDjo6fdq2P4a6Q Date: Tue, 26 Jul 2022 01:40:17 +0000 Message-ID: References: <20220725013555.926-1-nickle.wang@hpe.com> <20220725013555.926-2-nickle.wang@hpe.com> In-Reply-To: <20220725013555.926-2-nickle.wang@hpe.com> 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-07-26T01:40:15Z; 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=c233f858-e7a2-4b71-a9ea-f17787157e9c; 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-office365-filtering-correlation-id: 1f9458d7-b32c-44d1-b04b-08da6ea7cb52 x-ms-traffictypediagnostic: DM8PR12MB5496:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Zwe//nGy0C5hjWU8YAMS8GCE7qHqpXJXKthY4ZhoodRN/+kePmmPHbMNQhbKS49Pyhfsp3NE63uwstKXjLJyMl3ncNUsF8z7IX6pdNuW/DxzSZpJy+kuhz7SiW7y2aHca6xC8zwfryOl+N5jtGhL/kJNBmbuiKKaFWszNJ+VtA+lV4/Pp74Npj1cciX2/XINu2nS9/ojnj5XtA3fy3TNi1DdlAqR1Jcb1pTTCcyDD0/gFxOiF6xVVAVXbdcrYjKOde+KatqUJAUOsnBXatOPlHg+1Dal0QkjgiAXup0d/gzZJcKrnL5JxguOFwPL0cGrN6oL3JukQlTeK0CDlI81hcc320GmRpsWx5JYYHlYoqX6OnLdvoAVLr4K5XYbKBhreuSaq+DNOi8t7riTBU2VN+5ya82JBYmy69r4fWCezMpnzhoofGg/gLEeeMnkF/Jt1tyKP6ngifAAA7ir/UwSvNVChY3Z7uCgCISM8jT34M2TtQebfWFvUIBSuehKe2NdTaML0iHhxznAl3BkXBMRVXWlJJA695xHaqBPr1qZypsdmHHzrbwiRgj2fTp763lUDsamScjdMCqP0IO/M6XQiPBjUeSsQMLiFDh7ULofQfJF3LiIH/QSBlBoWgos3/Rn1Ew9KcGaemcjDEed94mB/MU3z5J6tlQVpaWgkce8f01vs1JYKJcAAvIhK0SRQmS992YSsKrf51oQeaM7+NSUQQttVJawaZotH2zpkyVf1tMKNmIGOirstxcMvoRVbIOPujV30wS6BTn2iKFjn5FLBN0hYewbMledEkGVwFiLfUf/jjZ5t98Ws2PsI3gDVjaj 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:(13230016)(4636009)(376002)(136003)(366004)(346002)(39860400002)(396003)(122000001)(33656002)(38100700002)(86362001)(478600001)(52536014)(38070700005)(5660300002)(8936002)(30864003)(296002)(9686003)(316002)(83380400001)(66946007)(64756008)(54906003)(76116006)(8676002)(71200400001)(66446008)(6506007)(66556008)(186003)(55016003)(4326008)(110136005)(41300700001)(2906002)(66476007)(53546011)(7696005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xzKNumP+/jTCwr7hpU2nHUFJPpC529GJ0ukN1ZzsXoWaos6Or2rlLUBautMt?= =?us-ascii?Q?6d0OGfzzh9VZ7biAdfF6fPCPL70qFwLiZbmsJB2fk5zWqxsTtnSVpEIumhgg?= =?us-ascii?Q?oPKQsTb8mB3JA6MsCouyxCpTMTf8FjiVYZQYOpDDySV8pWT20PjM03g9HD0f?= =?us-ascii?Q?6MTBLB1+jKwBrVJ3/Qbkaxz9sz1D7yZ6y/swLXBnFjLxWIW6QS9R8FVzEWVE?= =?us-ascii?Q?9U7NxNod25nKCSgmg0YDwU7vpDtA7RcnSS6neb0ZsH02O/d+gmSe/WbCT7oB?= =?us-ascii?Q?m6DD4TYEl8Bu2Xy7XOjQIDjq0MPjANLKtDuqFH8TnhQAYNEmN3m9H/CQFUu4?= =?us-ascii?Q?a5syg0b3yN7vHgEsu9HPrX5OwvEzSErhUJ5cuL50HFRsFYFtuIP5RQvahN48?= =?us-ascii?Q?BgvJtKLMiRtCV6PAbsZIgoJn6BRdvfC9VZkHC61Gny6ITks0KA+1icX+fJLG?= =?us-ascii?Q?V1+9gy/eGbt1auMN1HQEY7jkOTmYaMi0Ls8+SOVFHVYwSitXmVLwFAGvCSUP?= =?us-ascii?Q?dJyXiLiCqdTeOSAo2o1+KNCK4APyqYjQ71kPeo10BUjmLe4rCWMYOUI7zC9T?= =?us-ascii?Q?OHmsU2sPTYy2MA1fAYMglXonHplnvVuqYLL4CJN0s2uNvTkxLPx7Fd9S+wRL?= =?us-ascii?Q?N3fmvO+Mx9gKSxCPTMZ/tdR8q1TH4KVxjTtmZqlaJidge4ksBne0Sq40dExs?= =?us-ascii?Q?7atB1v269dkUS2G4zDQzL37ViqV4/IKNvyV27vn4z24RewZSY844LJpr2M6i?= =?us-ascii?Q?FKd5NLficmnIqWteeQm73/wXxGdzz3vSRjTKR8k9ith/unEVZhxSb4eYdhxt?= =?us-ascii?Q?n89UNXfIj9UgAMV/O3iYvSvk8wzrOXXVCgoRU8sKOaESyD+U3PkkDJDClF7l?= =?us-ascii?Q?HnAsdDLiyTELX9ne4Lsynlb8iqVAK46oHa2VDU7X38EvKkOVGtr6DaZBqkfG?= =?us-ascii?Q?MGWiSH+Emya1vMEq/y8ZnlTx8RXg+ptvIffJl+ICCH3KXbY2GfH0USqxWoit?= =?us-ascii?Q?sn5w+LmN/SYi4hLkhPw6q8CfV1Rt/roTJHF6JYvRjwFCskT+96Uslq0Bo5to?= =?us-ascii?Q?rtqYszRCiU6UE5oUuhLWAPqNNbJS8ePT+P2K5K+DyMUPDYKN6VZCj4bHKC5C?= =?us-ascii?Q?fH43i1PCAIpWY70bkfBXS+IJTY/cAFM6RMkuWAyuiGGGBc6xlsuP3QpJ5aL4?= =?us-ascii?Q?66kgDNaKjpW5zx0Ic6V9Rw17PsiD2PZF0BBbmQoVj3n40V2LQtvw8Ftfw5LQ?= =?us-ascii?Q?PQXu94TIpl3wLEZpUUUSENi1jmuKK5bIpnWhHQXkVDUPiPkMhEZVmw4FFSZq?= =?us-ascii?Q?iT830eC5pGk8nh1cLSL+4PriXnv+J1Sl3pulD4HRQGK1oc33CH2G5p8IbDFw?= =?us-ascii?Q?0c7QYDfPhoClyh4/VFc18ytwajXT7s5Yna+jVpxn/bvUEkXTdWJ9DPnxKkq3?= =?us-ascii?Q?UtGDGZ9VyTnwyQS9vKfaLGfUtPP0N/YwNbldrPEhD1SzaXx63MCwT7fk4CX7?= =?us-ascii?Q?N4ZVDr7OqFeQR/ObMe93iDMK/3Y4SnnwgK3P0lC4gT905NhXtdnSIjdOh8Z+?= =?us-ascii?Q?8ZKb4D0/h3F6k9rrIz2UJJz8Qzq17lAUhfNaSADb5rdv31r5tiRF0e6DpJQF?= =?us-ascii?Q?lTZi1vv8bSCaFmbA1ERddZ1fkHwDiy7BvhRxbAsk12RD?= 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: 1f9458d7-b32c-44d1-b04b-08da6ea7cb52 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2022 01:40:17.5665 (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: bOWp8nD7K1JtV1tFYU/M5JMucVcrjhwnVsv0GJCkgdl7o4WKXUF8bWF8GeqCfy7QFctapu7nE77OTV3RX8UNhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5496 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Reviewed-by: Abner Chang > -----Original Message----- > From: Nickle Wang > Sent: Monday, July 25, 2022 9:36 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Yang, Atom > ; Nick Ramirez > Subject: [edk2-staging][PATCH v2 01/15] edk2-staging/RedfishClientPkg: > Introduce Redfish event library >=20 > [CAUTION: External Email] >=20 > Add RedfishEventLib to handle Redfish event. There are two events defined= in > this library. One is the event before feature driver provisioning and the= other one > is the event after all provisioning is finished. >=20 > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Yang Atom > Cc: Nick Ramirez > --- > .../Include/Guid/RedfishClientEventGroup.h | 27 ++++ > .../Include/Library/RedfishEventLib.h | 77 ++++++++++ > .../Library/RedfishEventLib/RedfishEventLib.c | 139 ++++++++++++++++++ > .../RedfishEventLib/RedfishEventLib.inf | 42 ++++++ > RedfishClientPkg/RedfishClientLibs.dsc.inc | 1 + > RedfishClientPkg/RedfishClientPkg.dec | 5 + > 6 files changed, 291 insertions(+) > create mode 100644 RedfishClientPkg/Include/Guid/RedfishClientEventGroup= .h > create mode 100644 RedfishClientPkg/Include/Library/RedfishEventLib.h > create mode 100644 > RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.c > create mode 100644 > RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.inf >=20 > diff --git a/RedfishClientPkg/Include/Guid/RedfishClientEventGroup.h > b/RedfishClientPkg/Include/Guid/RedfishClientEventGroup.h > new file mode 100644 > index 0000000000..0d88dd4726 > --- /dev/null > +++ b/RedfishClientPkg/Include/Guid/RedfishClientEventGroup.h > @@ -0,0 +1,27 @@ > +/** @file > + GUID for Redfish Client Event Group GUID > + > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef REDFISH_CLIENT_EVENT_GROUP_GUID_H_ > +#define REDFISH_CLIENT_EVENT_GROUP_GUID_H_ > + > +#define REDFISH_CLIENT_FEATURE_READY_TO_PROVISIONING_GUID \ > + { \ > + 0x77E4FC1C, 0x2428, 0x47EE, { 0x9E, 0xEC, 0x8B, 0x77, 0xEF, 0x9D, > +0x4E, 0xF0 } \ > + } > + > +extern EFI_GUID gEfiRedfishClientFeatureReadyToProvisioningGuid; > + > +#define REDFISH_CLIENT_FEATURE_AFTER_PROVISIONING_GUID \ > + { \ > + 0xE547CB6F, 0x306F, 0x4226, { 0xAB, 0x70, 0xA0, 0x6E, 0x26, 0xF1, > +0x2E, 0xD0 } \ > + } > + > +extern EFI_GUID gEfiRedfishClientFeatureAfterProvisioningGuid; > + > +#endif > diff --git a/RedfishClientPkg/Include/Library/RedfishEventLib.h > b/RedfishClientPkg/Include/Library/RedfishEventLib.h > new file mode 100644 > index 0000000000..1f3d0acf19 > --- /dev/null > +++ b/RedfishClientPkg/Include/Library/RedfishEventLib.h > @@ -0,0 +1,77 @@ > +/** @file > + This file defines the Redfish event library interface. > + > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef REDFISH_EVENT_LIB_H_ > +#define REDFISH_EVENT_LIB_H_ > + > +#include > + > +/** > + Create an EFI event before Redfish provisioning start. > + > + @param NotifyFunction The notification function to call wh= en the > event is signaled. > + @param NotifyContext The content to pass to NotifyFunctio= n when > the event is signaled. > + @param ReadyToProvisioningEvent Returns the EFI event returned from > gBS->CreateEvent(Ex). > + > + @retval EFI_SUCCESS Event was created. > + @retval Other Event was not created. > + > +**/ > +EFI_STATUS > +EFIAPI > +CreateReadyToProvisioningEvent ( > + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL > + IN VOID *NotifyContext, OPTIONAL > + OUT EFI_EVENT *ReadyToProvisioningEvent > + ); > + > +/** > + Create an EFI event after Redfish provisioning finished. > + > + @param NotifyFunction The notification function to call wh= en the > event is signaled. > + @param NotifyContext The content to pass to NotifyFunctio= n when > the event is signaled. > + @param ReadyToProvisioningEvent Returns the EFI event returned from > gBS->CreateEvent(Ex). > + > + @retval EFI_SUCCESS Event was created. > + @retval Other Event was not created. > + > +**/ > +EFI_STATUS > +EFIAPI > +CreateAfterProvisioningEvent ( > + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL > + IN VOID *NotifyContext, OPTIONAL > + OUT EFI_EVENT *ReadyToProvisioningEvent > + ); > + > +/** > + Signal ready to provisioning event. > + > + @retval EFI_SUCCESS Event was created. > + @retval Other Event was not created. > + > +**/ > +EFI_STATUS > +SignalReadyToProvisioningEvent ( > + IN VOID > + ); > + > +/** > + Signal after provisioning event. > + > + @retval EFI_SUCCESS Event was created. > + @retval Other Event was not created. > + > +**/ > +EFI_STATUS > +SignalAfterProvisioningEvent ( > + IN VOID > + ); > + > +#endif > diff --git a/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.c > b/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.c > new file mode 100644 > index 0000000000..0a8483c371 > --- /dev/null > +++ b/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.c > @@ -0,0 +1,139 @@ > +/** @file > + Redfish event library to deliver Redfish specific event. > + > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +#include > + > +#include > +#include > +#include > +#include > +#include > + > +/** > + Create an EFI event before Redfish provisioning start. > + > + @param NotifyFunction The notification function to call wh= en the > event is signaled. > + @param NotifyContext The content to pass to NotifyFunctio= n when > the event is signaled. > + @param ReadyToProvisioningEvent Returns the EFI event returned from > gBS->CreateEvent(Ex). > + > + @retval EFI_SUCCESS Event was created. > + @retval Other Event was not created. > + > +**/ > +EFI_STATUS > +EFIAPI > +CreateReadyToProvisioningEvent ( > + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL > + IN VOID *NotifyContext, OPTIONAL > + OUT EFI_EVENT *ReadyToProvisioningEvent > + ) > +{ > + EFI_STATUS Status; > + > + Status =3D gBS->CreateEventEx ( > + EVT_NOTIFY_SIGNAL, > + TPL_CALLBACK, > + (NotifyFunction =3D=3D NULL ? EfiEventEmptyFunction : = NotifyFunction), > + NotifyContext, > + &gEfiRedfishClientFeatureReadyToProvisioningGuid, > + ReadyToProvisioningEvent > + ); > + > + return Status; > +} > + > +/** > + Create an EFI event after Redfish provisioning finished. > + > + @param NotifyFunction The notification function to call wh= en the > event is signaled. > + @param NotifyContext The content to pass to NotifyFunctio= n when > the event is signaled. > + @param ReadyToProvisioningEvent Returns the EFI event returned from > gBS->CreateEvent(Ex). > + > + @retval EFI_SUCCESS Event was created. > + @retval Other Event was not created. > + > +**/ > +EFI_STATUS > +EFIAPI > +CreateAfterProvisioningEvent ( > + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL > + IN VOID *NotifyContext, OPTIONAL > + OUT EFI_EVENT *ReadyToProvisioningEvent > + ) > +{ > + EFI_STATUS Status; > + > + Status =3D gBS->CreateEventEx ( > + EVT_NOTIFY_SIGNAL, > + TPL_CALLBACK, > + (NotifyFunction =3D=3D NULL ? EfiEventEmptyFunction : = NotifyFunction), > + NotifyContext, > + &gEfiRedfishClientFeatureAfterProvisioningGuid, > + ReadyToProvisioningEvent > + ); > + > + return Status; > +} > + > +/** > + Signal ready to provisioning event. > + > + @retval EFI_SUCCESS Event was created. > + @retval Other Event was not created. > + > +**/ > +EFI_STATUS > +SignalReadyToProvisioningEvent ( > + IN VOID > + ) > +{ > + EFI_STATUS Status; > + EFI_EVENT Event; > + > + Status =3D CreateReadyToProvisioningEvent (NULL, NULL, &Event); if > + (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, failed to create after provisioning event\= n", > __FUNCTION__)); > + return Status; > + } > + > + gBS->SignalEvent (Event); > + gBS->CloseEvent (Event); > + > + return EFI_SUCCESS; > +} > + > +/** > + Signal after provisioning event. > + > + @retval EFI_SUCCESS Event was created. > + @retval Other Event was not created. > + > +**/ > +EFI_STATUS > +SignalAfterProvisioningEvent ( > + IN VOID > + ) > +{ > + EFI_STATUS Status; > + EFI_EVENT Event; > + > + Status =3D CreateAfterProvisioningEvent (NULL, NULL, &Event); if > + (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, failed to create after provisioning event\= n", > __FUNCTION__)); > + return Status; > + } > + > + gBS->SignalEvent (Event); > + gBS->CloseEvent (Event); > + > + return EFI_SUCCESS; > +} > + > diff --git a/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.inf > b/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.inf > new file mode 100644 > index 0000000000..a9d475c27c > --- /dev/null > +++ b/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.inf > @@ -0,0 +1,42 @@ > +## @file > +# > +# (C) Copyright 2022 Hewlett Packard Enterprise Development LP
# # > +SPDX-License-Identifier: BSD-2-Clause-Patent # ## > + > +[Defines] > + INF_VERSION =3D 0x00010006 > + BASE_NAME =3D RedfishEventLib > + FILE_GUID =3D C4F7E27D-2338-43EA-9D1F-D10960E3652= 1 > + MODULE_TYPE =3D DXE_DRIVER > + VERSION_STRING =3D 1.0 > + LIBRARY_CLASS =3D RedfishEventLib| DXE_DRIVER UEFI_DR= IVER > + > +# > +# VALID_ARCHITECTURES =3D IA32 X64 EBC > +# > + > +[Sources] > + RedfishEventLib.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + RedfishPkg/RedfishPkg.dec > + RedfishClientPkg/RedfishClientPkg.dec > + > +[LibraryClasses] > + BaseLib > + DebugLib > + UefiBootServicesTableLib > + UefiLib > + > +[Protocols] > + > +[Pcd] > + > +[Guids] > + gEfiRedfishClientFeatureReadyToProvisioningGuid > + gEfiRedfishClientFeatureAfterProvisioningGuid > diff --git a/RedfishClientPkg/RedfishClientLibs.dsc.inc > b/RedfishClientPkg/RedfishClientLibs.dsc.inc > index 5467acedd0..ce1c27d884 100644 > --- a/RedfishClientPkg/RedfishClientLibs.dsc.inc > +++ b/RedfishClientPkg/RedfishClientLibs.dsc.inc > @@ -28,3 +28,4 @@ >=20 > RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/Re= d > fishContentCodingLibNull.inf >=20 > ConverterCommonLib|RedfishClientPkg/ConverterLib/edk2library/ConverterCo > mmonLib/ConverterCommonLib.inf >=20 > + > + RedfishEventLib|RedfishClientPkg/Library/RedfishEventLib/RedfishEventL > + ib.inf > diff --git a/RedfishClientPkg/RedfishClientPkg.dec > b/RedfishClientPkg/RedfishClientPkg.dec > index 09df062dd3..39b2f5baf8 100644 > --- a/RedfishClientPkg/RedfishClientPkg.dec > +++ b/RedfishClientPkg/RedfishClientPkg.dec > @@ -21,6 +21,7 @@ >=20 > [LibraryClasses] > RedfishFeatureUtilityLib|Include/Library/RedfishFeatureUtilityLib.h > + RedfishEventLib|Include/Library/RedfishEventLib.h >=20 > [LibraryClasses.Common.Private] > ## @libraryclass Redfish Helper Library @@ -39,6 +40,10 @@ > ## Include/Guid/RedfishClientPkgTokenSpace.h > gEfiRedfishClientPkgTokenSpaceGuid =3D { 0x8c444dae, 0x728b, 0x48ee= , { 0x9e, > 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } } >=20 > + ## Include/Guid/RedfishClientEventGroup.h > + gEfiRedfishClientFeatureReadyToProvisioningGuid =3D { 0x77E4FC1C, 0x24= 28, > 0x47EE, { 0x9E, 0xEC, 0x8B, 0x77, 0xEF, 0x9D, 0x4E, 0xF0 } } > + gEfiRedfishClientFeatureAfterProvisioningGuid =3D { 0xE547CB6F, 0x30= 6F, > 0x4226, { 0xAB, 0x70, 0xA0, 0x6E, 0x26, 0xF1, 0x2E, 0xD0 } } > + > [PcdsFixedAtBuild] >=20 > gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|UINT > 32|0x10000001 >=20 > gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8|UIN > T32|0x10000002 > -- > 2.32.0.windows.2