From nobody Sun May 19 03:02:54 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+108542+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 1694531402921410.11667696430015; Tue, 12 Sep 2023 08:10:02 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=/hWmtLe5FZf//1AgASZ4XleEMcu5Y7Ph8AGutkWh2ZI=; 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=1694531402; v=1; b=B2GcJWtPeKMTGUjrImxBoa+SGduqYp1uMiYKteGSlu7JWfI2ENchCrBVhWGLqQcyG3ow8PtL DnfrHUR+hv9xhzzU58X/Cz1G5ROpVz4cLm/T/MkPHrglB5nkl6crZbUE7whFDjChtyKBdIVe3v9 vItWs5AmhgdvLJx/1QScCu3c= X-Received: by 127.0.0.2 with SMTP id A5P1YY1788612xXnARfcnpge; Tue, 12 Sep 2023 08:10:02 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.82]) by mx.groups.io with SMTP id smtpd.web10.27623.1694531401476450694 for ; Tue, 12 Sep 2023 08:10:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m1kj2y9XLpbiMUiKBp7TsWznj4k5FOqtnCWxlC4K8gwuanyGac7baRS589cBfVNY4+0v30TnYk0SGE5MJPoH5Zae0m0rbBUsCN8B/UcslGStuopqm8F5NS4sJUWEZ3CepvVMNwW5YkL82c7taRxITsmYbnPKhviD0SMeKB5k1PNkz5q24/84eSmRyfL1QlGVKXSDklOsW3sWj7XhraSxiOQ9AjrD6bARvsGf05ponfmRqUW7XJ7EDfJmAnRJml/ml57rS3wZH1aX+h9tUahTbJciKprhykGV01utP6txlgQ7Uxza7JOeD5TzYOfyLFJCId7ftSrAl6ODWOVP/RrTEQ== 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=LYBrQD1QdzsC6+y9aeLUnXt91G7T9nNsQPAqWXq05fU=; b=O3YkSgH8sh5MJlvo599nCPUOhbRP/S0oddHWnWEZCZeSQy+xFUniXiwsMqSzNjtNzzOU2UXp8Exu9y0xjmzDqlbkEbCtTJ8lu1UwpgAGEBEgjSQO/7owcn/5tz9c3hJxr0CCYQ16VZTsJmdBvO2fFPo4+WmChLUrW8z7j6Om2tiiePReUTtpv2aAhogRcNsBuf8X0PFzIqnIZMAFQUcbtJ+wB9CqmVwt0ihiaVRwlBAWcDefrp9e0ZmaxX8cWmlBC5p8SJkttErNtWDddbbeT9MgvHLoz/nGtvWlERuCj9VMDRtyeKtSKvECXJVT8bHn749+HIVm6IBuF+aj/nTNxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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 MW4PR04CA0236.namprd04.prod.outlook.com (2603:10b6:303:87::31) by SA3PR12MB9177.namprd12.prod.outlook.com (2603:10b6:806:39d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.33; Tue, 12 Sep 2023 15:09:56 +0000 X-Received: from CO1PEPF000044F9.namprd21.prod.outlook.com (2603:10b6:303:87:cafe::b) by MW4PR04CA0236.outlook.office365.com (2603:10b6:303:87::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.35 via Frontend Transport; Tue, 12 Sep 2023 15:09:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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+108542+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.232) by CO1PEPF000044F9.mail.protection.outlook.com (10.167.241.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.1 via Frontend Transport; Tue, 12 Sep 2023 15:09:55 +0000 X-Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 12 Sep 2023 08:09:48 -0700 X-Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Tue, 12 Sep 2023 08:09:48 -0700 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Tue, 12 Sep 2023 08:09:47 -0700 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy Subject: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg: update Readme.md Date: Tue, 12 Sep 2023 23:09:46 +0800 Message-ID: <20230912150946.32315-1-nicklew@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F9:EE_|SA3PR12MB9177:EE_ X-MS-Office365-Filtering-Correlation-Id: 5fd1a655-7770-4849-2d3c-08dbb3a252eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: Dv84gP6/LEVJJ9xWSDtw/CH1XOYeKD9oZ2Bltr1KZY+misVickU2SMatrklttduIQmmrfQ14XkvOITiXhZQBXTHWRooDoHUJdhcruoV438UIzrJiFbpSUOEkTa4uyF1w/im1Iep23bvXYTU0dlsjCpCbdimcY42Y5axkmy+3YTdYSKetJxgjcre0kSVSbZJRMTuapck9c7Tl/dtlZisS0KJdaMsDqS0gDGuDj17tjscu5sQjL3r+krtEAmh/qheqZEAAve1W4aTjaFt5fCvLMp/BWZ1Aen48MJG9h30hF/31iAf14yVIQA306HFufaxXwFi2FiNWewAkcxtUtdRsCvLiAJ2K8lhwfsnIB0vKXYhHe2zHkne6FJJ/Ed/ysAkT8zLnGKou31+IVyCxaEsWB4nVnBsbNJOHoOqeNn54M75kWcXLVvtJxEA5QnJ2ltePBOtTt2SjIZY1LtoPBVO3QyWyBgYFe96yDvSOnokCreGEAOc0ZZSwU7gEwukCQ1gyZM7yfmKqejiaRlps10pXEhT01Y08Z6ZnZOg8ym7Nh9YaC1FyiA0Zt3pUYZ7JT+kFHHeKpCSYFyry/0W7qmbmTWKCH5F9fhLaI6dV13V/btRlhrtoDl6eEE4s+oCkh6PYsHNpt8MDLenOJIoMqi8vRpC6kxfkI2xP3XEkN5w+uHbbUIp/45ThJrd4qTGrW9XBgktxyJlJo+/IKw4eMMmXbBFltq9kIp+uuDRelaBvBv79fgyvPpATR0GHr3jBEgQ41oLnQ2lXK+9OOjniIBvgiUEvhvu5ue3GBxViQOlIHn2YoKty1P81fqm8/9WmeD+149WHEwOjzSwvKGctDoWjkg== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2023 15:09:55.9337 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fd1a655-7770-4849-2d3c-08dbb3a252eb 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.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044F9.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9177 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: 2Q6tgOq1SpJtlcZqA3f7pAtix1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1694531419297100001 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 --- .../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 | 169 ++++++++++++++++-- 7 files changed, 640 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..155a5ab3 --- /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=9CGUT=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..69dc33d3 100644 --- a/RedfishClientPkg/Readme.md +++ b/RedfishClientPkg/Readme.md @@ -31,13 +31,13 @@ Redfish property with HII option. =20 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. =20 Below are the block diagrams of UEFI Redfish Client EDK2 Implementation. =20 ## 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) =20 ## 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) =20 Below is the prototype of **EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL**, =20 ```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; }; ``` =20 @@ -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. =20 #### Examples, ```C @@ -215,7 +226,135 @@ 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. =20 +## 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 left to right in Redfish URI list. In the diag= ram, the feature driver which manages +service root will be invoked first. And feature driver which manages compu= ter 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 and see if given Redfish resource is th= e one 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 that feature driver managed + 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 Redfish service specified. +- 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 +that Redfish service specified. + +```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 user changes to Redfish resource or not.= Redfish feature drivers can only be executed at POST + time. So the modification to BIOS managed resource is asynchronous opera= tion. 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 --=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 (#108542): https://edk2.groups.io/g/devel/message/108542 Mute This Topic: https://groups.io/mt/101316997/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-