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 6B8F7740041 for ; Thu, 2 Nov 2023 10:18:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=fk0ClPO+yY1lUL9rPVm3U4hkQy6voRYSjE1qx97MEmE=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1698920286; v=1; b=sxwJjIanrZutcBGtzfTqVgieM89lzDkoRp83cPAP1A95/CCgFeFJt5ZokGYJDcKRacZNMcGD bTPXCa6GWzMT2fS68jYj/TlcEQZ3tGWt3ZWinX0P9Tam8x4rEHuCTqQ+CxQ8OhDkCzrBvGN18Z0 eGqDsym8AI175K6N5ZQA4K9Y= X-Received: by 127.0.0.2 with SMTP id ET4zYY7687511x9f4y5WTBMf; Thu, 02 Nov 2023 03:18:06 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.88]) by mx.groups.io with SMTP id smtpd.web10.27656.1698920285111609655 for ; Thu, 02 Nov 2023 03:18:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZsxxeQMQQzF7cxazns6pM3g+EmQQirdVgau5SdOMOglgURSIzS4+9gl/SqIjw7J72PqbHvNURFCC+CVnJqfFQENcazibQh7r6FbgKGU1AhR8wX0fOtA+AIeCsgSStDpRkhdI5hYKKRN1SUCESqAD3RtmXaVLYRrChPBuozZBiKQai1CoqdTgozXy2Y9624BIV0vCZHL4uQRto9106oTqQbv9/TEuCiY/Z+/uH7v1kaS9IEXbnysbLvh2Dz0ewxAWbuxWMyHVRTodCxZsk9+yuHyXxAAK/qaj1uufxaTpLqKifcdCLr0VLxKIYeaPgbk43WUY8jfwbEEeg8M7U/UnBg== 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=CR2HRC5jX4zdrz+j6ppG8DgMph5WA85CUsyc1PPWUBU=; b=lmL6KlFGB5vSUFHvthNIfgjPNUhNgr70HG/D7PPOnC4PxKrpCCgdLPsnkewmsZHU0VKoN6rFbhh2s/hgcF9YSI/L+Xdtr8k5/GGDYULKgUBXcBeARByB/7TtX4tmZcO8KcxKG77ubiyWFcZXpFX6yk/Zm+h9nE+W8bCAEqMvo+rGSoUdJjaV9gWKxfpn4OQEnKALr36m7je0ZYUFr/H4ZdEbDknFMOTO9UOJcCNpOB4lcpRd2kLzAtgwuljWsG3UTDjUUHoC7jiP5JTiNYaNF6GUSQN7elD20htAE6+UxHDBE6Ya86d7BY0YSIuU2LsJVbBbCOSSQF5NUFeia14QvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from CH0P221CA0015.NAMP221.PROD.OUTLOOK.COM (2603:10b6:610:11c::25) by MN0PR12MB6150.namprd12.prod.outlook.com (2603:10b6:208:3c6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Thu, 2 Nov 2023 10:18:01 +0000 X-Received: from DS3PEPF000099D9.namprd04.prod.outlook.com (2603:10b6:610:11c:cafe::e9) by CH0P221CA0015.outlook.office365.com (2603:10b6:610:11c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.22 via Frontend Transport; Thu, 2 Nov 2023 10:18:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.233) by DS3PEPF000099D9.mail.protection.outlook.com (10.167.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19 via Frontend Transport; Thu, 2 Nov 2023 10:18:01 +0000 X-Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 2 Nov 2023 03:17:50 -0700 X-Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 2 Nov 2023 03:17:49 -0700 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Thu, 2 Nov 2023 03:17:49 -0700 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: [edk2-devel] [edk2-redfish-client][PATCH 1/2] RedfishClientPkg: introduce Redfish override protocol Date: Thu, 2 Nov 2023 18:17:48 +0800 Message-ID: <20231102101748.13807-1-nicklew@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099D9:EE_|MN0PR12MB6150:EE_ X-MS-Office365-Filtering-Correlation-Id: e9278842-2ee4-4224-d263-08dbdb8cfe74 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: J0owWUNKQnIVZq27ZcHPmGsr/IN/Xxe7zeLYzvTg7MWKyMSqA0Wxh8FnYgkJFaJ33IJQ6qKfIFxvzTpdlNMpqquOlaVWE5kzTN5kK3w3h1/8XjenDFvQcE+B4jF2mD7XW2M9gLgAGGgzg3NolJcE4BhUhjXlntCw/FRarTmINoYDYVVyf6uSfvSd6KbChJcjNfD2AV9KpwV7Nayq8rx1qGAbdEWZ6DVMyZHMAUbY3GUyjiHjAUnJJJnVTEk67isnAyZMuK+NHpdEXpA/aFxVky5CGCT1j5s3TEbsn2K0MyDuMJRl5HDsD79+9tKabB5R9k0dbqJtwHNlH3I8ehzfOZ52BMD3v0c5OBtGEHZkiqe75dgb2NGJLOvWXPX9ScnYKheOPUmNOOmcH7dy9wWY7qUWHd/bUBHB11PSq9Pkoobm5gB7+BiNv1nbn/9jH7LvrIN/NaVNPhf6s8LyXNyhkg3Tzn3r6TK3D6F4qF2P3vf++2b6wzCVodYi7mkYOTzreQ3gMxePU2KO/nWXDA7xJJaOWbO/eyb07aHb1umJX8U9oenfMd0JpPmcwKwL8JgAj0OjgSIvm6PRwZH8PvaFAoX5c5XTaFk5e3xhBjj0lNkhIE8YOnyIibM+klrHKVrBcAB8n8+OoYLMAK0TjRkVXoa1RwPvawKfh+Su62eh6naXyO7xnyfL+XYEja14ZMwKhmhVh34c1KRQxkadebt+fIbzDMFO2l67WdpT4E5n8tfZ2opOYHPtNiKvTYu5vRmV X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2023 10:18:01.2780 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9278842-2ee4-4224-d263-08dbdb8cfe74 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099D9.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6150 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: bOJBrkF0Gil4DDEbVizyk8Jrx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=sxwJjIan; 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}") Introduce Redfish override protocol to notify platform that the Redfish changes system settings and about to perform system reboot. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- RedfishClientPkg/RedfishClientPkg.dec | 2 + .../Protocol/EdkIIRedfishOverrideProtocol.h | 60 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideP= rotocol.h diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/Redfi= shClientPkg.dec index eccbc22e..5f8a0350 100644 --- a/RedfishClientPkg/RedfishClientPkg.dec +++ b/RedfishClientPkg/RedfishClientPkg.dec @@ -45,6 +45,8 @@ gEdkIIRedfishFeatureInterchangeDataProtocolGuid =3D { 0x4B8FF71C, 0x4A7B= , 0x9478, { 0xB7, 0x81, 0x35, 0x9B, 0x0A, 0xF2, 0x00, 0x91 } } ## Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h gEdkIIRedfishResourceAddendumProtocolGuid =3D { 0xda36b12b, 0xaad4, 0x4e= 90, { 0xba, 0xcb, 0xe3, 0xb5, 0x3b, 0x08, 0xbc, 0x54 } } + ## Include/Protocol/EdkIIRedfishOverrideProtocol.h + gEdkiiRedfishOverrideProtocolGuid =3D { 0xb55bef20, 0xf7c8, 0x4a= e9, { 0xa7, 0xca, 0x8b, 0xba, 0x9f, 0x7b, 0xbf, 0x9c } } =20 [Guids] ## Include/Guid/RedfishClientPkgTokenSpace.h diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol= .h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h new file mode 100644 index 00000000..3c3e8bf2 --- /dev/null +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishOverrideProtocol.h @@ -0,0 +1,60 @@ +/** @file + This file defines the EDKII_REDFISH_OVERRIDE_PROTOCOL interface. + + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef EDKII_REDFISH_OVERRIDE_PROTOCOL_H_ +#define EDKII_REDFISH_OVERRIDE_PROTOCOL_H_ + +#include + +typedef struct _EDKII_REDFISH_OVERRIDE_PROTOCOL EDKII_REDFISH_OVERRIDE_PRO= TOCOL; + +/// +/// Definition of EDKII_REDFISH_PHASE_TYPE. +/// +typedef enum { + EdkiiRedfishPhaseBeforeReboot, + EdkiiRedfishPhaseMax +} EDKII_REDFISH_PHASE_TYPE; + +/** + The callback function to notify platform and provide Redfish phase. + + @param[in] This Pointer to EDKII_REDFISH_OVERRIDE_PROTOCOL ins= tance. + @param[in] PhaseType The type of phase in Redfish operation. + + @retval EFI_SUCCESS The notify function completed successfully. + @retval Others Some errors happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_NOTIFY_PHASE)( + IN EDKII_REDFISH_OVERRIDE_PROTOCOL *This, + IN EDKII_REDFISH_PHASE_TYPE PhaseType + ); + +// +// The definition of _EDKII_REDFISH_OVERRIDE_PROTOCOL +// +struct _EDKII_REDFISH_OVERRIDE_PROTOCOL { + // + // Protocol version of this implementation + // + UINT32 Version; + // + // Callback to notify Redfish phase + // + EDKII_REDFISH_NOTIFY_PHASE NotifyPhase; +}; + +#define EDKII_REDFISH_OVERRIDE_PROTOCOL_REVISION 0x00001000 + +extern EFI_GUID gEdkiiRedfishOverrideProtocolGuid; + +#endif --=20 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 (#110510): https://edk2.groups.io/g/devel/message/110510 Mute This Topic: https://groups.io/mt/102338703/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-