From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v3 04/15] xen: arm: support building a 64-bit dom0 domain Date: Fri, 19 Jul 2013 08:59:25 -0400 Message-ID: <20130719125925.GA3987@localhost.localdomain> References: <1374234267.13645.54.camel@kazak.uk.xensource.com> <1374234284-6304-4-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1374234284-6304-4-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 Fri, Jul 19, 2013 at 12:44:33PM +0100, Ian Campbell wrote: > Signed-off-by: Ian Campbell > Acked-by: Stefano Stabellini > --- > v3: rebased. as part of this move PSR_GUEST_INIT out of the public interface > --- > xen/arch/arm/domain_build.c | 10 +++++++--- > xen/include/asm-arm/processor.h | 2 ++ > xen/include/public/arch-arm.h | 2 -- > 3 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 5e486c4..7f3035c 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -593,9 +593,7 @@ int construct_dom0(struct domain *d) > > memset(regs, 0, sizeof(*regs)); > > - regs->pc = (uint32_t)kinfo.entry; > - > - regs->cpsr = PSR_GUEST_INIT; > + regs->pc = (register_t)kinfo.entry; > > #ifdef CONFIG_ARM_64 > d->arch.type = kinfo.type; > @@ -603,6 +601,11 @@ int construct_dom0(struct domain *d) > > if ( is_pv32_domain(d) ) > { > + regs->cpsr = PSR_GUEST_INIT|PSR_MODE_SVC; > + > + /* Pretend to be a Cortex A15 */ Um, should there by a TODO for that? > + d->arch.vpidr = 0x410fc0f0; > + > /* FROM LINUX head.S > * > * Kernel startup entry point. > @@ -621,6 +624,7 @@ int construct_dom0(struct domain *d) > #ifdef CONFIG_ARM_64 > else > { > + regs->cpsr = PSR_GUEST_INIT|PSR_MODE_EL1h; > /* From linux/Documentation/arm64/booting.txt */ > regs->x0 = kinfo.dtb_paddr; > regs->x1 = 0; /* Reserved for future use */ > diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h > index 263bd03..8b9b320 100644 > --- a/xen/include/asm-arm/processor.h > +++ b/xen/include/asm-arm/processor.h > @@ -37,6 +37,8 @@ > #define SCTLR_BASE 0x00c50078 > #define HSCTLR_BASE 0x30c51878 > > +#define PSR_GUEST_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK) > + > /* HCR Hyp Configuration Register */ > #define HCR_TGE (1<<27) > #define HCR_TVM (1<<26) > diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h > index 8aa62d3..cea12b2 100644 > --- a/xen/include/public/arch-arm.h > +++ b/xen/include/public/arch-arm.h > @@ -237,8 +237,6 @@ typedef uint64_t xen_callback_t; > #define PSR_IT_MASK (0x0600fc00) /* Thumb If-Then Mask */ > #define PSR_JAZELLE (1<<24) /* Jazelle Mode */ > > -#define PSR_GUEST_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC) > - > #endif /* __XEN_PUBLIC_ARCH_ARM_H__ */ > > /* > -- > 1.7.2.5 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel