summaryrefslogtreecommitdiff
path: root/include/hw/arm
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2013-11-22 17:17:10 +0000
committerPeter Maydell <peter.maydell@linaro.org>2013-12-10 13:28:30 +0000
commit0fb79851c3dffa06de648d955ee2f2b47bfb96ce (patch)
treea340a17a7a36a59689754c1a4f43e4b18796421d /include/hw/arm
parentef6de70ea811d66ebb6b9b6046e304f588e754bb (diff)
downloadqemu-0fb79851c3dffa06de648d955ee2f2b47bfb96ce.tar.gz
qemu-0fb79851c3dffa06de648d955ee2f2b47bfb96ce.tar.bz2
qemu-0fb79851c3dffa06de648d955ee2f2b47bfb96ce.zip
hw/arm/boot: Allow boards to provide an fdt blob
If no fdt is provided on command line and the new field get_dtb in struct arm_boot_info is set then call it to get a device tree blob. Signed-off-by: John Rigby <john.rigby@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1385140638-10444-4-git-send-email-peter.maydell@linaro.org [PMM: minor tweaks and cleanup] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/arm')
-rw-r--r--include/hw/arm/arm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h
index ecbbba871e..cbbf4ca4cb 100644
--- a/include/hw/arm/arm.h
+++ b/include/hw/arm/arm.h
@@ -50,6 +50,13 @@ struct arm_boot_info {
const struct arm_boot_info *info);
void (*secondary_cpu_reset_hook)(ARMCPU *cpu,
const struct arm_boot_info *info);
+ /* if a board is able to create a dtb without a dtb file then it
+ * sets get_dtb. This will only be used if no dtb file is provided
+ * by the user. On success, sets *size to the length of the created
+ * dtb, and returns a pointer to it. (The caller must free this memory
+ * with g_free() when it has finished with it.) On failure, returns NULL.
+ */
+ void *(*get_dtb)(const struct arm_boot_info *info, int *size);
/* if a board needs to be able to modify a device tree provided by
* the user it should implement this hook.
*/