From nobody Thu May 16 16:38:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109280+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1696334555551435.81916995057054; Tue, 3 Oct 2023 05:02:35 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=EMY5zsNf0M7TfTPr35cVyWg7rpYWJFi+m3alM0I8764=; 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=1696334555; v=1; b=Pxf9PZTwxbt4oyjFqbovE6gGd2JDK52i6/LJHwCqIjr7VpWlvhjMJBXPweNshVQIS0YjtSnp tn6Oh3jUI7tSy4987ir0hCgSj9Jrb33TDIHXOj8Sp1mAJ32b7MqlXA6qNU/xXU7FsO9LPKAWEHl YL8VZfWUZDcrbBae9H0BonJk= X-Received: by 127.0.0.2 with SMTP id mRHRYY1788612xoR2UjhDfnj; Tue, 03 Oct 2023 05:02:35 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.69]) by mx.groups.io with SMTP id smtpd.web10.106586.1696334554117934085 for ; Tue, 03 Oct 2023 05:02:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U6EY2hgg4DKdYkRZ/9/AQiyv1rHpZQmKfCazapC4OlbXzR32JUZZgTeCf6Ch6JYOQlu2M4gt2L4psy8FIck6qDqMFTRNWoWe0vZCWYPzYaB/PpOhGYCBfk4+RRgp6ZX0euyj3cLacffJ6BZMKUZGRP9dqFXw0SPnWOoQtb81rJF/IpLoMy11KBG7hn2mYPnOO/B5y/ZngAXGVwsSSlYZLWsLPyccOddLqQSVprOmKAa+Agwr8X4vCOfZl+TFtYnOpeNWB8vjUkPsKtev8vC/DwTgwiLP6WpKadv4IKDwsxPmiNPD/zwzXx5UY9ae7CCQsIUJgO7OUzZKlnhdjE0dcw== 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=+rccY3SbqC9fZBba4jo9yiX5ZA26gbDaZNfHru05bcQ=; b=HTD1gJ+TKVPKx5BHWywD/r0fCKnmB2sOFImRpbVuVtiX6khKLZ+cccBL3nKSKqzsdiFWVpVC2pS8HuVEcoQenYG+Yxbt6TITOwqHSnZSNz4qbD2kcWyHNd65azENDAEzU0kjBSq/gX8ZGCg2gmMdSDGfR8PDNkXUxLqeotu85WSMnwt4GgdpPDuhVdZhzNohgwEy6pO7PTIIO6ClccwMJfzE5Q26AEEmwOMUXmBqWAAX1kRgAlgn8Hboz0ZMGHJBJiCsyiWPgGhavTcAt4gSXBaRudGXUpe0AEvCqOTXuxax1kBvynr/oviormBMUdMWCf8bK097sjHqFDWTuecG3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 X-Received: from BL1P222CA0026.NAMP222.PROD.OUTLOOK.COM (2603:10b6:208:2c7::31) by CY8PR12MB7586.namprd12.prod.outlook.com (2603:10b6:930:99::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.34; Tue, 3 Oct 2023 12:02:28 +0000 X-Received: from MN1PEPF0000F0E5.namprd04.prod.outlook.com (2603:10b6:208:2c7:cafe::c3) by BL1P222CA0026.outlook.office365.com (2603:10b6:208:2c7::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.31 via Frontend Transport; Tue, 3 Oct 2023 12:02:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+109280+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.117.161) by MN1PEPF0000F0E5.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.14 via Frontend Transport; Tue, 3 Oct 2023 12:02:27 +0000 X-Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 3 Oct 2023 05:01:56 -0700 X-Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 3 Oct 2023 05:01:55 -0700 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 3 Oct 2023 05:01:54 -0700 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy Subject: [edk2-devel] [edk2-redfish-client][PATCH v2] RedfishClientPkg: update Readme.md Date: Tue, 3 Oct 2023 20:01:54 +0800 Message-ID: <20231003120154.6143-1-nicklew@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000F0E5:EE_|CY8PR12MB7586:EE_ X-MS-Office365-Filtering-Correlation-Id: 81d0396b-104b-45da-d0f4-08dbc4089cf3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: ipKH0a5/PFwrwpY/TopfolkC84fwyeRbSFKVy1LjjPqL8MDTdpa2Cv3Mjlu2Y2cGlN3X9o6E2x0OnBb+Kp3vgrWbJS9gZon068LcNyI52hK1KcMTxt2es6QDnwy1j1DiIi2OXPG3k4AsLhc2oCSnulfDgB3LgOxRf+iUEN713Y6Dp24KRZFwAN6V0Xqvcmin74Gsqoryk0pqbEa9gSsM9+q1pLTRuFJ5xLMjpL9JcX2s8bnKoVHZIWbIkwET+wmLWv65UpmE/jURE+F3nybCa+UeFUHXJnck7BYkI6bXafTT2hQ4BanrPcSD12sle8ueVFLGrV/uRTF4V1Ik6M1AX3N6vkgJ4I9K2DJSiib9omBg8scoVwQzp1GckNOcyINvL2to/OBWAY2yfNBq0PCgfXtwiuPs3cgbTHxtTZwaMwixS5iW7/IVHPEV/wxdkVFVaOSG8Dl+voiWyEf+MjS8+KD30xE913wa57CXUlE7+FbgW+o8ZWBmFX/8AhXuLB+2Gb0UFZBYj5OA8wpMMLXjvoTYr9TH7qXnrtyseaDPfdWeNod8L9FKR+VfaqmuEuhGCkDDrYrZuw9JD7XjNYWVpWxCyW/b7CUmosDWA01mPKzdCaOZ6Sj2ebdpCxRqq0cWyvrnTtnr478lXNPQ/Vtf+Tq+9wCFFBk0scR58SzzvIpcLzIPHxIuKgPXh7zsONiRBg7OUta2vjKGWTS6RReZmritVEFHw0J0aihRbl1b4SF2hjVBdF6ekaqLQlSI7YDxlrbqTJmYZkkxfGIgjRPIUxNcj68NJrc2/1BmlOJic3jOMVFw5FNz8LVyKu1Guy8EGMU0ZKNH2KQilB2wHXNOflT5HPQK5koz8QK+xqo1K39Eaa3u/cfmEQs9uxBlahXI X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2023 12:02:27.3032 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81d0396b-104b-45da-d0f4-08dbc4089cf3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MN1PEPF0000F0E5.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7586 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: CGLHBgGDV8fzXENjtq5IVVTKx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1696334556333100001 Content-Type: text/plain; charset="utf-8" Update readme for below topics: - The call flow of BIOS Redfish provisioning scenario. - The call flow of BIOS Redfish pending settings scenario. - The call flow of Redfish feature driver dispatch. - Redfish foundation driver stack design. - The design of Redfish Platform Config Protocol. - The design of synchronization between BIOS and Redfish service. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Reviewed-by: Abner Chang --- .../redfish-call-flow-pending-settings.svg | 58 ++++++ .../Media/redfish-call-flow-provisioning.svg | 46 +++++ .../redfish-feature-driver-call-flow.svg | 133 ++++++++++++++ .../Media/redfish-foundation-driver-stack.svg | 75 ++++++++ ...redfish-platform-config-protocol-stack.svg | 99 ++++++++++ .../Media/redfish-synchronization-design.svg | 75 ++++++++ RedfishClientPkg/Readme.md | 170 ++++++++++++++++-- 7 files changed, 641 insertions(+), 15 deletions(-) create mode 100755 RedfishClientPkg/Documents/Media/redfish-call-flow-pend= ing-settings.svg create mode 100755 RedfishClientPkg/Documents/Media/redfish-call-flow-prov= isioning.svg create mode 100755 RedfishClientPkg/Documents/Media/redfish-feature-driver= -call-flow.svg create mode 100755 RedfishClientPkg/Documents/Media/redfish-foundation-dri= ver-stack.svg create mode 100755 RedfishClientPkg/Documents/Media/redfish-platform-confi= g-protocol-stack.svg create mode 100755 RedfishClientPkg/Documents/Media/redfish-synchronizatio= n-design.svg diff --git a/RedfishClientPkg/Documents/Media/redfish-call-flow-pending-set= tings.svg b/RedfishClientPkg/Documents/Media/redfish-call-flow-pending-sett= ings.svg new file mode 100755 index 00000000..c7338c69 --- /dev/null +++ b/RedfishClientPkg/Documents/Media/redfish-call-flow-pending-settings.s= vg @@ -0,0 +1,58 @@ + + + + + + + + + Fea= ture Driver + + EDK2= HII + + Red= fish Service + + + + + 3 + . If + HII question exists and pending value is changed + Use HII protocol/library to submit new value + + + 2. Check and see if there is HII question with lang: + / + bios/attributes/ + ATTRIBUTE_ + NAME + 4. Update current settings to + /redfish/v1/systems/SYS/Bios + (provisioning) + + 1. Use + HTTP =E2=80=9CGET=E2=80=9D to download pending settings from + /redfish + /v1/systems/SYS/Bios/Settings + + 6. + System reboot + + Chipset/HII + driver + + Chipset/HII + driver + + Chipset/HII + driver + + Chipset/HII + driver + + Con= sume pending + set= tings: + BMC to BIOS + 5. BMC reset pending settings + + diff --git a/RedfishClientPkg/Documents/Media/redfish-call-flow-provisionin= g.svg b/RedfishClientPkg/Documents/Media/redfish-call-flow-provisioning.svg new file mode 100755 index 00000000..70556152 --- /dev/null +++ b/RedfishClientPkg/Documents/Media/redfish-call-flow-provisioning.svg @@ -0,0 +1,46 @@ + + + + + + + + + Feat= ure Driver + + EDK= 2 HII + + Redf= ish Service + + + + + 1. Find all HII questions with + language: + =E2=80=9C/bios/attributes/* + =E2=80=9D + 3. Get current value of each HII question and + append value to attribute list + + 2. Follow Bios schema and + create attribute list + 4. BIOS current settings is ready + Issue HTTP =E2=80=9CPUT=E2=80=9D to /redfish/v1/systems/SYS/Bios + + + Chipset/HII + driver + + Chipset/HII + driver + + Chipset/HII + driver + + Chipset/HII + driver + + Pro= visioning: + BIOS to BMC + + diff --git a/RedfishClientPkg/Documents/Media/redfish-feature-driver-call-f= low.svg b/RedfishClientPkg/Documents/Media/redfish-feature-driver-call-flow= .svg new file mode 100755 index 00000000..acea6b44 --- /dev/null +++ b/RedfishClientPkg/Documents/Media/redfish-feature-driver-call-flow.svg @@ -0,0 +1,133 @@ + + + + + + + + + + + Redfish Feature + Core Driver + + Eve= nt driven + PcdEdkIIRedfishFeatureDriverStartupEventGuid + + + Re= ady + -<= /text> + to= + -<= /text> + Pr= ovision Signal + gEfiRedfishClientFeatureReadyToProvisionin + gGuid + + Af= ter + -<= /text> + Pro= vision Signal + gEfiRedfishClientFeatureAfterProvisioningG + uid + + + + Service Root + /r= edfish/v1 + + + ComputerSystemC + ollection + /r= edfish/v1/Systems + + + ComputerSystem + /r= edfish/v1/Systems/SYS + + + Bios + + /r= edfish/v1/Systems/SYS/Bios + + MemoryCollection + + /r= edfish/v1/Systems/SYS/Memory + + Memory + + =E2=80=A6 + + Bios + + Redfish foundation + + BMC Redfish service + + + + Redfish Platform Config + + EDK2 HII + + Chipset driver + + HW + + + + + + Network + + + x<= /text> + -<= /text> + ue= fi + - + re= dfish + -<= /text> + Bios.vA_B_C + /Bios/Attributes/XXX + Redfish Feature Protocol + Redfish Resource Config Protocol + Redfish Resource Config Protocol + + + + + + /redf= ish/ + v1<= /text> + / + Sys= tems + / + SYS + / + Bio= s + /=E2= =80=A6 + + + + + Ser= vice Root + + + + Comp= uter System + Col= lection + + + + Com= puter + Sys= tem + + + + Bio= s + Reg= ister + /r= edfish/v1/Systems/SYS/ + Me= mory/Dimm1 + + + + + diff --git a/RedfishClientPkg/Documents/Media/redfish-foundation-driver-sta= ck.svg b/RedfishClientPkg/Documents/Media/redfish-foundation-driver-stack.s= vg new file mode 100755 index 00000000..79694335 --- /dev/null +++ b/RedfishClientPkg/Documents/Media/redfish-foundation-driver-stack.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + NIC + + UEFI Network Stack + + In + - + band channel + + REST + EX + + Redfish Discover + Protocol + + Re= dfish Service + + Redfish Application + + Red= fish Config + Dr= iver + + SMBIOS + Type 42 + + HW + + Redfish Config Handler Protocol + + + + + + + + + + REST + EX + + Redfish Discover + Protocol + + Redfish Config + Driver + + REST + EX + + Redfish Discover + Protocol + + Redfish Config + Driver + + UEFI Network Stack + + NIC + + + diff --git a/RedfishClientPkg/Documents/Media/redfish-platform-config-proto= col-stack.svg b/RedfishClientPkg/Documents/Media/redfish-platform-config-pr= otocol-stack.svg new file mode 100755 index 00000000..670c29bf --- /dev/null +++ b/RedfishClientPkg/Documents/Media/redfish-platform-config-protocol-sta= ck.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Setup Menu + + EDK2 Setup Browser + + EDK2 Display Engine + User= + + EDK2 HII Database + + Chipset/HII + driver + + Chipset/HII + driver + + Chipset/HII + driver + + Chipset/HII + driver + + + Graphic protocols + Console input protocols + EFI Config Access Protocol + HII Database Protocol + + HW + + + + Feature drivers + + EDK2 HII Utility Library + Red= fish Interface + + EDK2 HII Database + + Chipset/HII + driver + + Chipset/HII + driver + + Chipset/HII + driver + + Chipset/HII + driver + + + EDKII Redfish Platform Configure Protoc= ol + EFI Config Access Protocol + HII Database Protocol + + HW + + + + + + + Mo= ve necessary functions + to= library + + UEFI + variable + + UEFI + variable + + + diff --git a/RedfishClientPkg/Documents/Media/redfish-synchronization-desig= n.svg b/RedfishClientPkg/Documents/Media/redfish-synchronization-design.svg new file mode 100755 index 00000000..2dd1fb61 --- /dev/null +++ b/RedfishClientPkg/Documents/Media/redfish-synchronization-design.svg @@ -0,0 +1,75 @@ + + + + + + + + + REDF= ISH_FEATURE_CALLBACK() + + Ide= ntify() + + Chec= k() + + Pr= ovisioning() + + Con= sume() + + Up= date() + + + + + + + Do= ne + + + + HT= TP + PO= ST/PUT + + HTTP <= /text> + PATCH/PUT + + Red= fishResourceIdentifyLib + + + Get= Data + ()<= /text> + EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCO= L + + + GeO= emData + ()<= /text> + + + + + + + + false + true + + + true + false<= /text> + Sta= rt + + + + + HTTP = + HEA= D/GET + + + Ge= tData + ()= + EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOC= OL + + GeO= emData + ()= + + diff --git a/RedfishClientPkg/Readme.md b/RedfishClientPkg/Readme.md index 0aec0580..190ddb22 100644 --- a/RedfishClientPkg/Readme.md +++ b/RedfishClientPkg/Readme.md @@ -31,13 +31,13 @@ Redfish property with HII option. The current design of UEFI Redfish Client EDK2 Implementation can already support the provisioning of firmware-owned platform Redfish resource, howe= ver, -this requires addtional support on edk2 HII. Therefore, provisioning of +this requires additional support on edk2 HII. Therefore, provisioning of firmware managed platform Redfish resource would be the second stage. Below are the block diagrams of UEFI Redfish Client EDK2 Implementation. ## EDK2 Redfish Client Implementation Diagrams -![UEFI Redfish Client Implementation](https://github.com/changab/edk2-stag= ing/blob/edk2-redfish-client/RedfishClientPkg/Documents/Media/RedfishClient= DriverStack.svg?raw=3Dtrue) +![UEFI Redfish Client Implementation](https://github.com/tianocore/edk2-re= dfish-client/blob/main/RedfishClientPkg/Documents/Media/RedfishClientDriver= Stack.svg?raw=3Dtrue) ## EFI EDK2 Redfish Client Framework The functionality of each block in the diagrams are described in below sec= tions, @@ -89,7 +89,7 @@ Redfish service to platform configurations, or vice versa= to update platform configurations to Redfish service. Both EDK2 Redfish Non-Collection and Collection Feature drivers are script auto-generated base on Redfish schema naming. The EDK2 Redfish Non-Collection feature driver manages the resourc= e of -specific Resdifsh resource type, while the EDK2 Redfish Collection feature +specific Redfish resource type, while the EDK2 Redfish Collection feature driver manages the members which have the same resource type in collection resource (e.g the ComputerSystem resource and ComputerSystemCollection res= ource) . @@ -100,18 +100,30 @@ platform configuration format and storage from EDK2 R= edfish Feature driver. This protocol provides the interfaces to get and set platform configuratio= n with the format and configuration storage agnostic to the Redfish feature drive= r. The platform can provide its own EDKII Redfish Platform Config driver inst= ance -to access platform-specific configuration format and storage. On EDK2 open -source, EDKII Redfish Platform Config Protocol accesses the platform -configuration in EDK2 HII defined format. +to access platform-specific configuration format and storage. + +On EDK2 open source, EDKII Redfish Platform Config Protocol accesses the +platform configuration in EDK2 HII defined format. Below is driver stack d= iagram +which implements EDKII Redfish Platform Config Protocol. The protocol driv= er +leverages the HII interface to get or set the HII configuration on platfor= m. By +following the x-uefi-redfish Configure Language defined in UNI file, proto= col +driver can find corresponding HII question for given Redfish attribute. In= this +way, protocol driver creates the mapping between HII questions and Redfish +attributes. + +![platform config](https://github.com/nicklela/edk2-redfish-client/blob/up= date-readme/RedfishClientPkg/Documents/Media/redfish-platform-config-protoc= ol-stack.svg?raw=3Dtrue) Below is the prototype of **EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL**, ```C struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL { - EDKII_REDFISH_PLATFORM_CONFIG_GET_VALUE GetValue; - EDKII_REDFISH_PLATFORM_CONFIG_SET_VALUE SetValue; - EDKII_REDFISH_PLATFORM_CONFIG_GET_CONFIG_LANG GetConfigureLang; - EDKII_REDFISH_PLATFORM_CONFIG_GET_SUPPORTED_SCHEMA GetSupportedSchema; + UINT64 Revision; + EDKII_REDFISH_PLATFORM_CONFIG_GET_VALUE GetValue; + EDKII_REDFISH_PLATFORM_CONFIG_SET_VALUE SetValue; + EDKII_REDFISH_PLATFORM_CONFIG_GET_DEFAULT_VALUE GetDefaultValue; + EDKII_REDFISH_PLATFORM_CONFIG_GET_ATTRIBUTE GetAttribute; + EDKII_REDFISH_PLATFORM_CONFIG_GET_CONFIG_LANG GetConfigureLang; + EDKII_REDFISH_PLATFORM_CONFIG_GET_SUPPORTED_SCHEMA GetSupportedSchema; }; ``` @@ -181,11 +193,10 @@ x-uefi-redfish-Processor.v1_0_0 ``` #### x-uefi-redfish Configure Language format: - The string declared with x-uefi-redfish configure language is a path to = the property -in Redfish resource +in Redfish schema. - The root of path is the Redfish resource type indicated in x-uefi-redfis= h configure language -- The path is relative to root of Redfish resource type, not related to Re= dfish service -- root. +- The path is relative to root of [Redfish schema](https://redfish.dmtf.or= g/redfish/schema_index) defined by DMTF, not related to Redfish service roo= t. #### Examples, ```C @@ -215,7 +226,136 @@ EDK2 Build is responsible to pull the necessary EDK2 = Redfish JSON Schema to C Structure Convertors and EDK2 Redfish Feature drivers into edk2 build proc= ess according to the x-uefi-Redfish config language used in the HII VFR forms. +## EDK2 Redfish client feature driver +![foundation driver stack](https://github.com/nicklela/edk2-redfish-client= /blob/update-readme/RedfishClientPkg/Documents/Media/redfish-foundation-dri= ver-stack.svg?raw=3Dtrue) + +Above diagram shows the way how Redfish application (Redfish feature drive= r) works with Redfish foundation +drivers and communicate with Redfish service. Redfish feature driver relie= s on Redfish Config driver to +provide the information of desired Rest Ex instance. To achieve this, Redf= ish feature driver has to provide +EDKII Redfish Config Handler Protocol and Redfish Config driver will use t= his protocol to deliver Redfish +service information. + +```C +struct _EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL { + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_INIT Init; + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_STOP Stop; +}; +``` + +![feature driver call flow](https://github.com/nicklela/edk2-redfish-clien= t/blob/update-readme/RedfishClientPkg/Documents/Media/redfish-feature-drive= r-call-flow.svg?raw=3Dtrue) + +Above diagram shows the details of how Redfish feature core driver invokes= Redfish feature drivers. To be called +by Redfish feature core driver, Redfish feature driver has to register the= managed URI to Redfish feature core +driver. Then Redfish feature core driver learns the dependency of each dif= ferent feature drivers. + +#### Dispatch Redfish feature drivers +When given event is signaled, Redfish feature core driver starts the opera= tion of invoking Redfish feature drivers +by following the order from parent node to child node in the Redfish URI h= ierarchy. In the diagram, the feature +driver which manages service root will be invoked first. And feature drive= r which manages computer system collection +will be invoked at second position. Once Redfish feature core driver walks= through entire Redfish URI, the operation +is stopped. + +### Interface between collection feature driver and non-collection feature= driver +Redfish collection resource is a set of Redfish non-collection resource. R= edfish collection feature driver works +with non-collection feature driver to manage them. For example, boot optio= n collection feature driver work with +boot option feature driver to manage boot options in Redfish service. Comp= uter system collection feature driver +work with computer system feature driver to manage computer system resourc= e. + +The interface between collection feature driver and non-collection feature= driver is EDKII Redfish resource config +protocol. + +```C +struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL { + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING Provisioning; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME Consume; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE Update; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK Check; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_IDENTIFY Identify; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO GetInfo; +}; +``` + +### Feature driver event +Two events are defined for feature driver to perform necessary operation a= t given time. +- Ready-to-Provisioning event + - Feature driver which requires to do operation before Redfish feature d= river starts the synchronization can listen to + this event. For example, boot option feature driver may want to refres= h boot order variable and get latest boot order + information before provisioning the boot options to boot options resou= rce. +- After-Provisioning event + - Feature driver which wants to do operation after Redfish feature drive= r finish the synchronization job can listen to + this event. + +### Reboot required +When Redfish feature drivers apply user request to platform, a system rebo= ot is usually required. PCD `gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishS= ystemRebootRequired` is introduced for this purpose. After Redfish feature +core driver is done with synchronization job, Redfish feature core driver = checks this PCD and perform system reboot when +PCD is set to `TRUE`. + +### Synchronization design between Redfish service and BIOS +The purpose of Redfish feature driver is to do the synchronization job bet= ween Redfish service and BIOS. The operation of synchronization can be simp= ly divided into two types: + +#### Provisioning resource +Below is the flow diagram of provisioning platform configuration to Redfis= h service at Bios resource. With the x-uefi-redfish +configure language described in above section, Redfish feature driver coll= ect all BIOS attributes from HII database and populated +them to Redfish service. +![provisioning](https://github.com/nicklela/edk2-redfish-client/blob/updat= e-readme/RedfishClientPkg/Documents/Media/redfish-call-flow-provisioning.sv= g?raw=3Dtrue) + +#### Consume resource +Below is the flow diagram of consuming user request from Redfish service t= o platform configuration. Redfish feature driver finds +corresponding HII question and apply user desired value to platform. +![pending settings](https://github.com/nicklela/edk2-redfish-client/blob/u= pdate-readme/RedfishClientPkg/Documents/Media/redfish-call-flow-pending-set= tings.svg?raw=3Dtrue) + +Below diagram shows the call flow of EDKII Resource Config Protocol and ho= w to use this protocol to handle synchronization +job. +![synchronization](https://github.com/nicklela/edk2-redfish-client/blob/up= date-readme/RedfishClientPkg/Documents/Media/redfish-synchronization-design= .svg?raw=3Dtrue) + +Several interfaces defined in EDKII Redfish Resource Config Protocol work = together to support Redfish synchronization: +- Identify() + - This function is used to check if the given Redfish resource is the on= e the feature driver wants to manage. A platform + library `RedfishReesourceIdentifyLib` is introduced for platform to im= plement its own policy to identify Redfish resource. +- Check() + - This function is used to check the attribute status on Redfish service= . If all attributes the feature driver manages + are presented in Redfish service, feature driver must provision them a= lready. Otherwise, Provisioning() will be called + to perform resource provisioning job. +- Provisioning() + - When this function is called, feature driver will provision all attrib= utes that it managed to Redfish service. This + operation usually create new resource at Redfish service and require d= ifferent operation that specified by Redfish service. +- Consume() + - When there is pending settings in Redfish service, this function is ca= lled for feature driver to consume pending settings + requested by user. +- Update() + - When platform configuration is updated, this function is called to upd= ate configuration changes to Redfish service and + Redfish service can show the latest settings on platform. + +The EDKII Redfish Resource Addendum Protocol is introduced to provide plat= form addendum data that Redfish service requires. +This protocol will be called at Provisioning() and Update() functions so p= latform can add OEM attribute or any other attribute +specified by Redfish service. + +```C +struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL { + UINT64 Revision; ///< Protocol revis= ion + EDKII_REDFISH_RESOURCE_ADDENDUM_OEM GetOemData; ///< Get OEM data + EDKII_REDFISH_RESOURCE_ADDENDUM_DATA GetData; ///< Get addendum d= ata +}; +``` + +#### Redfish service implementation +The idea of Redfish synchronization design is to manage Redfish resource d= irectly by platform firmware. To do this, Redfish +synchronization functions have to work with Redfish service implementation= in BMC firmware. This is because the interface +between platform firmware and BMC firmware is not defined in any specifica= tion. +Several prerequisites must be satisfied: +- Platform firmware has permission to manage Redfish resource. BMC has abi= lity to tell the difference between platform request + and out-of-band user. This can normally be done by identifying the boots= trap account in HTTP request. The bootstrap account is + described in Host Interface specification 1.3.0 section 9. +- The ability to tell if there is an user who changes to Redfish resource = or not. Redfish feature drivers can only be executed at + POST time. So the modification to BIOS managed resource is an asynchrono= us operation. Thus, we need below supports in Redfish service: + - ETAG support in HTTP header. + - Setting resource support (defined in Redfish specification 1.18 sectio= n 9.10). + - Redfish Task support to POST and DELETE operation made by user in Redf= ish collection resource and Redfish actions. + +### Redfish Task design +TBD. + ## The Contributors -Chang, Abner \ -Wang, Nickle \ +Chang, Abner \ +Wang, Nickle \ Chen, Aaron -- 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 (#109280): https://edk2.groups.io/g/devel/message/109280 Mute This Topic: https://groups.io/mt/101732254/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-