From patchwork Mon Apr 6 06:57:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 458322 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E9F8A140216 for ; Mon, 6 Apr 2015 16:58:08 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id D02AF1A084B for ; Mon, 6 Apr 2015 16:58:08 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FAF41A030F for ; Mon, 6 Apr 2015 16:58:06 +1000 (AEST) Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 Apr 2015 16:58:05 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp02.au.ibm.com (202.81.31.208) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 6 Apr 2015 16:58:03 +1000 Received: from d23relay08.au.ibm.com (d23relay08.au.ibm.com [9.185.71.33]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 637702CE804E for ; Mon, 6 Apr 2015 16:58:03 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t366vtBd45940980 for ; Mon, 6 Apr 2015 16:58:03 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t366vTQD015412 for ; Mon, 6 Apr 2015 16:57:29 +1000 Received: from localhost.localdomain ([9.124.35.90]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t366vTgr015178 for ; Mon, 6 Apr 2015 16:57:29 +1000 From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Mon, 06 Apr 2015 12:27:13 +0530 Message-ID: <20150406065712.10451.28139.stgit@localhost.localdomain> In-Reply-To: <20150406065647.10451.57422.stgit@localhost.localdomain> References: <20150406065647.10451.57422.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15040606-0005-0000-0000-000001937449 Subject: [Skiboot] [PATCH 2/2] FSP/CUPD: Code Update OPAL API documentation X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Add documentation for FSP based machine code update API. Signed-off-by: Vasant Hegde --- doc/opal-api/opal-code-update-76-77-78.txt | 78 ++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 doc/opal-api/opal-code-update-76-77-78.txt diff --git a/doc/opal-api/opal-code-update-76-77-78.txt b/doc/opal-api/opal-code-update-76-77-78.txt new file mode 100644 index 0000000..e7657d1 --- /dev/null +++ b/doc/opal-api/opal-code-update-76-77-78.txt @@ -0,0 +1,78 @@ +Code Update on FSP based machine +================================ + +There are three OPAL calls for code update on FSP based machine: + + #define OPAL_FLASH_VALIDATE 76 + #define OPAL_FLASH_MANAGE 77 + #define OPAL_FLASH_UPDATE 78 + +OPAL_FLASH_VALIDATE +------------------- + Validate new image is valid for this platform or not. We do below + validation in OPAL: + - We do below sys parameters validation to confirm inband + update is allowed. + - Platform is managed by HMC or not?. + - Code update policy (inband code update allowed?). + + - We parse candidate image header (first 4k bytes) to perform + below validations. + - Image magic number. + - Image version to confirm image is valid for this platform. + + Input: + buffer : First 4k bytes of new image + size : Input buffer size + + Output: + buffer : Output result (current and new image version details) + size : Output buffer size + result : Token to identify what will happen if update is attempted + See hw/fsp/fsp-codeupdate.h for token values. + + Return value: + Validation status + + +OPAL_FLASH_MANAGE +----------------- + Commit/Reject image. + - We can commit new image (T -> P), if system is running with T side image. + - We can reject T side image, if system is running with P side image. + + Note: + If a platform is running from a T side image when an update is to be + applied, then the platform may automatically commit the current T side + image to the P side to allow the new image to be updated to the + temporary image area. + + Input + op : Operation (1 : Commit /0 : Reject) + + Return value: + Commit operation status (0 : Success) + +OPAL_FLASH_UPDATE +------------------ + Update new image. It only sets the flag, actual update happens + during system reboot/shutdown. + + Host splits FW image to scatter/gather list and sends it to OPAL. + OPAL parse the image to get indivisual LID and passes it to FSP + via MBOX command. + + FW update flow : + - if (running side == T) + Swap P & T side + - Start code update + - Delete T side LIDs + - Write LIDs + - Code update complete + - Deep IPL + + Input + list : Real address of image scatter/gather list of the FW image + + Return value: + Update operation status (0: update requested)