qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/3] target-arm: Setup smpboot code in all setup


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1/3] target-arm: Setup smpboot code in all setups
Date: Tue, 15 Feb 2011 13:37:44 +0000

On 15 February 2011 13:12, Adam Lackorzynski <address@hidden> wrote:
>
> On Tue Feb 15, 2011 at 13:01:08 +0000, Peter Maydell wrote:
>> On 15 February 2011 10:48, Adam Lackorzynski <address@hidden> wrote:
>> > Make smpboot available not only for Linux but for all setups.
>>
>> I'm not convinced about this. I think if you're providing a raw
>> image for an SMP system (rather than a Linux kernel) then it's
>> your job to provide an image which handles the bootup of the
>> secondary CPUs, the same way it would be if you were providing
>> a ROM image for real hardware.
>
> Ok, this is one possibility. Another one would be something like this:

> @@ -112,7 +112,11 @@ static void secondary_cpu_reset(void *opaque)
>   /* Set entry point for secondary CPUs.  This assumes we're using
>      the init code from arm_boot.c.  Real hardware resets all CPUs
>      the same.  */
> -  env->regs[15] = SMP_BOOT_ADDR;
> +  if (realview_binfo.is_linux) {
> +      env->regs[15] = SMP_BOOT_ADDR;
> +  } else {
> +      env->regs[15] = realview_binfo.entry;
> +  }
>  }

Moving in the right direction, but it would be cleaner if the secondary
CPU reset was handled inside arm_boot.c, I think (there is a TODO
in that file to that effect). Then we could get rid of the cpu reset
hook from realview.c.

-- PMM



reply via email to

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