diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/skiboot/doc/opal-api/opal-get-device-tree-118.rst | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/skiboot/doc/opal-api/opal-get-device-tree-118.rst')
-rw-r--r-- | roms/skiboot/doc/opal-api/opal-get-device-tree-118.rst | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/roms/skiboot/doc/opal-api/opal-get-device-tree-118.rst b/roms/skiboot/doc/opal-api/opal-get-device-tree-118.rst new file mode 100644 index 000000000..df00205af --- /dev/null +++ b/roms/skiboot/doc/opal-api/opal-get-device-tree-118.rst @@ -0,0 +1,41 @@ +.. _OPAL_GET_DEVICE_TREE: + +OPAL_GET_DEVICE_TREE +==================== + +.. code-block:: c + + #define OPAL_GET_DEVICE_TREE 118 + + 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 + + +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 +^^^^^^^^^^^^ + +FDT blob size + returned FDT blob buffer size when ``buf`` is NULL + +:ref:`OPAL_SUCCESS` + FDT blob is created successfully +:ref:`OPAL_PARAMETER` + invalid argument @phandle or @len +:ref:`OPAL_INTERNAL_ERROR` + failure creating FDT blob when calculating its size +:ref:`OPAL_NO_MEM` + not enough room in buffer for device sub-tree +:ref:`OPAL_EMPTY` + failure creating FDT blob |