diff options
author | Eric Auger <eric.auger@linaro.org> | 2016-02-19 09:42:29 -0700 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2016-02-19 09:42:29 -0700 |
commit | 60e43e987c3d188855dc7e95ff4979be78db3574 (patch) | |
tree | 3df464614d85b0c721c0b84af71721dff9faa4f0 /include/sysemu/device_tree.h | |
parent | 62d9551247a2db3937d99e5495bc36b32abb41be (diff) | |
download | qemu-60e43e987c3d188855dc7e95ff4979be78db3574.zip qemu-60e43e987c3d188855dc7e95ff4979be78db3574.tar.gz qemu-60e43e987c3d188855dc7e95ff4979be78db3574.tar.bz2 |
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/sysemu/device_tree.h')
-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 359e143..62093ba 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); |