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 B916A740041 for ; Wed, 6 Dec 2023 12:08:32 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3GSdPa7E5c5kbYdlKgbV9BxNBBPftApJfBjwoBjE5xM=; 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=1701864511; v=1; b=kJd1oa/V+3V/tds2m4DTzNNUNtXNQsb3P0OBis0uKq3msy7iG+PBS0GRVpMDtFZ9aFY4PGcB Zeb+CnCcx0xmigppAHaivbcN1uLsc5bY+JdMfqPHjHnXL7D5h8UzQvnC8T4G5tCQSH63ZP6yCzv drGwLYTwfhaP5jDOwszvLEAQ= X-Received: by 127.0.0.2 with SMTP id w78YYY7687511xxYRYGGDhSf; Wed, 06 Dec 2023 04:08:31 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.63]) by mx.groups.io with SMTP id smtpd.web11.29754.1701864510609182586 for ; Wed, 06 Dec 2023 04:08:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VGvvTs1eAsF4Lr63lIdUsqmvm44sfMD17pSJttsytbID7QFoo63bzuyGDYzHqNy5p9RR9DEYja3ky1rTTJc5WWjvxeAbe26QWu+TDkziMFMMoovT73jg+3YgWorM1V/9B+PAhgxSCaxoUyYT2ziadI1KCuric5s2gdxvr1zjhzn82+hLd6xbjcZa+vdFhriKOQNYs7njjGscZqBd8YsGa0Penhy3RtTeDE7XcnLg4ldX+vgOgedq3+0pRGHA0a4ILG/4rigZIqEQFANmp//rPucXtv5fxjeARg/4ziyuB4vqIJa+yq6gG+i1UZaRTXOWaxI3OplxSTHHkL+KO8TIDQ== 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=XZc9ZaPEv6S4gFw3Z1+sKs4nLivB7Vkabll4pEWvngU=; b=KZ+r9xxrKBvqgOxhgUpvLRuG5iyUfujh5CB4yVUgFiVo6IJbPz4bGHNOgsh8SZHSgV1ghbhEFMH03ukOR1zKXsXGp0h+7LMbkBW9YkRAYZfADA9HfsKVVBB/TRNL51VvU+1XkSkmCKTftAktPvDkNWKMuHUyilgTL8DHsj9AAYp6pYpRE48mSis+d7hR75VRs2OCCeRKWbkFJXZSPcpYKg0X+ffRdSPTFw+gvz96a3dwW6+jf3zw3Tli0IiW8kc7mhDOE82kWjXGVOg6o3CUL4Cxs/p/k+G98gksqReyDWll/KbeqNzAJh0+O6uUKRtvOLlnFuoF6jTkinnVCA4+mQ== 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 MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by SJ1PR12MB6052.namprd12.prod.outlook.com (2603:10b6:a03:489::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Wed, 6 Dec 2023 12:08:26 +0000 X-Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::91d9:e679:32a3:dd05]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::91d9:e679:32a3:dd05%5]) with mapi id 15.20.7046.034; Wed, 6 Dec 2023 12:08:26 +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: AQHaKCI1x15NbFFJ2UaYIxsxNy72FrCcJwvg Date: Wed, 6 Dec 2023 12:08:26 +0000 Message-ID: References: <20231206085655.5304-1-nicklew@nvidia.com> In-Reply-To: <20231206085655.5304-1-nicklew@nvidia.com> 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: MN2PR12MB3966:EE_|SJ1PR12MB6052:EE_ x-ms-office365-filtering-correlation-id: 5912d012-3474-4210-bdc1-08dbf6540d73 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: ozSZZyHAuJTp5Vn7t97K3SmE8sWDcq7w8xLg9MYLXw2Bj8nb+vhyryCLLCzGPoiPsZFBbG72G/2f4Md47FrxvuSQGIZVkhUne/bIG7duXTBOkR07UnhJdalAp9CIx9h4MblXQACDvL6eHB0cpWtUf1ZUYV0cRdo2dbR1GbR9ZXyN+L8TAV/qdPExKZCsZRqH02rldnAqVSYX4B28H3rKneqrGLOx/VtbhRu1NSHz/x3dhwtO5H196AtqPCo5jjM910bh8DaV9jfFmsg1y8s79FOR1tQqjPrC/CgKWsbLQgKPV7IWOQ5NamUq3Ej/5Jo5EPhhSH1z8NKnv3vxuQc0lai117Cd5K9B1KY+cl93Hy0xwVE5J0D4V0+x2nfQyxqVpQjrGKiJAZNv2FrPcJwTt2hoGN41+3P0jlH1oS4qIPrK32GUN7MGqEtM/Z4nowU7kaIX/Pr4hZ4w+7AnLisOf3Z+kasHddF0qYU8Jp6ioYnvrowCyF6QIAgxDbLIf+qfTicEFe2VnW1oPsBHWgnoLs75xPTuf5KloCLDwgOjp44zvZeVYiTx1kZBl2LVRrEZLHSIXdn4MVeyqQau8+l887XsEYHB+sCPN1q96kb4/sMf0zxgkz8zL9FRb1NwNIfDTonJjWcO5FhpHIimKsjjUzv/gp+URzmUF62CAgxCya0= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nC8L8FE3APX6Ra3VEeMh8nFaKRQWCj+20Mdsx9PBLxTzUYAP2RWFSrmPXRUX?= =?us-ascii?Q?+Pq6ltpsd6j5ERLp6T4c7NsBu7QIwXNKOIH70/p9RUdNaEBTby93SiklByLK?= =?us-ascii?Q?lK1OddJC1AmPsX3GNZRGW+7D5SHW0sklBdHdEkt/hqrXQblx6/cupMFAgivQ?= =?us-ascii?Q?CxNjPvFH/C30R6kMWB3tFukDkpCdU5lqdFz7I749QOZMC959Js1e9ygtG+oU?= =?us-ascii?Q?CBusT/sbNUfVmdLSPxcw6tLhK3hf4LRJ3vBu47kXUIk6FuJmbsFrFPFeaE/z?= =?us-ascii?Q?UAtgU2lFKp7KGcAn+rvf9D7KeFmL2gh5TZO0gblc34EjT+pbSaKLQ82YgaAX?= =?us-ascii?Q?7X8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+GKkrLrMw1S/r96T?= =?us-ascii?Q?GY/2xLWQTqQvGDMEvPzXT7dOW0z+UWm8ObBhOvj8DYukUKbfxk78AwG6ewIu?= =?us-ascii?Q?9eeY7JJL73CiP0zwqmgL7eaMRgV5opm1Q/yzJ6Fke0L7m+M33wyx1Zx0ttBj?= =?us-ascii?Q?j3Bl7D6nNE1XFTxRF/EhPZgLpZ6JdEZL4veM8vIxm2DRHnB5E1U0UP781j2b?= =?us-ascii?Q?9kByjSg43R7dRmgeW7jsyA24eAVAX/8njxNPZ3sWAiAh/bqXPZppr9dF/Bm3?= =?us-ascii?Q?qAgnkFwUV4J3pwj9M8QrO4S00KtumtTckRO90dJkjUutMyTvCKm8Zufj8KFP?= =?us-ascii?Q?1jFFfSM8TGxJfb1ky9Y=3D?= 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: 5912d012-3474-4210-bdc1-08dbf6540d73 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2023 12:08:26.6290 (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: J/nbidaT9dYzbA30boUXrEiCPgc6zDaaMCeXQKlyhycS883VWXy30uaDRC6njnntB5RLRXxI62EpgOGYp2OovA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6052 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: XhTXKYQHPJehRlAukeszSjEax7686176AA= 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="kJd1oa/V"; 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; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") [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 caut= ion > 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 Redfis= hFeatureCoreEntryPoint. 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 (#112121): https://edk2.groups.io/g/devel/message/112121 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-