From patchwork Fri May 31 06:12:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1108077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45FZ9c2bLPz9s00 for ; Fri, 31 May 2019 16:22:12 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45FZ9c1Cm5zDqZn for ; Fri, 31 May 2019 16:22:12 +1000 (AEST) 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 45FZ0K2tSXzDqYC for ; Fri, 31 May 2019 16:14:09 +1000 (AEST) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4V641PC037612 for ; Fri, 31 May 2019 02:14:04 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 2stx4v1d3g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 31 May 2019 02:14:04 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x4V2dbKh005901 for ; Fri, 31 May 2019 02:48:55 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma01dal.us.ibm.com with ESMTP id 2spwb9ayka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 31 May 2019 02:48:55 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4V6E2g637224808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 31 May 2019 06:14:02 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 340F8B2067 for ; Fri, 31 May 2019 06:14:02 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E4F42B205F for ; Fri, 31 May 2019 06:14:01 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.91]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP for ; Fri, 31 May 2019 06:14:01 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id B6298503F62; Fri, 31 May 2019 16:13:56 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Fri, 31 May 2019 16:12:22 +1000 Message-Id: <20190531061351.22973-22-stewart@linux.ibm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190531061351.22973-1-stewart@linux.ibm.com> References: <20190531061351.22973-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-31_03:, , 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-1810050000 definitions=main-1905310040 Subject: [Skiboot] [PATCH 021/110] doc: prettify OPAL_GET_DEVICE_TREE 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: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- doc/opal-api/opal-get-device-tree-118.rst | 37 +++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/doc/opal-api/opal-get-device-tree-118.rst b/doc/opal-api/opal-get-device-tree-118.rst index af3fdf7044e1..df00205af310 100644 --- a/doc/opal-api/opal-get-device-tree-118.rst +++ b/doc/opal-api/opal-get-device-tree-118.rst @@ -1,36 +1,41 @@ +.. _OPAL_GET_DEVICE_TREE: + OPAL_GET_DEVICE_TREE ==================== -Get device sub-tree. +.. code-block:: c + + #define OPAL_GET_DEVICE_TREE 118 -Parameters: :: + int64_t opal_get_device_tree(uint32_t phandle, uint64_t buf, uint64_t len); + +Get device sub-tree. - uint32_t phandle: root device node phandle of the device sub-tree - uint64_t buf: FDT blob buffer or NULL - uint64_t len: length of the FDT blob buffer +``uint32_t phandle`` + root device node phandle of the device sub-tree +``uint64_t buf`` + FDT blob buffer or NULL +``uint64_t len`` + length of the FDT blob buffer -Calling: Retrieve device sub-tree. The root node's phandle is identified by @phandle. The typical use is for the kernel to update its device tree following a change in hardware (e.g. PCI hotplug). -Return Codes: +Return Codes +^^^^^^^^^^^^ FDT blob size returned FDT blob buffer size when ``buf`` is NULL -OPAL_SUCCESS +:ref:`OPAL_SUCCESS` FDT blob is created successfully - -OPAL_PARAMETER +:ref:`OPAL_PARAMETER` invalid argument @phandle or @len - -OPAL_INTERNAL_ERROR +:ref:`OPAL_INTERNAL_ERROR` failure creating FDT blob when calculating its size - -OPAL_NO_MEM +:ref:`OPAL_NO_MEM` not enough room in buffer for device sub-tree - -OPAL_EMPTY +:ref:`OPAL_EMPTY` failure creating FDT blob