diff options
| author | Eric Auger | 2016-02-19 17:42:29 +0100 |
|---|---|---|
| committer | Alex Williamson | 2016-02-19 17:42:29 +0100 |
| commit | 60e43e987c3d188855dc7e95ff4979be78db3574 (patch) | |
| tree | 3df464614d85b0c721c0b84af71721dff9faa4f0 /include | |
| parent | hw/vfio/platform: amd-xgbe device (diff) | |
| download | qemu-60e43e987c3d188855dc7e95ff4979be78db3574.tar.gz qemu-60e43e987c3d188855dc7e95ff4979be78db3574.tar.xz qemu-60e43e987c3d188855dc7e95ff4979be78db3574.zip | |
device_tree: introduce load_device_tree_from_sysfs
This function returns the host device tree blob from sysfs
(/proc/device-tree). It uses a recursive function inspired
from dtc read_fstree.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sysemu/device_tree.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sysemu/device_tree.h b/include/sysemu/device_tree.h index 359e14304f..62093bad7c 100644 --- a/include/sysemu/device_tree.h +++ b/include/sysemu/device_tree.h @@ -16,6 +16,14 @@ void *create_device_tree(int *sizep); void *load_device_tree(const char *filename_path, int *sizep); +#ifdef CONFIG_LINUX +/** + * load_device_tree_from_sysfs: reads the device tree information in the + * /proc/device-tree directory and return the corresponding binary blob + * buffer pointer. Asserts in case of error. + */ +void *load_device_tree_from_sysfs(void); +#endif int qemu_fdt_setprop(void *fdt, const char *node_path, const char *property, const void *val, int size); |
