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 B93ACAC0A11 for ; Wed, 31 Jan 2024 04:45:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=syNpb+AswSDkmtlYhCFFNawumatxw3m/zv1xtnypTpk=; 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=1706676337; v=1; b=dtGsv3hFn47XXnXHf43wtvxr/SsASv92r65+8T341jY2PL5b8aOAeWjj3PIUeUIQPzzqWUZb qi+VBD7L2EPwN1Tk51DUwdJhENjxVicvSVBqoNHtGGr+3mpgfgNBcFNn6i+hxdWG04knrYP2QPp y2QpVaoYtc1ct4dgfxyuRJC0= X-Received: by 127.0.0.2 with SMTP id k0lKYY7687511xDc2UfEX1Is; Tue, 30 Jan 2024 20:45:37 -0800 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.71]) by mx.groups.io with SMTP id smtpd.web10.7616.1706676336588474110 for ; Tue, 30 Jan 2024 20:45:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d3PjtfGGHzWbfqheqLb7ZPPajkkHyAHVTa1MoTty1w+zU8RyVNF25fFx5rueakh3LM/WDweJWKXtF8qWk5Opm4xbeyZoMUhdKQz3plNNc3pJCyAvQTSjcMbrNIZeckBDyHvtYO8Xvevphdb8POfQ9Mc40hACyYdPX9CLbRNM9GFtZlo4yjHo0vsHY0io6nAcfTaSBPDopKqkaLK2GYQ3sjqELnU0lWSbnTJX26D3T1qkWezaNieL1VQTJFbgOhndzyM7M+wqJAqvE8ssvSP4damEUAhUci5jySv9O/80B/MC8judj6QGmLWtX7XnSIug7h++GI+g1EuMOpQZaZ3xRA== 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=SGlP1gfR0dXlrTOts4YqdkW0Wf6gZbEIsXNLh1WXcl4=; b=WdVy+dweRCRpeB70E0mtSGsil9PQhy0kgqKAHTdj3gbMPRj9okQP0hZQ1lXEZlZf/GJ7CIshI31h36D1ePuS4zl2cbzI8ORuEgj5zAzRR7jJR4gQQePVo+SfGNC7u1hxqvxONvCIUZ8uAN4isIybRfGgmEojHHYVE8XhkUjRScZO1oTvPHbjRAwQZPc5bGI3SUBsU/IeMxNtWNBPX0twGb4/cLY7PkPBDku+VaKtjAJmsIvnzgJCy4pSRw2hbxVSteHAXWDCFGPvKWN4QIgyXPKuGobN6uUQfVCp/+1YOuDsF0a9OKLd5ZCO6CDVyYLdCIipj1D2GBoBbzYR740YGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) X-Received: from BN9PR03CA0704.namprd03.prod.outlook.com (2603:10b6:408:ef::19) by IA1PR12MB6163.namprd12.prod.outlook.com (2603:10b6:208:3e9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.22; Wed, 31 Jan 2024 04:45:33 +0000 X-Received: from BN1PEPF0000468E.namprd05.prod.outlook.com (2603:10b6:408:ef:cafe::30) by BN9PR03CA0704.outlook.office365.com (2603:10b6:408:ef::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.22 via Frontend Transport; Wed, 31 Jan 2024 04:45:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by BN1PEPF0000468E.mail.protection.outlook.com (10.167.243.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Wed, 31 Jan 2024 04:45:32 +0000 X-Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 30 Jan 2024 22:45:30 -0600 From: "Chang, Abner via groups.io" To: CC: Nickle Wang , Igor Kulchytskyy Subject: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg: Readme.md update Date: Wed, 31 Jan 2024 12:45:19 +0800 Message-ID: <20240131044519.1835-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF0000468E:EE_|IA1PR12MB6163:EE_ X-MS-Office365-Filtering-Correlation-Id: 0316bc68-e68e-4f09-9944-08dc22177573 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: b/obKL0rBk+ILixcj7q0hAXqeZTIGnqzifUJmjzryyNy0Auy+cLXUr91rTmYbzPSoKOwVMK0ccl+x++tBGJO5lMlwnu/ld68D9CCYI2BJgtEz7jnWo2q/XfX0ilmeiLu+eIwhhXcvrG06/IUpblwVXn2pkKj6utRz/JM2O1F1mPMSI0ljPjHKlZlCzNGndoHGF+n1wXFQ7tW1P35PP6N3aXubc+phRoctSuzdpOf0H6oMUPdXb0DVnEAOk7RrvnbkHyoqtqN7FKH6PWAJIhYRn6jVz6hFHH3ZHhYeBCcX1fjZrSUxEKL1ky93ylqCGzsUtPsTMfqCyOcWLIfaQ6ZepcIpcYuTNQedO4zi4chwDl365yXdNRTz1U7SJ6lh3d6mQXSBY1Ai4uPF9/viV/k6AD3lRWiDszSgR49v9w6gb9iZW5/wiRrKOt/U9hFgk2EN4jN5iAC1C+9cG0oCsL3J901vt9m6/RANhPUL1ndViYe7owsI4nh1+rQ8xflA5jZQbVbcbDkpYlduaXgQOCOGY1mSIawTnkeA0x+a2vaPjqKMXy+ufSU66JFBucgkklAhjv8KvjBeVZ3/mtlr/7ZFoneHpe28WBlaxEZ3YxH9DXkxfqcAd0D2iwSazpsT0bE+nRp9IYkwPEbrsQ0MEJiPOtftTW0B+0DwubyY0Cb48710j4NJpurF1QOSrdwIbjDyrSGutKAw1Z8BvUeal8oamCwcHL91tdH1NbOA1jDR/HmjZfIVsJ1aD0343U7z0gv3OKLCbyfE4RtiS/2ZkcLLw== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2024 04:45:32.9401 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0316bc68-e68e-4f09-9944-08dc22177573 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF0000468E.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6163 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: cC4M6H7h4BXLVw3AXjjQyhljx7686176AA= 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=dtGsv3hF; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); 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 From: Abner Chang Update Readme file to align with Redfish Client implementation. Signed-off-by: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy --- RedfishClientPkg/Readme.md | 108 ++++++++++++++++++++++++++++++++----- 1 file changed, 94 insertions(+), 14 deletions(-) diff --git a/RedfishClientPkg/Readme.md b/RedfishClientPkg/Readme.md index edef2ec23b..5e4a0efa18 100644 --- a/RedfishClientPkg/Readme.md +++ b/RedfishClientPkg/Readme.md @@ -294,7 +294,7 @@ PCD is set to `TRUE`. 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: =20 #### Provisioning resource -Below is the flow diagram of provisioning platform configuration to Redfis= h service at Bios resource. With the x-uefi-redfish +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/tianocore/edk2-redfish-client/blob/main= /RedfishClientPkg/Documents/Media/redfish-call-flow-provisioning.svg?raw=3D= true) @@ -338,19 +338,99 @@ struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL { }; ``` =20 -#### 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 Service Implementation that Incorporates with EDK2 Redfish +The idea of Redfish synchronization design is to manage Redfish resource d= irectly by platform host +firmware. To do this, Redfish synchronization functions have to work with = Redfish service implementation +in BMC firmware. This is because the mechanism between platform host firmw= are and BMC firmware is not +defined in any specification. Several prerequisites must be satisfied and = listed below: + +**BIOS Redfish Credential** + +- Platform host firmware has the permission to manage Redfish resource. BM= C has ability to distinguish +the in-band platform host firmware and out-of-band user, this can normally= be done by identifying the bootstrap account in HTTP request. The bootstra= p account is described in Host Interface specification 1.3.0 section 9. If = the Redfish client uses bootstrap account for HTTP actions, BMC must consid= er the Redfish +client is BIOS and give the write permission to BIOS for updating BIOS man= aged Redfish properties even the +properties are declared as "ReadOnly" in the Redfish schema. + +**BIOS Managed Redfish Resource Provisioning** +- The Default Empty BIOS Managed Redfish Resource
+ The BIOS managed Redfish properties may not covering the entire resource= but just manages some properties + in the resource or a subset of resource. For example, the "Boot" propert= y in ComputerSystem. BIOS is not able to use HTTP PUT to replace a resource= that is not entirely managed by BIOS. The HTTP PATCH is the only method to= provision the BIOS managed properties. This is a requirement the BIOS mana= ged properties + in the resource must have either a default value or an empty property, w= ith this BIOS can have a HTTP + PATCH to update the value.

+ For the example in ComputerSystem resource below,
+ The "BootOrder" property is exist in ComputerSystem, however the values = is left as empty. With the + existence of "BootOrder", BIOS can provision the valid values using HTTP= PATCH with out error. + +```C +{ + "Boot": { + "AutomaticRetryAttempts": 3, + "BootOrder": [] + } +} +``` + +**BIOS Managed Redfish Resource Consumption** + +The ability to tell if there are the changes on BIOS managed Redfish resou= rce. The modifications to BIOS managed resource is considered as an asynchr= onous operation because the Redfish feature drivers can only be +executed at the platform host firmware POST time. With the above constrain= t, we need the below requirements +on BMC Redfish service. + - ETAG Support in HTTP Header
+ To reduce the unnecessary HTTP GET for the unchanged Redfish resource th= at leads to increase the platform + boot time, ETAG is leveraged to tell BIOS if BIOS has to get the entire = resource as there were some + changes made on the resource. Although ETAG support in HTTP response hea= der is not mandatory by edk2 + Redfish design, it is still a strong recommendation if the platform boot= time is a concern.
+ Below PCD is used to configure the BMC Redfish service supports ETAG. + +```C + gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishServiceEtagSupported +``` + + - HTTP Query Head Support
+ In order to retrieve the HTTP response headers only to reduce the unnece= ssary HTTP GET for the entire + Redfish resource. HTTP Query Head support on Redfish service is mandator= y if the system boot time is a + concern. + + - Redfish Setting Annotation Support (defined in Redfish specification 1= .18 section 9.10).
+ @Redfish.Settings annotation represents the future state of resource. Th= e future state of BIOS managed + properties will be consume in the next time platform boot, no matter it = is a reset cycle or power cycle.
+ This is a requirement for BMC Redfish service having @Redfish.Settings f= or the changed properties made by + remote user. With the @Redfish.Settings annotation in the resource, BIOS= can identify which Redfish + properties were changed. BIOS can then only consume these changes and a= pply those to BIOS platform + configurations. Without providing @Redfish.Settings for the changes, BIO= S can just consume all of the + BIOS managed properties on Redfish service even the properties weren't c= hanged. + + - ETAG Support in Redfish Setting Annotation
+ ETAG in @Redfish.Settings resource is also required. As @Redfish.Setting= s annotation may not be deleted by + BMC after it has been consumed, the out of date @Redfish.Settings may st= ill leave in the Redfish + resource. With ETAG is provided in @Redfish.Settings, BIOS is able to te= ll if @Redfish.Settings is fresh + or stale.

+ Below is the example of @Redfish.Settings for BIOS attribute change, + +```C + "@Redfish.Settings": { + "@odata.type": "#Settings.v1_3_3.Settings", + "SettingsObject": { + "@odata.id": "/redfish/v1/Systems/1/Bios", + "@odata.etag": "W/\"ABCDEFG\"", + "Attributes": { + "BootMode": "Uefi" + } + } + } +``` + +**Redfish HTTP Content Encoding**
+For the performance consideration when BIOS HTTP POST, PUT and PATCH the r= esource, HTTP Content-Encoding +header is leverage to compress the resource to reduce the payload size wit= h BMC Redfish support. Below PCD string is introduced for platform develope= r to set the encoding method supported by BMC Redfish, currently +only "None" and "gzip" are supported. + +```C + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishServiceContentEncoding|["None"]["= gzip"] +``` +=20 +**BIOS Redfish Action** + - Redfish Task support to POST and DELETE operation made by user in Redfi= sh collection resource and Redfish actions. =20 ### Redfish Task design TBD. --=20 2.37.1.windows.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 (#114855): https://edk2.groups.io/g/devel/message/114855 Mute This Topic: https://groups.io/mt/104069729/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-