qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/6] hw/arm/boot: register cpu reset handlers if


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 4/6] hw/arm/boot: register cpu reset handlers if using -bios
Date: Tue, 9 Sep 2014 19:14:27 +0100

On 5 September 2014 16:15, Ard Biesheuvel <address@hidden> wrote:
> When booting with -bios or -pflash rather than -kernel, we need to make sure
> reset handlers are registered.
>
> Signed-off-by: Ard Biesheuvel <address@hidden>
> ---
>  hw/arm/boot.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/hw/arm/boot.c b/hw/arm/boot.c
> index 8f5649a250fd..0cfc11d42962 100644
> --- a/hw/arm/boot.c
> +++ b/hw/arm/boot.c
> @@ -473,6 +473,10 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info 
> *info)
>              }
>          }
>
> +        for (; cs; cs = CPU_NEXT(cs)) {
> +            qemu_register_reset(do_cpu_reset, ARM_CPU(cs));
> +        }
> +
>          /* If no kernel specified, do nothing; we will start from address 0
>           * (typically a boot ROM image) in the same way as hardware.
>           */

Andreas, with QOM CPUs who is supposed to be responsible
for causing them to be reset when qemu_system_reset()
happens? At the moment for ARM it doesn't happen at all
unless you happened to pass -kernel. This patch makes
boot.c register the reset handlers, but that seems
a bit odd to me (among other things, it won't work
for v7M).

thanks
-- PMM



reply via email to

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