From: Alistair Francis <alistair@alistair23.me>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "alistair23@gmail.com" <alistair23@gmail.com>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PATCH v1 3/5] armv7m: Allow entry information to be returned
Date: Thu, 2 May 2019 05:41:16 +0000 [thread overview]
Message-ID: <PSXP216MB0277D89E74F59BE18F609C9ADD340@PSXP216MB0277.KORP216.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <cover.1556774049.git.alistair@alistair23.me>
Allow the kernel's entry point information to be returned when loading a
kernel.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
hw/arm/armv7m.c | 4 +++-
include/hw/arm/arm.h | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index c4b2a9a1f5..2f2755b21e 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -286,7 +286,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;
@@ -333,6 +333,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/arm.h b/include/hw/arm/arm.h
index ffed39252d..48d9181b28 100644
--- a/include/hw/arm/arm.h
+++ b/include/hw/arm/arm.h
@@ -29,11 +29,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.21.0
next prev parent reply other threads:[~2019-05-02 5:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1556774049.git.alistair@alistair23.me>
2019-05-02 5:40 ` [Qemu-devel] [PATCH v1 1/5] hw/misc: Add the STM32F4xx Sysconfig device Alistair Francis
2019-05-02 5:40 ` Alistair Francis
2019-05-03 13:40 ` Peter Maydell
2019-05-03 13:40 ` Peter Maydell
2019-05-02 5:41 ` [Qemu-devel] [PATCH v1 2/5] hw/misc: Add the STM32F4xx EXTI device Alistair Francis
2019-05-02 5:41 ` Alistair Francis
2019-05-03 13:41 ` Peter Maydell
2019-05-03 13:41 ` Peter Maydell
2019-05-02 5:41 ` Alistair Francis [this message]
2019-05-02 5:41 ` [Qemu-devel] [PATCH v1 3/5] armv7m: Allow entry information to be returned Alistair Francis
2019-05-02 5:41 ` [Qemu-devel] [PATCH v1 4/5] hw/arm: Add the STM32F4xx SoC Alistair Francis
2019-05-02 5:41 ` Alistair Francis
2019-05-03 13:51 ` Peter Maydell
2019-05-03 13:51 ` Peter Maydell
2019-05-02 5:41 ` [Qemu-devel] [PATCH v1 5/5] hw/arm: Add the Netduino Plus 2 Alistair Francis
2019-05-02 5:41 ` Alistair Francis
2019-05-03 13:53 ` Peter Maydell
2019-05-03 13:53 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PSXP216MB0277D89E74F59BE18F609C9ADD340@PSXP216MB0277.KORP216.PROD.OUTLOOK.COM \
--to=alistair@alistair23.me \
--cc=alistair23@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).