aboutsummaryrefslogtreecommitdiff
path: root/doc/opal-api/opal-get-device-tree-118.rst
blob: af3fdf7044e11c666b346807b1cc0f05798a33c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
OPAL_GET_DEVICE_TREE
====================

Get device sub-tree.

Parameters: ::

	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:

FDT blob size
  returned FDT blob buffer size when ``buf`` is NULL

OPAL_SUCCESS
  FDT blob is created successfully

OPAL_PARAMETER
  invalid argument @phandle or @len

OPAL_INTERNAL_ERROR
  failure creating FDT blob when calculating its size

OPAL_NO_MEM
  not enough room in buffer for device sub-tree

OPAL_EMPTY
  failure creating FDT blob