qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 1/4] hw: Add support for loading ARMv7-M appl


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v1 1/4] hw: Add support for loading ARMv7-M applications via -kernel
Date: Tue, 28 Aug 2012 13:43:46 +0100

On 27 August 2012 21:37, Meador Inge <address@hidden> wrote:
> The minimal amount of arm_boot_info has been setup to allow
> for machines based off of ARMv7-M processors to be loaded via the
> -kernel option.
>
> Signed-off-by: Meador Inge <address@hidden>
> ---
>  hw/armv7m.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/hw/armv7m.c b/hw/armv7m.c
> index 9f66667..d11be09 100644
> --- a/hw/armv7m.c
> +++ b/hw/armv7m.c
> @@ -150,10 +150,16 @@ static void armv7m_bitband_init(void)
>  static void armv7m_reset(void *opaque)
>  {
>      ARMCPU *cpu = opaque;
> +    CPUARMState *env = &cpu->env;
> +    const struct arm_boot_info *info = env->boot_info;
>
>      cpu_reset(CPU(cpu));
> +    env->regs[15] = info->entry & 0xfffffffe;
> +    env->thumb = info->entry & 1;

Isn't this going to break reset in the case where your loaded
image is a complete system image? It unconditionally overrides
the PC/Thumb setting we do in arm_cpu_reset().

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]