[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 1/6] armv7m: Allow entry information to be return
From: |
Alistair Francis |
Subject: |
[Qemu-devel] [PATCH v4 1/6] armv7m: Allow entry information to be returned |
Date: |
Thu, 5 Sep 2019 23:11:00 -0700 |
Allow the kernel's entry point information to be returned when loading a
kernel.
Signed-off-by: Alistair Francis <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/arm/armv7m.c | 4 +++-
include/hw/arm/boot.h | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 7a3c48f002..40755d77db 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -306,7 +306,7 @@ static void armv7m_reset(void *opaque)
cpu_reset(CPU(cpu));
}
-void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size)
+uint64_t armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int
mem_size)
{
int image_size;
uint64_t entry;
@@ -353,6 +353,8 @@ void armv7m_load_kernel(ARMCPU *cpu, const char
*kernel_filename, int mem_size)
* board must call this function!
*/
qemu_register_reset(armv7m_reset, cpu);
+
+ return entry;
}
static Property bitband_properties[] = {
diff --git a/include/hw/arm/boot.h b/include/hw/arm/boot.h
index 7f4d0ca7cd..e35b83c0d2 100644
--- a/include/hw/arm/boot.h
+++ b/include/hw/arm/boot.h
@@ -27,11 +27,13 @@ typedef enum {
* @kernel_filename: file to load
* @mem_size: mem_size: maximum image size to load
*
+ * returns: location of the kernel's entry point
+ *
* Load the guest image for an ARMv7M system. This must be called by
* any ARMv7M board. (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);
+uint64_t armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int
mem_size);
/* arm_boot.c */
struct arm_boot_info {
--
2.22.0
- [Qemu-devel] [PATCH v4 0/6] Add the STM32F405 and Netduino Plus 2 machine, Alistair Francis, 2019/09/06
- [Qemu-devel] [PATCH v4 1/6] armv7m: Allow entry information to be returned,
Alistair Francis <=
- [Qemu-devel] [PATCH v4 2/6] target/arm: Allow setting M mode entry and sp, Alistair Francis, 2019/09/06
- [Qemu-devel] [PATCH v4 3/6] hw/misc: Add the STM32F4xx Sysconfig device, Alistair Francis, 2019/09/06
- [Qemu-devel] [PATCH v4 4/6] hw/misc: Add the STM32F4xx EXTI device, Alistair Francis, 2019/09/06
- [Qemu-devel] [PATCH v4 5/6] hw/arm: Add the STM32F4xx SoC, Alistair Francis, 2019/09/06
- [Qemu-devel] [PATCH v4 6/6] hw/arm: Add the Netduino Plus 2, Alistair Francis, 2019/09/06
- Re: [Qemu-devel] [PATCH v4 0/6] Add the STM32F405 and Netduino Plus 2 machine, no-reply, 2019/09/06
- Re: [Qemu-devel] [PATCH v4 0/6] Add the STM32F405 and Netduino Plus 2 machine, Peter Maydell, 2019/09/11