From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web11.645.1652843901573342468 for ; Tue, 17 May 2022 20:18:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=IAlUjiCc; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0137e89ecd=abner.chang@hpe.com) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24I0XJmr032700 for ; Wed, 18 May 2022 03:18:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=BfGTjVvChbFufBOQmVvjBcKIVz6OdR1HetMkD1pwSjo=; b=IAlUjiCccDviGetDbdA55L3yqcpfw5nsLdU8IeC0bVnnoy+Dbrlxw51bGVfB7Y/XDyw8 7cmPP4oTUtc62p0hYryd8uCzgO1vRgGPXANbC7NYUJj1PMb/mpTyzhSFB8D3LUxFDQuz SUVKYDc5sy3HaAFrSV/2WdhzyK3/NYoRKFcnmyzJJ7QTVQaYe1M++csdekJsCVYbd0uj 9QlYETTJP9G41TcFmVU8JsrfNXat11ViGOWelna/5JS/PlwlMdBCkt9Ybuit19VWcNh6 lJQFcQahk877il3PkoxppSDIp57lOCvPjm9GRKU8Lk9vb2kZFp9l4GBs5ukrMmdZ6/9v Rg== Received: from p1lg14879.it.hpe.com (p1lg14879.it.hpe.com [16.230.97.200]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3g4fkj6unr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 18 May 2022 03:18:20 +0000 Received: from p1wg14924.americas.hpqcorp.net (unknown [10.119.18.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by p1lg14879.it.hpe.com (Postfix) with ESMTPS id 9EBD01304B for ; Wed, 18 May 2022 03:18:19 +0000 (UTC) Received: from p1wg14928.americas.hpqcorp.net (10.119.18.116) by p1wg14924.americas.hpqcorp.net (10.119.18.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 17 May 2022 15:18:15 -1200 Received: from p1wg14921.americas.hpqcorp.net (16.230.19.124) by p1wg14928.americas.hpqcorp.net (10.119.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15 via Frontend Transport; Tue, 17 May 2022 15:18:15 -1200 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (192.58.206.38) by edge.it.hpe.com (16.230.19.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 17 May 2022 15:18:15 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i77zfs/kYxu4YXLH6SDmTOygOfbLQuUK7TsAcXighDV9dBkYJViBscSm2JH0RjEv4inyNmUz/bUWnxNekuAh+RAd8HhO03C81Vvwms3b8iEW4PdIlJwswStAE59ZGB3EZ8s0pAlJcq3a2oj2NL0wI8Qd8ChLLro+qJBzPBqASq2zicr56PU6zRkYq4OWY445Q8O+w5/fOnHlwm2XPoUqob6a9zmP9qaaB663MtGPoYXrEvpSnMkx/sZ5NHJ3SDQbJOUTCNY174Ombnmv7XA76GiwPefGSrmIS2FrXxc0xZP/eW3YXpl7u0oJ2/HhOTwv08VDj9AWWHxfqCHEdticxw== 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=BfGTjVvChbFufBOQmVvjBcKIVz6OdR1HetMkD1pwSjo=; b=Lqr+BUF44rg4nt9LJ+nHEzGf34zCMzjqA7c5UrbcnB6Yl+LOHeXCsKeJFA2NAW/1sRzHn6qxB+7awahn/zYIqD6pTF5mjcKfSqV+gdo1q2sPVdJXn84NqS4HEHFsjUMMsiZrnstwCUnXrgiCTMON5nUHxXgoWm9lSChWCxkZ6wDx+fVYSvAeN1g4ljy78L2Zn2RD9Ys/oDAqQ6z0fQJ0rjT5pFIlQDB4Bdm45gzpk8Tu6gAW/HkPxCGWf6F+/xWQi6aB1PAsw1NdCluE0/5J527Ht9dK1Cna+nAJHpmYj8Uhuiny84n3ImRQibGaccBpRQ54eYGfsCx1VILBBr2m3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:173::6) by SJ0PR84MB1483.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:a03:431::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Wed, 18 May 2022 03:18:13 +0000 Received: from PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM ([fe80::ccc7:75d5:2ce1:9b5a]) by PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM ([fe80::ccc7:75d5:2ce1:9b5a%9]) with mapi id 15.20.5250.018; Wed, 18 May 2022 03:18:13 +0000 From: "Abner Chang" To: "Wang, Nickle (Server BIOS)" , "devel@edk2.groups.io" Subject: Re: [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Introduce Redfish event library Thread-Topic: [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Introduce Redfish event library Thread-Index: AQHYaZ5+PilZGzvETEiP/Lam1s54a60j9/fg Date: Wed, 18 May 2022 03:18:13 +0000 Message-ID: References: <20220517024003.718-1-nickle.wang@hpe.com> In-Reply-To: <20220517024003.718-1-nickle.wang@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 48bea003-29e9-4352-bd07-08da387d0b4d x-ms-traffictypediagnostic: SJ0PR84MB1483:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TGeXHo2hRcfcAg8YaK+xXoffoi04Vz12WHUEy/6/P8l3i+VTTyZZl+n6cvy1e3rJom9ZFJUFUNimNKGByfKN7fjI9j4uHudZHvFcHdWuUl3JpDxiofoTtcMd+1ouLhh38rEHIyW7Ca+V+48+R7LllEarTW+MmPvUFrjgpgRSQn7/MxGnIzouIBrKaGJclQ2c2+czHgAG3709iR9CeoI2Jip8TB7gFpQkEKj6AncCEeEw+8V1wCr1+8dHtKapXOnJBKbtaaOxuW4w+3HQ9OJgi3M6lhi8PGCtVTD1hM0IOA9kryyRiSNkdRolSeWCLFGh8IK0cjppWDZLoReBvHhIkB1pjzvImQVdn4dZ8MLMDmjg5MAf1VrzdabC9J6t2eeqMvpG4u808F8KCBgh9I/6kyPeboojdZR4y3+w5kjgu8npDia3iAJqhRUazarHJHUdx3rrHeXkZrfhRUDqvQaSeVGAFKtoMDOcId+q5QMzf6OI33kPS5GDLAI7k8T8AtmqvJfo9X31AJlzKPAkAF9KgCg8yJ+KgRGk64uE5/BbWeUNyC7oIP4qxuIFZ9jqlsF4Q+a7fX0vVWWzmZGe+hCnx2d9kU4JA2mrj4JP6VVRrhhSZ/RSCCUeMlPbbJLMepLuoWcvA6GniJ6q5fZW+BCt/E4+FqtFXD0OwBjzPo3Un6pm/SzeC/EYz/tbMP1DCQJ42Ks4Cbv69M2e0bFNUXN8Vw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(366004)(110136005)(83380400001)(33656002)(316002)(82960400001)(2906002)(26005)(122000001)(38100700002)(66556008)(64756008)(66446008)(66476007)(71200400001)(8676002)(66946007)(9686003)(76116006)(38070700005)(55016003)(86362001)(30864003)(7696005)(8936002)(508600001)(186003)(53546011)(6506007)(52536014)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1v8wF1rRVTNPCFS573DK4Yq3UxYf421AzdksovJ4vmpsxTxXGhaNkcBmwQRU?= =?us-ascii?Q?DiUWWtS5paEIYi7KvyKoTPo/2K+PiKX7fI0nTxlYOADNlZ+wpTaboHOiw4+e?= =?us-ascii?Q?VUyY44YveOGU7p4uFHI9+i1Y7s+4Lb64qen4hhB4HSl0KIshCN9A6V43JRA2?= =?us-ascii?Q?kmhLEwHMugd1OWulZHeUkupqgKE9UgBvxE8NF63GzKcvAOF6XMM49Y+adLHo?= =?us-ascii?Q?kr+mSr8DGq/ImCNjwehbAdUIhGJr0A0KfLH2T2sD2yG8CMHsIKHvuRfdEWNX?= =?us-ascii?Q?RoiPEcW9f0Ub9r2O7iRmlxDl+/uAZOPA5kHvE88qLWdLYaPyTU9AWoTjGQ8z?= =?us-ascii?Q?tBq/bJFgB2EvVqUBwQ6nl27/AKj6SQXY7kA+cBvvOX085ePj3HG1DAT0+oZd?= =?us-ascii?Q?0Piv3DOCvvQqQgriocdEG2QHWqICE+YGSAIbjvWTmgJQLfRANgYN/gdTVcB1?= =?us-ascii?Q?blqsrHTgmOK7d26B2kX+dSHfL7CzVfuU6+0uiImMy94O9F7X+VAwd9z8tPKH?= =?us-ascii?Q?VK9rardJ0xyljEpfxq8aFkYN6zvgnWAgI4cfUWe0ZPQEbpD09BjmhcFzezJd?= =?us-ascii?Q?CSpMf5nkaCXWaq4RRS9Djpa63mu7LtVbVt0Eq9IAmFQhHUlfdFLNYdVHn3Cs?= =?us-ascii?Q?baLuKXnlvtYJYUkot9CuHCjpjoezu0k3AfV919MHGZWs7kosUH1evE0i0BaP?= =?us-ascii?Q?5bgS/Q27xu22kUexi87oWat9jW4iqowa41sRuJ5nGuoyfF5/NJ65VUXwLLO/?= =?us-ascii?Q?6YjhJHQHYrWsTuB63cGPSlnOnxeu7LSoqaXuyjHWbFiSI+DRAtOmxp+sx82T?= =?us-ascii?Q?RYpeQ28wVClRZdiegk8m2lPGdBDFsiNpwlz30akb5pvJ25rS2i5i11vzeGu4?= =?us-ascii?Q?58ZYHd8RevBjj9rVG9DAjsCeKj3m4T7GuRW6UDyAWKeMKswT/qSH/ms2iBsD?= =?us-ascii?Q?1JtgGxW1P9vK4lM8hLBVbjhTBHIW2gJ/Zrn+B2asMiMI9gWESVrb7mKnPluh?= =?us-ascii?Q?aBS/+O4yIY9llXLHjkaoCzDi6hYbW6ADJi3FnFey1VFvYkLlzvGpDRNmqmyh?= =?us-ascii?Q?n/ckeNGRky2ugjx2V12gl31en588M+Cox6FiIBgoj4Jf79vyTzYFkNpyn+4K?= =?us-ascii?Q?ovWXcGiYZApLLFqZLPVc7zULKFcoVzhdP0WLFrqwjwVi71qJ2+XydjWL7SJw?= =?us-ascii?Q?cMz9CYn0pMmi19Z6z9Nkda5RkuiVcxPybx4c1SoNh3GZdUM8uU+x6vQEx7nr?= =?us-ascii?Q?OMGorTaBMQTE6TKGz7TBPkgSlZuweKTZ9dtdqZLgwvIc2bkLGce7ZfbA1/DO?= =?us-ascii?Q?G9txx3SjlHgeXFKkCNAx6suZCwn8UaLetCgmqWfjicOS7PUnSviwYZBbZJ1R?= =?us-ascii?Q?c914RuupkQGGxibd+n7JH9UGWI2E0mbyOaabj3L3A3MN6LhSwQDSr3i/FUyg?= =?us-ascii?Q?jB96clqHhHBG6lQRdfx3BTJzuXcCRIb3Vht25LKwDIdWPdU4jTUJwuFqudAr?= =?us-ascii?Q?OqCwCireQb1Qmvx9+QIkNZsCSQjOeEEsfaIcExkldK3cj/NaI0WJcWqGEkSi?= =?us-ascii?Q?RO+J5mbwcI+h8hO36VTTjwqPTx7IldPKlbHdPguRHFj9Eoz1DrnXQhHWNXem?= =?us-ascii?Q?fyLyOmFu/b8EooWxkhNiVSh0QehQj7oWnzglVbRF1U9CLS7vM9kaRE10/5hK?= =?us-ascii?Q?MtwIifXf8ZkU43ZiaQw/9YFn8sLEeu4OW7OSnsbxhtaEZwJwxj3buYxJPccT?= =?us-ascii?Q?UhBBKv5rIQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 48bea003-29e9-4352-bd07-08da387d0b4d X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2022 03:18:13.7590 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: H+uVVeUP8927jDOBd13XUFSsCuKdCIQLOPnZMajMADadx+qm8evwAtbEZ0+CRuYzciGdpeb/9is1mCx/o0SAIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR84MB1483 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: A_mNU0ap34TUKfFMLvuDpfF_rFeh6ESg X-Proofpoint-GUID: A_mNU0ap34TUKfFMLvuDpfF_rFeh6ESg X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-18_01,2022-05-17_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 adultscore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 clxscore=1011 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205180017 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Few minor issues. > -----Original Message----- > From: Wang, Nickle (Server BIOS) > Sent: Tuesday, May 17, 2022 10:40 AM > To: devel@edk2.groups.io > Cc: Wang, Nickle (Server BIOS) ; Chang, Abner (HPS > SW/FW Technologist) > Subject: [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Introduce > Redfish event library >=20 > Add RedfishEventLib to Redfish client package. This library provides > interface for Redfish feature drivers to listen to Redfish event > such as the event before provisioning and the event after > provisioning. Feature driver can perform additional operation before > and after Redfish provisioning. >=20 > Signed-off-by: Nickle Wang > Cc: Abner Chang > --- > .../Include/Guid/RedfishClientEventGroup.h | 27 ++++ > .../Include/Library/RedfishEventLib.h | 77 ++++++++++ > .../Library/RedfishEventLib/RedfishEventLib.c | 139 ++++++++++++++++++ > .../RedfishEventLib/RedfishEventLib.inf | 38 +++++ > RedfishClientPkg/RedfishClientLibs.dsc.inc | 2 +- > RedfishClientPkg/RedfishClientPkg.dec | 7 +- > 6 files changed, 288 insertions(+), 2 deletions(-) > 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 >=20 > + GUID for Redfish Client Event Group GUID >=20 > + >=20 > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
>=20 > + >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#ifndef REDFISH_CLIENT_EVENT_GROUP_GUID_H_ >=20 > +#define REDFISH_CLIENT_EVENT_GROUP_GUID_H_ >=20 > + >=20 > +#define REDFISH_CLIENT_FEATURE_READY_TO_PROVISIONING_GUID \ >=20 > + { \ >=20 > + 0x77E4FC1C, 0x2428, 0x47EE, { 0x9E, 0xEC, 0x8B, 0x77, 0xEF, 0x9D, 0x= 4E, > 0xF0 } \ >=20 > + } >=20 > + >=20 > +extern EFI_GUID gEfiRedfishClientFeatureReadyToProvisioningGuid; >=20 > + >=20 > +#define REDFISH_CLIENT_FEATURE_AFTER_PROVISIONING_GUID \ >=20 > + { \ >=20 > + 0xE547CB6F, 0x306F, 0x4226, { 0xAB, 0x70, 0xA0, 0x6E, 0x26, 0xF1, 0x= 2E, > 0xD0 } \ >=20 > + } >=20 > + >=20 > +extern EFI_GUID gEfiRedfishClientFeatureAfterProvisioningGuid; >=20 > + >=20 > +#endif >=20 > 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 >=20 > + This file defines the Redfish event library interface. >=20 > + >=20 > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
>=20 > + >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#ifndef REDFISH_EVENT_LIB_H_ >=20 > +#define REDFISH_EVENT_LIB_H_ >=20 > + >=20 > +#include >=20 > + >=20 > +/** >=20 > + Create an EFI event before Redfish provisioning start. >=20 > + >=20 > + @param NotifyFunction The notification function to call wh= en the > event is signaled. >=20 > + @param NotifyContext The content to pass to NotifyFunctio= n when > the event is signaled. >=20 > + @param ReadyToProvisioningEvent Returns the EFI event returned from > gBS->CreateEvent(Ex). >=20 > + >=20 > + @retval EFI_SUCCESS Event was created. >=20 > + @retval Other Event was not created. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +EFIAPI >=20 > +CreateReadyToProvisioningEvent ( >=20 > + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL >=20 > + IN VOID *NotifyContext, OPTIONAL >=20 > + OUT EFI_EVENT *ReadyToProvisioningEvent >=20 > + ); >=20 > + >=20 > +/** >=20 > + Create an EFI event after Redfish provisioning finished. >=20 > + >=20 > + @param NotifyFunction The notification function to call wh= en the > event is signaled. >=20 > + @param NotifyContext The content to pass to NotifyFunctio= n when > the event is signaled. >=20 > + @param ReadyToProvisioningEvent Returns the EFI event returned from > gBS->CreateEvent(Ex). >=20 > + >=20 > + @retval EFI_SUCCESS Event was created. >=20 > + @retval Other Event was not created. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +EFIAPI >=20 > +CreateAfterProvisioningEvent ( >=20 > + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL >=20 > + IN VOID *NotifyContext, OPTIONAL >=20 > + OUT EFI_EVENT *ReadyToProvisioningEvent >=20 > + ); >=20 > + >=20 > +/** >=20 > + Signal ready to provisioning event. >=20 > + >=20 > + @retval EFI_SUCCESS Event was created. >=20 > + @retval Other Event was not created. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +SignalReadyToProvisioningEvent ( >=20 > + IN VOID Please remove IN. >=20 > + ); >=20 > + >=20 > +/** >=20 > + Signal after provisioning event. >=20 > + >=20 > + @retval EFI_SUCCESS Event was created. >=20 > + @retval Other Event was not created. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +SignalAfterProvisioningEvent ( >=20 > + IN VOID Please remove IN. >=20 > + ); >=20 > + >=20 > +#endif >=20 > diff --git a/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.c > b/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.c > new file mode 100644 > index 0000000000..1c8cfe53c7 > --- /dev/null > +++ b/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.c > @@ -0,0 +1,139 @@ > +/** @file >=20 > + Redfish event library implementation. >=20 > + >=20 > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
>=20 > + >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#include >=20 > + >=20 > +#include >=20 > + >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > + >=20 > +/** >=20 > + Create an EFI event before Redfish provisioning start. >=20 > + >=20 > + @param NotifyFunction The notification function to call wh= en the > event is signaled. >=20 > + @param NotifyContext The content to pass to NotifyFunctio= n when > the event is signaled. >=20 > + @param ReadyToProvisioningEvent Returns the EFI event returned from > gBS->CreateEvent(Ex). >=20 > + >=20 > + @retval EFI_SUCCESS Event was created. >=20 > + @retval Other Event was not created. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +EFIAPI >=20 > +CreateReadyToProvisioningEvent ( >=20 > + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL >=20 > + IN VOID *NotifyContext, OPTIONAL >=20 > + OUT EFI_EVENT *ReadyToProvisioningEvent >=20 > + ) >=20 > +{ >=20 > + EFI_STATUS Status; >=20 > + >=20 > + Status =3D gBS->CreateEventEx ( >=20 > + EVT_NOTIFY_SIGNAL, >=20 > + TPL_CALLBACK, >=20 > + (NotifyFunction =3D=3D NULL ? EfiEventEmptyFunction : > NotifyFunction), >=20 > + NotifyContext, >=20 > + &gEfiRedfishClientFeatureReadyToProvisioningGuid, >=20 > + ReadyToProvisioningEvent >=20 > + ); >=20 > + >=20 > + return Status; >=20 > +} >=20 > + >=20 > +/** >=20 > + Create an EFI event after Redfish provisioning finished. >=20 > + >=20 > + @param NotifyFunction The notification function to call wh= en the > event is signaled. >=20 > + @param NotifyContext The content to pass to NotifyFunctio= n when > the event is signaled. >=20 > + @param ReadyToProvisioningEvent Returns the EFI event returned from > gBS->CreateEvent(Ex). >=20 > + >=20 > + @retval EFI_SUCCESS Event was created. >=20 > + @retval Other Event was not created. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +EFIAPI >=20 > +CreateAfterProvisioningEvent ( >=20 > + IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL >=20 > + IN VOID *NotifyContext, OPTIONAL >=20 > + OUT EFI_EVENT *ReadyToProvisioningEvent >=20 > + ) >=20 > +{ >=20 > + EFI_STATUS Status; >=20 > + >=20 > + Status =3D gBS->CreateEventEx ( >=20 > + EVT_NOTIFY_SIGNAL, >=20 > + TPL_CALLBACK, >=20 > + (NotifyFunction =3D=3D NULL ? EfiEventEmptyFunction : > NotifyFunction), >=20 > + NotifyContext, >=20 > + &gEfiRedfishClientFeatureAfterProvisioningGuid, >=20 > + ReadyToProvisioningEvent >=20 > + ); >=20 > + >=20 > + return Status; >=20 > +} >=20 > + >=20 > +/** >=20 > + Signal ready to provisioning event. >=20 > + >=20 > + @retval EFI_SUCCESS Event was created. >=20 > + @retval Other Event was not created. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +SignalReadyToProvisioningEvent ( >=20 > + IN VOID Please remove IN. > + ) >=20 > +{ >=20 > + EFI_STATUS Status; >=20 > + EFI_EVENT Event; >=20 > + >=20 > + Status =3D CreateReadyToProvisioningEvent (NULL, NULL, &Event); >=20 > + if (EFI_ERROR (Status)) { >=20 > + DEBUG ((DEBUG_ERROR, "%a, failed to create after provisioning event\= n", > __FUNCTION__)); >=20 > + return Status; >=20 > + } >=20 > + >=20 > + gBS->SignalEvent (Event); >=20 > + gBS->CloseEvent (Event); >=20 > + >=20 > + return EFI_SUCCESS; >=20 > +} >=20 > + >=20 > +/** >=20 > + Signal after provisioning event. >=20 > + >=20 > + @retval EFI_SUCCESS Event was created. >=20 > + @retval Other Event was not created. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +SignalAfterProvisioningEvent ( >=20 > + IN VOID Please remove IN. Abner >=20 > + ) >=20 > +{ >=20 > + EFI_STATUS Status; >=20 > + EFI_EVENT Event; >=20 > + >=20 > + Status =3D CreateAfterProvisioningEvent (NULL, NULL, &Event); >=20 > + if (EFI_ERROR (Status)) { >=20 > + DEBUG ((DEBUG_ERROR, "%a, failed to create after provisioning event\= n", > __FUNCTION__)); >=20 > + return Status; >=20 > + } >=20 > + >=20 > + gBS->SignalEvent (Event); >=20 > + gBS->CloseEvent (Event); >=20 > + >=20 > + return EFI_SUCCESS; >=20 > +} >=20 > + >=20 > diff --git a/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.inf > b/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.inf > new file mode 100644 > index 0000000000..edafca0c65 > --- /dev/null > +++ b/RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.inf > @@ -0,0 +1,38 @@ > +## @file >=20 > +# >=20 > +# (C) Copyright 2022 Hewlett Packard Enterprise Development LP
>=20 > +# >=20 > +# SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > +# >=20 > +## >=20 > + >=20 > +[Defines] >=20 > + INF_VERSION =3D 0x00010006 >=20 > + BASE_NAME =3D RedfishEventLib >=20 > + FILE_GUID =3D C4F7E27D-2338-43EA-9D1F-D10960E3652= 1 >=20 > + MODULE_TYPE =3D DXE_DRIVER >=20 > + VERSION_STRING =3D 1.0 >=20 > + LIBRARY_CLASS =3D RedfishEventLib| DXE_DRIVER UEFI_DR= IVER >=20 > + >=20 > +# >=20 > +# VALID_ARCHITECTURES =3D IA32 X64 EBC >=20 > +# >=20 > + >=20 > +[Sources] >=20 > + RedfishEventLib.c >=20 > + >=20 > +[Packages] >=20 > + MdePkg/MdePkg.dec >=20 > + MdeModulePkg/MdeModulePkg.dec >=20 > + RedfishPkg/RedfishPkg.dec >=20 > + RedfishClientPkg/RedfishClientPkg.dec >=20 > + >=20 > +[LibraryClasses] >=20 > + BaseLib >=20 > + DebugLib >=20 > + UefiBootServicesTableLib >=20 > + UefiLib >=20 > + >=20 > +[Guids] >=20 > + gEfiRedfishClientFeatureReadyToProvisioningGuid >=20 > + gEfiRedfishClientFeatureAfterProvisioningGuid >=20 > diff --git a/RedfishClientPkg/RedfishClientLibs.dsc.inc > b/RedfishClientPkg/RedfishClientLibs.dsc.inc > index 5467acedd0..91e5de4296 100644 > --- a/RedfishClientPkg/RedfishClientLibs.dsc.inc > +++ b/RedfishClientPkg/RedfishClientLibs.dsc.inc > @@ -27,4 +27,4 @@ >=20 > RedfishPlatformConfigLib|RedfishPkg/Library/RedfishPlatformConfigLib/Red > fishPlatformConfigLib.inf >=20 >=20 > RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/ > RedfishContentCodingLibNull.inf >=20 >=20 > ConverterCommonLib|RedfishClientPkg/ConverterLib/edk2library/Converte > rCommonLib/ConverterCommonLib.inf >=20 > - >=20 > + > RedfishEventLib|RedfishClientPkg/Library/RedfishEventLib/RedfishEventLib.= i > nf >=20 > diff --git a/RedfishClientPkg/RedfishClientPkg.dec > b/RedfishClientPkg/RedfishClientPkg.dec > index 09df062dd3..56e542f03c 100644 > --- a/RedfishClientPkg/RedfishClientPkg.dec > +++ b/RedfishClientPkg/RedfishClientPkg.dec > @@ -1,7 +1,7 @@ > ## @file >=20 > # Redfish Client Package >=20 > # >=20 > -# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
>=20 > +# (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
>=20 > # >=20 > # SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > ## >=20 > @@ -21,6 +21,7 @@ >=20 >=20 > [LibraryClasses] >=20 > RedfishFeatureUtilityLib|Include/Library/RedfishFeatureUtilityLib.h >=20 > + RedfishEventLib|Include/Library/RedfishEventLib.h >=20 >=20 >=20 > [LibraryClasses.Common.Private] >=20 > ## @libraryclass Redfish Helper Library >=20 > @@ -39,6 +40,10 @@ > ## Include/Guid/RedfishClientPkgTokenSpace.h >=20 > gEfiRedfishClientPkgTokenSpaceGuid =3D { 0x8c444dae, 0x728b, 0x48ee= , > { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } } >=20 >=20 >=20 > + ## Include/Guid/RedfishClientEventGroup.h >=20 > + gEfiRedfishClientFeatureReadyToProvisioningGuid =3D { 0x77E4FC1C, 0x24= 28, > 0x47EE, { 0x9E, 0xEC, 0x8B, 0x77, 0xEF, 0x9D, 0x4E, 0xF0 } } >=20 > + gEfiRedfishClientFeatureAfterProvisioningGuid =3D { 0xE547CB6F, 0x30= 6F, > 0x4226, { 0xAB, 0x70, 0xA0, 0x6E, 0x26, 0xF1, 0x2E, 0xD0 } } >=20 > + >=20 > [PcdsFixedAtBuild] >=20 >=20 > gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32| > UINT32|0x10000001 >=20 >=20 > gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8| > UINT32|0x10000002 >=20 > -- > 2.32.0.windows.2