aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-06-24 15:11:52 -0700
committerPalmer Dabbelt <palmer@sifive.com>2019-06-27 02:47:06 -0700
commitb30422231b90c089ce73aa4b40461bfdc1be0371 (patch)
tree1ec04199f6c7fce8f1f5b66e8ff467fdecd4f309 /include
parent0ac24d56c5e7d32423ea78ac58a06b444d1df04d (diff)
downloadqemu-b30422231b90c089ce73aa4b40461bfdc1be0371.zip
qemu-b30422231b90c089ce73aa4b40461bfdc1be0371.tar.gz
qemu-b30422231b90c089ce73aa4b40461bfdc1be0371.tar.bz2
hw/riscv: Add support for loading a firmware
Add support for loading a firmware file for the virt machine and the SiFive U. This can be run with the following command: qemu-system-riscv64 -machine virt -bios fw_jump.bin -kernel vmlinux Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/riscv/boot.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/riscv/boot.h b/include/hw/riscv/boot.h
index f84fd6c..daa179b 100644
--- a/include/hw/riscv/boot.h
+++ b/include/hw/riscv/boot.h
@@ -20,6 +20,8 @@
#ifndef RISCV_BOOT_H
#define RISCV_BOOT_H
+target_ulong riscv_load_firmware(const char *firmware_filename,
+ hwaddr firmware_load_addr);
target_ulong riscv_load_kernel(const char *kernel_filename);
hwaddr riscv_load_initrd(const char *filename, uint64_t mem_size,
uint64_t kernel_entry, hwaddr *start);