summaryrefslogtreecommitdiff
path: root/include/qfw.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-28 15:00:23 -0700
committerTom Rini <trini@konsulko.com>2023-02-06 13:04:53 -0500
commit00fa989eab2f75c450477d00e335aa05402e7fe9 (patch)
tree889f97b33270544bab1ffbc9fcbcf5edbcaa3165 /include/qfw.h
parente08e6ea67d91af6e2c423f5248aaedb82088b897 (diff)
downloadu-boot-00fa989eab2f75c450477d00e335aa05402e7fe9.tar.gz
u-boot-00fa989eab2f75c450477d00e335aa05402e7fe9.tar.bz2
u-boot-00fa989eab2f75c450477d00e335aa05402e7fe9.zip
qemu: Move qfw kernel setup into a common file
This is currently in the cmd/ file but we want to call it from a driver. Move it into a common place. Tidy up the header-file order while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/qfw.h')
-rw-r--r--include/qfw.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qfw.h b/include/qfw.h
index 7ca132e66a..42798fea7d 100644
--- a/include/qfw.h
+++ b/include/qfw.h
@@ -316,4 +316,17 @@ bool qfw_file_iter_end(struct fw_cfg_file_iter *iter);
*/
int qemu_cpu_fixup(void);
+/*
+ * qemu_fwcfg_setup_kernel() - Prepare the kernel for zboot
+ *
+ * Loads kernel data to 'load_addr', initrd to 'initrd_addr' and kernel command
+ * line using qemu fw_cfg interface
+ *
+ * @load_addr: Load address for kernel
+ * @initrd_addr: Load address for ramdisk
+ * @return 0 if OK, -ENOENT if no kernel
+ */
+int qemu_fwcfg_setup_kernel(struct udevice *qfw_dev, ulong load_addr,
+ ulong initrd_addr);
+
#endif