From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id EEA81AC1B5D for ; Wed, 6 Dec 2023 23:46:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=4hshKVqo2XgBVbquUKM0GPpwiakwYN240P4m93CTFtk=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1701906380; v=1; b=EZ4OyDn565wLyUY7F8yP8WX3YfGFlCEBDxL6ZZA8VEIFAChR7m+7muNg3QE3j1/74PnJHRbi 1EFr9ii6+hVxxgGS5YrXXV7iZbKKXI9Y38msKkqSoPj32BeQN4lY6lTX5FI7KXYt7NMs3fvOT+5 5+3bjYUZIwKKFPuOMKB1bx18= X-Received: by 127.0.0.2 with SMTP id GorKYY7687511xaAXmSw3c3g; Wed, 06 Dec 2023 15:46:20 -0800 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.50]) by mx.groups.io with SMTP id smtpd.web10.63775.1701906380091504968 for ; Wed, 06 Dec 2023 15:46:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U0oFFl89PkR98Sxi9ehhdQ2TQrVE5G0uoPn7FccvVWbKwzEz/2p6H0nB9y+ssBKFHNZfS3NrjG3NoQuEmXPqW5S0nloLCK5cXP+fStDXCvuYfoqsEgH8d1kxRWPkLcfYxEgTNrEURnlhjlLKfO6UhGEeGs0CO0z+o45Ykk+Bp3XUq8m7a/wLh9gCMs3Kq74i6HpOPnpIOi3J0hzDlCdYPTv8Uuhvh2U2vNsMrVUPuuBFBMMhJmbk9oKAtulX37fBsHAwioC5okxxchkNzlRN2NCEjUOjf2UGm+vUzPg8Az5/pMSS2nISvKghhBs9446PRifLqaQ6o5rw5gZsMiojkQ== 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=ULbZN5w/XTvPJxg/DyxT5vLgdL9X8Jw+QqVQH9I+SZs=; b=Duc8uIboshnQTbwZ1ACj/frvci9TwPI87V3ozcHbjLBUvY5ghcRsnrdFazgeGoO6631YExFr4Q+fNny9ZitFpKFo/GxYgIEsqZmJo3IHLXr5AeCcugQRYJkSL/NtkbbGpjn7lBRnA61InlDPS6/WdKNIZgCKVy1FvLtGQVVrfhb7ziOBV0NF7YEjan9pTVl349VNMUuqqcum/YTTWQj1KsbVpJysG5Z050ZyeSqANyLFFTFjMEBYJq0GZc+F0MQJfomUSvfiTGaxQcd4eaotFXlHXSsYpxP5lnA6xDqozvynfHX/CryHl/fH4y6s3iFBuoRMtvIL5b5vePcmviEprw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by CH3PR12MB7667.namprd12.prod.outlook.com (2603:10b6:610:14f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.25; Wed, 6 Dec 2023 23:46:16 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::a78e:602e:415c:4cb4]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::a78e:602e:415c:4cb4%3]) with mapi id 15.20.7046.035; Wed, 6 Dec 2023 23:46:16 +0000 From: "Nickle Wang via groups.io" To: "Chang, Abner" , "devel@edk2.groups.io" CC: Igor Kulchytskyy , Nick Ramirez Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/RedfishFeatureCoreDxe: fix Redfish event issue. Thread-Topic: [edk2-redfish-client][PATCH] RedfishClientPkg/RedfishFeatureCoreDxe: fix Redfish event issue. Thread-Index: AQHaKCI1x15NbFFJ2UaYIxsxNy72FrCcJwvggADFPGA= Date: Wed, 6 Dec 2023 23:46:16 +0000 Message-ID: References: <20231206085655.5304-1-nicklew@nvidia.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=ef8f1cb2-e53c-444b-8b14-4f558502c06c;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;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_SetDate=2023-12-06T11:59:24Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|CH3PR12MB7667:EE_ x-ms-office365-filtering-correlation-id: ef4ba209-dd76-4618-79f0-08dbf6b589cd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 623Lb4ezl//uRtyPI0NHsHwUHrLJxuO9JUHWWYNm/Ph27f5Y2bbChuiPPsHPxrJ7eW61135zfL09LIJhFNFo3rlbfQdSl/VPGPwMwLxtGBIqYCFv86F6f+/RlBMhCGm2aEYkg+Y+XLc3fb4LVe2kxMQ+J31B0SzyaYQXcnlSul+fKY/KvjHMPXUK1e4tQiBqLtIz/J4U5d+6kVxwIHcE2b+I+WtKphzNO8rk+RLWYRqms0JMTSHFDpGvTm/2IlTndiageS1eIRhe9aOtD/kNOoZA54/Nr2gUDyRe+bntqy+hwJ8+qAIumno67mMRFpnkl5iUIvfv8k6uYPmAQxHrrzFnbRzkuGTtxRLUlbe8f68cHtqtZazyb6h+MEufDrYL97FPVmQJi/jterHxZ8mT7GpDaBckCkWO16N6gkLNpv55p92YkWGEc+2xkylgMoSQSGRE+oTLO5y0XHiu4qR0wrAN9v7/UbPjUvuJ/wvwFqn5GVd0TpVK6j3gSvqgWhwzgWOc4krf4+WNUNqGTGI/oaWEEKnqWY6nDuZ1bcOBbIDeS4xPoWxZRWe2WyXq4lCAVHur5h6C6uQTxAK5Ym1XgqOCGBL3CD0qEkubsM+h96MvQTGDoHi4obvJrVwVHhycgmUwJSMvhFh5Y/k+V6nhvebNHa9oKBGTa+GUFLXj32Y= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LkFPoJtG0ggUvIxku5gPB017unZzAPKw/vOnx7a5dbScIC/TX548oq2+dE9m?= =?us-ascii?Q?AsbrQE6LJUW60A3XTrixclzr4SBHIFaocrvFjYFC1sMQD+9jb8SUI5EvIo/m?= =?us-ascii?Q?5UaVVfgU8mZi82B48iN8H5cBpLwvfJlRu3912lbyXZXJcqQSRc56QKYGEGSI?= =?us-ascii?Q?FAiNT7VPxklbVoJJlX9Lqs5HJDFpvkv/sT2xejhVH+DNVF29CbINORw4xgGi?= =?us-ascii?Q?uWwSC0rooy7dln7iQi2m9z7X03EeKWuSqaytECQqk99pam4Xj3mt/tFao9WU?= =?us-ascii?Q?aZW503B4AKV/VwXIgz+0gN4YBiUjprnnh6Kx1CQhr9Td1NBFlol/d6TG78kK?= =?us-ascii?Q?p7aGfjpHmNykRqufAMFSQC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ascii?Q?NsxcQWjXRnOn+6NJLQwBJRtqfg+9mJ8xbUqGoiQgt600dzQrswWc3dP8OkFk?= =?us-ascii?Q?EtFYjBlmHjMcmbsU4aN6T1/d2qDaRsNR98ZnOyPCI9KEmpHNmWpGgTnH3D6D?= =?us-ascii?Q?vZn2WaPpxAVuiK4IbQS93VZr6H5u1RR2iVc+hqafct7VgjeliuOEmRqkadB5?= =?us-ascii?Q?Bd1ysoBAtq+QXXEDJG56TqJk8lvLAbXNCHg1ZQewiP5O4t1p8n3+QXS1kKKE?= =?us-ascii?Q?5Dgg5PLXlOGYFS4g+a07J/WZZx9b+1J/OgYwQbHtAhckhmCOKPBZ2IweaaiR?= =?us-ascii?Q?+7mTTlfy3ILSLBTisx71LPfcHAi7Fke+GvY886Ekc1bmh1e2yM/+s0np83zn?= =?us-ascii?Q?T7YKoxeyK2mZ6F5febbJLa4VoUKiOfOkwNzX89kebJjS?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef4ba209-dd76-4618-79f0-08dbf6b589cd X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2023 23:46:16.4257 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zQigDucl9bFn6h0XHoYQ8iewbfB1awIdFHZVvaQjr0HVYLcRI2u+j1t27un6hSiVZMMkqeJnq8JdLMFdUgrcjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7667 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: i74ODoLdcLsd7MQfmyco5BF0x7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=EZ4OyDn5; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Abner, > If we use PCD here, then we have to also update CreateEventEx in the Redf= ishFeatureCoreEntryPoint. Create the event using REDFISH_FEATURE_CORE_TPL= . Yes, I also modify RedfishFeatureCoreEntryPoint in below together. > } > > /** > @@ -670,7 +682,7 @@ RedfishFeatureCoreEntryPoint ( > > Status =3D gBS->CreateEventEx ( > EVT_NOTIFY_SIGNAL, > - TPL_CALLBACK, > + REDFISH_FEATURE_CORE_TPL, > RedfishFeatureDriverStartup, > (CONST VOID *)&mFeatureDriverStartupContext, > EventGuid, Regards, Nickle > -----Original Message----- > From: Chang, Abner > Sent: Wednesday, December 6, 2023 8:08 PM > To: Nickle Wang ; devel@edk2.groups.io > Cc: Igor Kulchytskyy ; Nick Ramirez > Subject: RE: [edk2-redfish-client][PATCH] > RedfishClientPkg/RedfishFeatureCoreDxe: fix Redfish event issue. >=20 > External email: Use caution opening links or attachments >=20 >=20 > [AMD Official Use Only - General] >=20 > Hi Nickle, one comment below. >=20 > > -----Original Message----- > > From: Nickle Wang > > Sent: Wednesday, December 6, 2023 4:57 PM > > To: devel@edk2.groups.io > > Cc: Chang, Abner ; Igor Kulchytskyy > > ; Nick Ramirez > > Subject: [edk2-redfish-client][PATCH] > > RedfishClientPkg/RedfishFeatureCoreDxe: fix Redfish event issue. > > > > Caution: This message originated from an External Source. Use proper > > caution when opening attachments, clicking links, or responding. > > > > > > RedfishFeatureDriverStartup is callback function at TPL_CALLBACK > > level. In this function, Redfish events are signaled. However, Redfish > > events are created in TPL_CALLBACK level too. As the result, Redfish > > events cannot be invoked in desired sequence. Decrease the TPL to > > TPL_APPLICATION level inside RedfishFeatureDriverStartup and restore > > it to TPL_CALLBACK level before leaving this function. Now, Redfish > > events are called in correct sequence. > > > > Signed-off-by: Nickle Wang > > Cc: Abner Chang > > Cc: Igor Kulchytskyy > > Cc: Nick Ramirez > > --- > > .../RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h | 1 + > > .../RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c | 14 +++++++++++++- > > 2 files changed, 14 insertions(+), 1 deletion(-) > > > > diff --git > > a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h > > b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h > > index acefa41b..de08d79d 100644 > > --- a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h > > +++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h > > @@ -33,6 +33,7 @@ > > #define NodeIsCollectionLeftBracket L'{' > > #define NodeIsCollectionRightBracket L'}' > > #define NodeIsCollectionSymbol L"/{}" > > +#define REDFISH_FEATURE_CORE_TPL TPL_CALLBACK > > > > typedef struct _REDFISH_FEATURE_INTERNAL_DATA > > REDFISH_FEATURE_INTERNAL_DATA; struct > _REDFISH_FEATURE_INTERNAL_DATA > > { diff --git > > a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c > > b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c > > index f3188ddf..c0c3ec47 100644 > > --- a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c > > +++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c > > @@ -272,6 +272,13 @@ RedfishFeatureDriverStartup ( > > return; > > } > > > > + // > > + // Lower the TPL to TPL_APPLICATION so that // Redfish event and > > + report status code can be // triggered // gBS->RestoreTPL > > + (TPL_APPLICATION); > > + > > // > > // Reset PcdRedfishSystemRebootRequired flag > > // > > @@ -321,6 +328,11 @@ RedfishFeatureDriverStartup ( > > gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL); > > CpuDeadLoop (); > > } > > + > > + // > > + // Restore to the TPL where this callback handler is called. > > + // > > + gBS->RaiseTPL (REDFISH_FEATURE_CORE_TPL); > If we use PCD here, then we have to also update CreateEventEx in the > RedfishFeatureCoreEntryPoint. Create the event using > REDFISH_FEATURE_CORE_TPL. >=20 > Abner >=20 >=20 > > } > > > > /** > > @@ -670,7 +682,7 @@ RedfishFeatureCoreEntryPoint ( > > > > Status =3D gBS->CreateEventEx ( > > EVT_NOTIFY_SIGNAL, > > - TPL_CALLBACK, > > + REDFISH_FEATURE_CORE_TPL, > > RedfishFeatureDriverStartup, > > (CONST VOID *)&mFeatureDriverStartupContext, > > EventGuid, > > -- > > 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112142): https://edk2.groups.io/g/devel/message/112142 Mute This Topic: https://groups.io/mt/103009658/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-