From patchwork Fri Sep 15 07:34:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshay Adiga X-Patchwork-Id: 814114 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xtnK83hDHz9sPs for ; Fri, 15 Sep 2017 17:36:44 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xtnK82pbgzDsMP for ; Fri, 15 Sep 2017 17:36:44 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=akshay.adiga@linux.vnet.ibm.com; receiver=) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xtnHh2KY4zDrbR for ; Fri, 15 Sep 2017 17:35:28 +1000 (AEST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8F7XqQw111654 for ; Fri, 15 Sep 2017 03:35:26 -0400 Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144]) by mx0a-001b2d01.pphosted.com with ESMTP id 2d08u8m35s-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 15 Sep 2017 03:35:25 -0400 Received: from localhost by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 15 Sep 2017 17:35:22 +1000 Received: from d23relay08.au.ibm.com (202.81.31.227) by e23smtp02.au.ibm.com (202.81.31.208) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 15 Sep 2017 17:35:19 +1000 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 v8F7ZJZa34930744 for ; Fri, 15 Sep 2017 17:35:19 +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 v8F7ZBgM027861 for ; Fri, 15 Sep 2017 17:35:11 +1000 Received: from aksadiga.ibm ([9.79.223.131]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v8F7YZ5L026751; Fri, 15 Sep 2017 17:35:08 +1000 From: Akshay Adiga To: skiboot@lists.ozlabs.org Date: Fri, 15 Sep 2017 13:04:36 +0530 X-Mailer: git-send-email 2.5.5 In-Reply-To: <1505460876-7303-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> References: <1505460876-7303-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> X-TM-AS-MML: disable x-cbid: 17091507-0004-0000-0000-0000022F1766 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17091507-0005-0000-0000-00005E182CF5 Message-Id: <1505460876-7303-9-git-send-email-akshay.adiga@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-15_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709150113 Subject: [Skiboot] [PATCH v4 8/8] Add Documenation for opal_slw_set_reg X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ego@linux.vnet.ibm.com, shriyak@linux.vnet.ibm.com MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Akshay Adiga Reviewed-by: Vaidyanathan Srinivasan --- doc/opal-api/opal-slw-set-reg-100.rst | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 doc/opal-api/opal-slw-set-reg-100.rst diff --git a/doc/opal-api/opal-slw-set-reg-100.rst b/doc/opal-api/opal-slw-set-reg-100.rst new file mode 100644 index 0000000..64ecdee --- /dev/null +++ b/doc/opal-api/opal-slw-set-reg-100.rst @@ -0,0 +1,46 @@ +OPAL_SLW_SET_REG +============================== +:: + + int64_t opal_slw_set_reg(uint64_t cpu_pir, uint64_t sprn, uint64_t val) + + +OPAL_SLW_SET_REG is used to inform low-level firmware to restore a +given value of SPR when there is a state loss. The actual set of SPR +that is supported is platform dependent. + + +In Power 8, it uses p8_pore_gen_cpufreq_fixed(), api provided by pore engine, +to inform the spr with their corresponding values with which they +must be restored. + + +In Power 9, it uses p9_stop_save_cpureg(), api provided by self restore code, +to inform the spr with their corresponding values with which they +must be restored. + + +Parameters +---------- + +``uint64_t cpu_pir`` +This parameter specifies the pir of the cpu for which the call is being made. + +``uint64_t sprn`` +This parameter specifies the spr number as mentioned in p9_stop_api.H for +Power9 and p8_pore_table_gen_api.H for Power8. + +``uint64_t val`` +This parameter specifices value with which the spr should be restored. + +Returns +------- + +``OPAL_INTERNAL_ERROR`` +On failure. The actual error code from the platform specific code is logged in the OPAL logs + +``OPAL_UNSUPPORTED`` +In power8 only, if spr restore is not supported by pore engine. + +``OPAL_SUCCESS`` +On success