qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Alistair Francis <alistair@alistair23.me>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>
Cc: "alistair23@gmail.com" <alistair23@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v3 1/6] armv7m: Allow entry information to be returned
Date: Fri, 21 Jun 2019 18:23:02 +0200	[thread overview]
Message-ID: <b071bbbe-a657-f7e3-de4b-cb3a448b5e2a@redhat.com> (raw)
In-Reply-To: <PSXP216MB02772CA8ED100BB578388BA6DDE50@PSXP216MB0277.KORP216.PROD.OUTLOOK.COM>

On 6/19/19 6:53 AM, Alistair Francis wrote:
> Allow the kernel's entry point information to be returned when loading a
> kernel.
> 
> Signed-off-by: Alistair Francis <alistair@alistair23.me>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  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 b9efad6bac..8ee6291a47 100644
> --- a/hw/arm/armv7m.c
> +++ b/hw/arm/armv7m.c
> @@ -304,7 +304,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;
> @@ -351,6 +351,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 c48cc4c2bc..4e4db0416c 100644
> --- a/include/hw/arm/boot.h
> +++ b/include/hw/arm/boot.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 {
> 


  reply	other threads:[~2019-06-21 16:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1560919807.git.alistair@alistair23.me>
2019-06-19  4:53 ` [Qemu-devel] [PATCH v3 1/6] armv7m: Allow entry information to be returned Alistair Francis
2019-06-21 16:23   ` Philippe Mathieu-Daudé [this message]
2019-06-19  4:54 ` [Qemu-devel] [PATCH v3 2/6] target/arm: Allow setting M mode entry and sp Alistair Francis
2019-06-21 16:38   ` Philippe Mathieu-Daudé
2019-06-23 15:30     ` Alistair Francis
2019-06-19  4:54 ` [Qemu-devel] [PATCH v3 3/6] hw/misc: Add the STM32F4xx Sysconfig device Alistair Francis
2019-06-19  4:54 ` [Qemu-devel] [PATCH v3 4/6] hw/misc: Add the STM32F4xx EXTI device Alistair Francis
2019-06-19  4:54 ` [Qemu-devel] [PATCH v3 5/6] hw/arm: Add the STM32F4xx SoC Alistair Francis
2019-06-19  4:54 ` [Qemu-devel] [PATCH v3 6/6] hw/arm: Add the Netduino Plus 2 Alistair Francis

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=b071bbbe-a657-f7e3-de4b-cb3a448b5e2a@redhat.com \
    --to=philmd@redhat.com \
    --cc=alistair23@gmail.com \
    --cc=alistair@alistair23.me \
    --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).