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

[Xen-devel] [PATCH 04/13] xen: arm: support building a 64-bit dom0 domain



Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 xen/arch/arm/domain_build.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 81a759c..2ba372d 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -420,9 +420,8 @@ int construct_dom0(struct domain *d)
 
     memset(regs, 0, sizeof(*regs));
 
-    regs->pc = (uint32_t)kinfo.entry;
+    regs->pc = (register_t)kinfo.entry;
 
-    regs->cpsr = PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC;
 
 #ifdef CONFIG_ARM_64
     d->arch.type = kinfo.type;
@@ -430,6 +429,11 @@ int construct_dom0(struct domain *d)
 
     if ( is_pv32_domain(d) )
     {
+        regs->cpsr = PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC;
+
+        /* Pretend to be a Cortex A15 */
+        d->arch.vpidr = 0x410fc0f0;
+
         /* FROM LINUX head.S
          *
          * Kernel startup entry point.
@@ -447,6 +451,8 @@ int construct_dom0(struct domain *d)
 #ifdef CONFIG_ARM_64
     else
     {
+        regs->cpsr = PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h;
+
         /* From linux/Documentation/arm64/booting.txt */
         regs->x0 = kinfo.dtb_paddr;
         regs->x1 = 0; /* Reserved for future use */
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.