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: Adam Lackorzynski
Subject: Re: [Qemu-devel] [PATCH 1/3] target-arm: Setup smpboot code in all setups
Date: Tue, 15 Feb 2011 14:12:45 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

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:

 Subject: [PATCH] target-arm: Provide entry vector for non-linux systems

Non-Linux systems must provide their own code for secondary CPU boot-up.
We use the same entry point as on the first CPU.

Signed-off-by: Adam Lackorzynski <address@hidden>
---
 hw/realview.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/hw/realview.c b/hw/realview.c
index 6eb6c6a..574bc11 100644
--- a/hw/realview.c
+++ b/hw/realview.c
@@ -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;
+  }
 }
 
 /* The following two lists must be consistent.  */
-- 
1.7.2.3


Adam
-- 
Adam                 address@hidden
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/



reply via email to

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