From patchwork Tue Sep 18 05:36:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 970944 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42DsDl1q28z9sCP for ; Tue, 18 Sep 2018 15:36:39 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42DsDl0TBnzF0RK for ; Tue, 18 Sep 2018 15:36:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 42DsDg5k2NzDrTP for ; Tue, 18 Sep 2018 15:36:35 +1000 (AEST) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8I5YfaC054325 for ; Tue, 18 Sep 2018 01:36:33 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mjsqy33nm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Sep 2018 01:36:32 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Sep 2018 23:36:32 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 17 Sep 2018 23:36:31 -0600 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8I5aUrx49676334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 17 Sep 2018 22:36:30 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D1F56A047 for ; Mon, 17 Sep 2018 23:36:30 -0600 (MDT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 05CB46A051 for ; Mon, 17 Sep 2018 23:36:29 -0600 (MDT) Received: from birb.localdomain (unknown [9.185.142.107]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP for ; Mon, 17 Sep 2018 23:36:29 -0600 (MDT) Received: by birb.localdomain (Postfix, from userid 1000) id 7C81C4EC629; Tue, 18 Sep 2018 15:36:26 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 18 Sep 2018 15:36:25 +1000 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 18091805-0012-0000-0000-000016B5AF9E X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009727; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01089955; UDB=6.00563044; IPR=6.00869976; MB=3.00023362; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-18 05:36:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091805-0013-0000-0000-00005470CDF1 Message-Id: <20180918053625.8594-1-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-09-18_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809180057 Subject: [Skiboot] [PATCH] Add fast-reboot property to /ibm,opal DT node X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" this means that if it's permanently disabled on boot, the test suite can pick that up and not try a fast reboot test. Signed-off-by: Stewart Smith --- core/init.c | 2 ++ doc/device-tree/ibm,opal.rst | 10 ++++++++++ include/skiboot.h | 1 + 3 files changed, 13 insertions(+) diff --git a/core/init.c b/core/init.c index 9095981e67e0..8d092dd6e7fd 100644 --- a/core/init.c +++ b/core/init.c @@ -546,6 +546,8 @@ void __noreturn load_and_boot_kernel(bool is_reboot) op_display(OP_LOG, OP_MOD_INIT, 0x000B); + add_fast_reboot_dt_entries(); + /* Create the device tree blob to boot OS. */ fdt = create_dtb(dt_root, false); if (!fdt) { diff --git a/doc/device-tree/ibm,opal.rst b/doc/device-tree/ibm,opal.rst index 2fa446ddef04..25f905d46e38 100644 --- a/doc/device-tree/ibm,opal.rst +++ b/doc/device-tree/ibm,opal.rst @@ -71,3 +71,13 @@ supported POWER8 systems. On the earliest POWER8 OPAL systems, there was `ibm,heartbeat-freq` instead. However, no OS at the time ever looked at that value, so it can be ignored by any new operating systems. + +fast-reboot property +^^^^^^^^^^^^^^^^^^^^ + +This property of the `ibm,opal` node is an option property that will either be +the string `okay` or the reason the fast reboot feature was disabled on boot. + +The motivation behind adding this property is to help the OPAL test suite work +out if it should even try the fast reboot test on a particular platform +(without it having to resort to grepping firmware logs). diff --git a/include/skiboot.h b/include/skiboot.h index f2818b1a2326..b39591177137 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -182,6 +182,7 @@ extern int64_t opal_signal_system_reset(int cpu_nr); /* Fast reboot support */ extern void disable_fast_reboot(const char *reason); +extern void add_fast_reboot_dt_entries(void); extern void fast_reboot(void); extern void __noreturn __secondary_cpu_entry(void); extern void __noreturn load_and_boot_kernel(bool is_reboot);