From: Ian Campbell Subject: Re: [PATCH V2 1/2] xen: arm: introduce Cortex-A7 support Date: Wed, 3 Jul 2013 14:20:11 +0100 Message-ID: <1372857611.27768.255.camel@zakaz.uk.xensource.com> References: <1372770714-1657-1-git-send-email-bjzhang@suse.com> <1372770714-1657-2-git-send-email-bjzhang@suse.com> <1372849527.27768.211.camel@zakaz.uk.xensource.com> <51D48CE30200003000058C78@soto.provo.novell.com> <20130703130936.GA28684@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130703130936.GA28684@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: andre.przywara@calxeda.com, Stefano.Stabellini@eu.citrix.com, julien.grall@linaro.org, xen-devel@lists.xen.org, Bamvor Jian Zhang , baozich@gmail.com List-Id: xen-devel@lists.xenproject.org On Wed, 2013-07-03 at 14:09 +0100, Tim Deegan wrote: > At 06:43 -0600 on 03 Jul (1372833795), Bamvor Jian Zhang wrote: > > Hi, Ian > > > > >>>Wrote "Ian Campbell "> On Tue, > > Tue, 2013-07-02 at 21:11 +0800, Bamvor Jian Zhang wrote: > > > > > > > > + /* Set return address(PIC) */ > > > > + /* XXX: it only work while thumb2 is not enable in xen */ > > > > > > That's true of lots/all of our asm. Lets ignore that for now (no need to > > > comment). > > ok > > > Since we already have physoffset in r10 would it be clearer to make use > > > of that? > > sorry if i am wrong. do u mean change "adr lr, 1f" to something like > > "add lr, pc, r10"? > > No, I think this code is correct as it stands. Tim pointed out IRL that bl can't take a register... > But it is a bit strange that the CPUinfo struct contains _code_ to jump > to a routine, I hadn't noticed that! > rather than just containing the address of the routine > itself. If it just contained the address, the structures could be > defined in C (so we'd be certain that they matched the offset and size > constants we use here). And then this asm would indeed use physoffset, > something like: > > ldr r1, [r1, #PROCINFO_cpu_init] /* r1 := vaddr(init func) */ > adr lr, 1f /* Save return address */ > add pc, r1, r10 /* Call paddr(init func) */ > 1: > > The way you've done it is certainly very clever, but we don't need to > optimize single instructions out of the boot time and I think this is > clearer. > > Cheers, > > Tim. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel