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: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 4/6] hw/arm/boot: register cpu reset handlers if using -bios
Date: Wed, 17 Sep 2014 17:55:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

Am 17.09.2014 um 17:50 schrieb Ard Biesheuvel:
> On 9 September 2014 11:14, Peter Maydell <address@hidden> wrote:
>> 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).
>>
> 
> Has there been any discussion on this topic in the mean time?

No, thanks for the ping.

IIRC each machine is responsible for registering a reset hook that calls
- in most cases - cpu_reset().

The thing to look out for here is, does any machine already register a
reset hook and would reset twice with this patch? What's the issue with
v7-M?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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