From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH RFC 5/7] xen: arm: rewrite start of day page table and cpu bring up Date: Wed, 18 Sep 2013 14:57:45 +0100 Message-ID: <5239B159.9000500@linaro.org> References: <1379381846.11304.73.camel@hastur.hellion.org.uk> <1379382050-11821-5-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379382050-11821-5-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: julien.grall@citrix.com, stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 09/17/2013 02:40 AM, Ian Campbell wrote: > void platform_reset(void) > { > if ( platform && platform->reset ) > diff --git a/xen/arch/arm/platforms/vexpress.c b/xen/arch/arm/platforms/vexpress.c > index 6f7dc2c..2d8d905 100644 > --- a/xen/arch/arm/platforms/vexpress.c > +++ b/xen/arch/arm/platforms/vexpress.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > > #define DCC_SHIFT 26 > #define FUNCTION_SHIFT 20 > @@ -119,6 +120,41 @@ static void vexpress_reset(void) > iounmap(sp810); > } > > +#ifdef CONFIG_ARM_32 > +static int vexpress_cpu_up(int cpu) > +{ > + static int have_set_sysflags = 0; > + > + /* XXX separate init hook? */ > + if ( !have_set_sysflags ) > + { > + void __iomem *sysflags; > + > + sysflags = ioremap_nocache(V2M_SYS_MMIO_BASE, PAGE_SIZE); The device should contains a node with compatible "arm,vexpress-sysreg". Can you use this node instead of hardcoding value? > + if ( !sysflags ) > + { > + dprintk(XENLOG_ERR, "Unable to map vexpress MMIO\n"); > + return -EFAULT; > + } > + > + printk("Set SYS_FLAGS to %"PRIpaddr" (%p)\n", > + __pa(init_secondary), init_secondary); > + iowritel(sysflags + V2M_SYS_FLAGSCLR, ~0); > + iowritel(sysflags + V2M_SYS_FLAGSSET, > + __pa(init_secondary)); > + > + iounmap(sysflags); > + > + have_set_sysflags = 1; > + } > + > + printk("Waking CPU%d\n", cpu); > + send_SGI_mask(cpumask_of(cpu), GIC_SGI_EVENT_CHECK); > + > + return 0; > +} > +#endif > + -- Julien Grall