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 E596C940F58 for ; Thu, 7 Dec 2023 02:06:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=FfC32seyu/eNPfq0QxzQsBAsd9/BTzRJdbaX9GwGEyY=; 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=1701914787; v=1; b=QLqh3KUldO8Awe5pXl5YLY5YKej/jkJyJkIjP+rvlimR8nSSGnEyxwAvfUfGJPu4yUsca4bL YgQYArtAKVL10MnqsctSc7se0WUNaBIkbqoUXOKrLoNQ6B68AtQ4BFKelk6gVYmUhR08uj5vSfx /lwBS6LJPq2bpUkE2BgpaBvE= X-Received: by 127.0.0.2 with SMTP id Vr8ZYY7687511xXIfULXKlk7; Wed, 06 Dec 2023 18:06:27 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.63]) by mx.groups.io with SMTP id smtpd.web11.73916.1701914786323307258 for ; Wed, 06 Dec 2023 18:06:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NZa+fxURSzSQB8JdCidjSq+JQbSpswwRu4Ze2woOLdDIst4tQzXG5/kUHvIsQaak0wm+dxDQftmzvqO0Yk454BDKrlGXs3ON1huq8c/DZc13sLDhn6XuOAgsJlj9BpLOaEKG6JKVGW+/XZvHGO+Uj+oA/TQ3D1Uf901ViZUO4lprkI/OfHpYeD/1y3/XDFbnPTJHR89SyqxgOCcidxEeh1B+049tsRacAL1RHphtVR8GtFC1iqPVPZkXMd42TGuiOCp5bNSzZ03RCFIrtJsSjlxAIayM85hbPUZ2nHlHlLrteakZKw4JFzBrB9AQ9D01/0acruYxqGZKh4l83cksYQ== 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=MGEvwJo7BHYb0EnvePKgHVzOuGptTDgcBBkcvA92rt0=; b=nrSN4meiYsd/AP6sR+PqjOJuINR1rEwTcStmP6VbwpNozBHniZnkP191XFUdu6cqdHmkONDA4paN74KwzxVl2oKGQncng9LR9cHxv6lfJbVpw8KZ+y5vMnc9DYpoDaVtvdNwVjy+yun7JyU7svrD70/CoR93OIhj2W1Z3S7oD5fioO0gxw48FtNF5qumGeDQWYfsPUTv9nEdszeg0/pXmOleQ0taAx/xSKESrQ9U3W+nm/7wYQKQxsd6jQmyafhnIt6xMLf2VI96KDxqvmgCn881wAFTW8OlpyqdtkzZnlJtWRvcQu5fvRx90cM/pCWpRhXxtg5PAHQIzYUFMgm2bw== 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 X-Received: from CH2PR12MB3957.namprd12.prod.outlook.com (2603:10b6:610:2c::17) by BL3PR12MB6641.namprd12.prod.outlook.com (2603:10b6:208:38d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.27; Thu, 7 Dec 2023 02:06:21 +0000 X-Received: from CH2PR12MB3957.namprd12.prod.outlook.com ([fe80::ed0:5e27:ff94:5d4f]) by CH2PR12MB3957.namprd12.prod.outlook.com ([fe80::ed0:5e27:ff94:5d4f%7]) with mapi id 15.20.7068.025; Thu, 7 Dec 2023 02:06:20 +0000 From: "Chang, Abner via groups.io" To: Nickle Wang , "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: AQHaKCI1x15NbFFJ2UaYIxsxNy72FrCcJwvggADFPGCAACcJ8A== Date: Thu, 7 Dec 2023 02:06:20 +0000 Message-ID: References: <20231206085655.5304-1-nicklew@nvidia.com> In-Reply-To: Accept-Language: en-US, zh-CN 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: CH2PR12MB3957:EE_|BL3PR12MB6641:EE_ x-ms-office365-filtering-correlation-id: 94820540-b3d5-4f92-6709-08dbf6c91b37 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: VAiEMUtOdOgabTqOBLdrtpCcMmRri55BJVMNVrkU8NrypbRHg4LXgCo5aoDYRwc+4wZ9uAm8lIJbz8inblOZnGUMI3J1UwG8gif6l4dsVMUMWnfOGuXKchC16Z/7IM8fT9pzgFYtt1kOAqy5pLRaoFVRQwzRcmb4LrD42bc8L+Y0ezIXVZ5D2ApWbR6audCOOft0jkyTSRALYSG7EA0xVHd7jAstizHZy23gCCSnI7h0v8LpISifL/ZOoqOAcoAH3kCWPmH9szuQhXxPvr9dkyxYxbnvvmGUcP+4/3BiJgMncR+ZgUoHN9S+2lIhlfSSaWpmE2w0a9KDnnPRRpnLKIamZQB9u88upPFtO39659pd8E/c4HlhfmDWPAF/71AMqLIWRi3W0MeW80D9yYU5yxFnULnZ/3zd0ksS5s2zbbmzqRRJj6ErhUVS4/SXiVGQ/d1qeIejEKaLwgrUD6Lh3NsZFc6D5IjDbvkFfPOEhCwRYmXaD7S7nMwIusDc0BwSlxbPhr1yQ7V9OqGAsFeGGfDuWAfIztBlNAAfXdfExgYMkuM/n53kb/HIV+eKZTRbCXWtZh1zrhP5QDRGDGdKscaKnWe829Dn4UqoJHOj/9VPTXMzJVZ8Mfma0UdA1B/4boQI8CUtBmJTLos82PzQTo/Bm7mdcXf/gj1/hh2OcLo= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Kat6oyf1O1U0CXaf4ZdjrNlIY6KbM8j/KvPOAy1Gd8Sv7SwQkTxOgDOHvmFJ?= =?us-ascii?Q?IDeVd15M5q3zjz0cJIDOTjulyNz55oyV8/pv9XuffDRrFcPrJr0kE6hghp9B?= =?us-ascii?Q?nCDv5c3PRT+PVxiFYS8FHya8FOZNdYx717vl/ADQGbFT4/Swm2EVAsTYsDvy?= =?us-ascii?Q?HbrdJcSwS27kF9lD4wtdm1hfn3n7lV+ujzDgEZBysX8o+jGTfWNximPmZDqh?= =?us-ascii?Q?g2juHWI1iivdwVv5mkcNJSspwueYg4wkkLvhUU3iacWCxGKjH05reJeKZvWP?= =?us-ascii?Q?LDHWOQTEPmCJ45JG77XMydo0x++AXkzkjbi9TPClfG9eM3BMnqOhO4P+noN5?= =?us-ascii?Q?XtzPomhSk8hfmQtwWe9x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v0jdz5/vdDcFZe/yF?= =?us-ascii?Q?ci1FldEv0Ehl1qW6zEpTfxqHwmeRxrQVwVSpuutxanT+9tfRcTHu0XmLGSV2?= =?us-ascii?Q?iVd7TgyvJSy9Kt1bju8FLYvZ7zFcS2W6244LlmOKL5Sl+ahFOG8ZTbwS6nEr?= =?us-ascii?Q?JfF9yXYpxKF8RxA3TmEqXvuSo3vgJrm7Gu1sywtO9JtRxkCTbKvRyC32+yFo?= =?us-ascii?Q?g9c8CxjJcUa1d1QCi0sT8R72CKEW/yQ9vehMH0E7YwBW+hqKMo4QJkOAkgGP?= =?us-ascii?Q?QXatPDwtsYJzdWveFhIciYsXOkmZw2nsW7PjOGVzv/wvmZpcmRULY/0fViIn?= =?us-ascii?Q?cKTQaJpLyYLS1fJf2ptq5JjmTUZRy0Jny5vLtYQ0?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB3957.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94820540-b3d5-4f92-6709-08dbf6c91b37 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2023 02:06:20.8467 (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: oIT+4qL0A/IrcWI42buS4t8q+MS8uwOATBXdubMysQNDeC2xOYcu78vkjh8+AsFtWt4EKOqTUpKT9qfTHM3SXA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6641 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,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: z9YG1uLZws6yDFZoiqqJ62Iox7686176AA= 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=QLqh3KUl; 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 [AMD Official Use Only - General] Ah sorry, I missed that one. Reviewed-by: Abner Chang > -----Original Message----- > From: Nickle Wang > Sent: Thursday, December 7, 2023 7:46 AM > To: Chang, Abner ; devel@edk2.groups.io > Cc: Igor Kulchytskyy ; Nick Ramirez > Subject: RE: [edk2-redfish-client][PATCH] > RedfishClientPkg/RedfishFeatureCoreDxe: fix Redfish event issue. > > [AMD Official Use Only - General] > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > Hi Abner, > > > If we use PCD here, then we have to also update CreateEventEx in the > RedfishFeatureCoreEntryPoint. 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. > > > > External email: Use caution opening links or attachments > > > > > > [AMD Official Use Only - General] > > > > Hi Nickle, one comment below. > > > > > -----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, Redfis= h > > > 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. > > > > Abner > > > > > > > } > > > > > > /** > > > @@ -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 (#112151): https://edk2.groups.io/g/devel/message/112151 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-