summaryrefslogtreecommitdiffstats
path: root/include/hw/arm/arm.h
diff options
context:
space:
mode:
authorPeter Maydell2017-02-20 16:35:55 +0100
committerPeter Maydell2017-02-28 17:18:49 +0100
commit3651c28569ba2fa8e959b89681118642162273da (patch)
treeab7aa0ccf0782e49e420fc792755d9bbf138c1ce /include/hw/arm/arm.h
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170228'... (diff)
downloadqemu-3651c28569ba2fa8e959b89681118642162273da.tar.gz
qemu-3651c28569ba2fa8e959b89681118642162273da.tar.xz
qemu-3651c28569ba2fa8e959b89681118642162273da.zip
armv7m: Abstract out the "load kernel" code
Abstract the "load kernel" code out of armv7m_init() into its own function. This includes the registration of the CPU reset function, to parallel how we handle this for A profile cores. We make the function public so that boards which choose to directly instantiate an ARMv7M device object can call it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1487604965-23220-2-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'include/hw/arm/arm.h')
-rw-r--r--include/hw/arm/arm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h
index c175c0e999..a3f79d3379 100644
--- a/include/hw/arm/arm.h
+++ b/include/hw/arm/arm.h
@@ -26,6 +26,18 @@ typedef enum {
/* armv7m.c */
DeviceState *armv7m_init(MemoryRegion *system_memory, int mem_size, int num_irq,
const char *kernel_filename, const char *cpu_model);
+/**
+ * armv7m_load_kernel:
+ * @cpu: CPU
+ * @kernel_filename: file to load
+ * @mem_size: mem_size: maximum image size to load
+ *
+ * Load the guest image for an ARMv7M system. This must be called by
+ * any ARMv7M board, either directly or via armv7m_init(). (This is
+ * necessary to ensure that the CPU resets correctly on system reset,
+ * as well as for kernel loading.)
+ */
+void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size);
/*
* struct used as a parameter of the arm_load_kernel machine init