xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Chen Baozi <baozich@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
	Julien Grall <julien.grall@linaro.org>, Tim Deegan <tim@xen.org>
Cc: Chen Baozi <baozich@gmail.com>,
	Xen Developer List <xen-devel@lists.xen.org>
Subject: [PATCH v2 2/3] xen/arm: Support kick_cpus for OMAP5
Date: Thu, 15 Aug 2013 21:19:49 +0800	[thread overview]
Message-ID: <1376572790-27724-3-git-send-email-baozich@gmail.com> (raw)
In-Reply-To: <1376572790-27724-1-git-send-email-baozich@gmail.com>


Signed-off-by: Chen Baozi <baozich@gmail.com>
---
 xen/arch/arm/arm32/mode_switch.S      | 22 +++++++++++++++++++++-
 xen/include/asm-arm/platforms/omap5.h | 14 ++++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/arm32/mode_switch.S b/xen/arch/arm/arm32/mode_switch.S
index 3500eb0..ba2a462 100644
--- a/xen/arch/arm/arm32/mode_switch.S
+++ b/xen/arch/arm/arm32/mode_switch.S
@@ -21,11 +21,13 @@
 #include <asm/page.h>
 #include <asm/platforms/vexpress.h>
 #include <asm/platforms/exynos5.h>
+#include <asm/platforms/omap5.h>
 #include <asm/asm_defns.h>
 #include <asm/gic.h>
 
 /* Wake up secondary cpus
- * This code relies on Machine ID and only works for Vexpress and the Arndale
+ * This code relies on Machine ID and only works for Vexpress, the Arndale
+ * and the OMAP5 uEVM.
  * TODO: Move this code either later (via platform specific desc) or in a bootwrapper
  * r5: Machine ID
  * Clobber r0 r2 */
@@ -34,6 +36,10 @@ kick_cpus:
         ldr   r0, =MACH_TYPE_SMDK5250
         teq   r5, r0                          /* Are we running on the arndale? */
         beq   kick_cpus_arndale
+        /* for OMAP5432 */
+        ldr   r0, =MACH_TYPE_OMAP5_SEVM
+        teq   r5, r0
+        beq   kick_cpus_omap5
         /* otherwise versatile express */
         /* write start paddr to v2m sysreg FLAGSSET register */
         ldr   r0, =(V2M_SYS_MMIO_BASE)        /* base V2M sysreg MMIO address */
@@ -55,6 +61,20 @@ kick_cpus_arndale:
         str   r2, [r0]
         dsb
         ldr   r2, =EXYNOS5_GIC_BASE_ADDRESS   /* r2 := Exynos5 gic base address */
+        b     kick_cpus_sgi
+kick_cpus_omap5:
+	/* write start paddr to AuxCoreBoot1 where ROM code will jump */
+        ldr   r0, =(OMAP_AUX_CORE_BOOT_1)
+        ldr   r2, =start
+        add   r2, r2, r10
+        str   r2, [r0]
+        ldr   r0, =(OMAP_AUX_CORE_BOOT_0)
+        mov   r2, #0x20
+        str   r2, [r0]
+        dsb
+        sev
+        ldr   r2, =OMAP5_GIC_BASE_ADDRESS     /* r2 := OMAP5 gic base address */
+        b     kick_cpus_sgi
 kick_cpus_sgi:
         /* send an interrupt */
         ldr   r0, =GIC_DR_OFFSET              /* GIC distributor offset */
diff --git a/xen/include/asm-arm/platforms/omap5.h b/xen/include/asm-arm/platforms/omap5.h
index dd8c6ca..6657af6 100644
--- a/xen/include/asm-arm/platforms/omap5.h
+++ b/xen/include/asm-arm/platforms/omap5.h
@@ -17,6 +17,20 @@
 #define OMAP5_WKUPGEN_BASE                      0x48281000
 #define OMAP5_SRAM_PA                           0x40300000
 
+#define OMAP_AUX_CORE_BOOT_0                    0x48281800
+#define OMAP_AUX_CORE_BOOT_1                    0x48281804
+
+/* Constants below is only used in assembly because the DTS is not yet parsed */
+#ifdef __ASSEMBLY__
+
+/* GIC Base Address */
+#define OMAP5_GIC_BASE_ADDRESS                  0x48210000
+
+/* OMAP5432 uEVM machine ID */
+#define MACH_TYPE_OMAP5_SEVM                    3777
+
+#endif /* __ASSEMBLY__ */
+
 #endif /* __ASM_ARM_PLATFORMS_OMAP5_H */
 
 /*
-- 
1.8.1.4

  parent reply	other threads:[~2013-08-15 13:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 13:19 [PATCH v2 0/3] Specific mapping for dom0, smp kick cpus and hyp mode switch for OMAP5 Chen Baozi
2013-08-15 13:19 ` [PATCH v2 1/3] xen/arm: Specific mapping for dom0 on OMAP5 platform Chen Baozi
2013-08-22 10:21   ` Ian Campbell
2013-08-22 12:54     ` Ian Campbell
2013-08-23  0:04       ` Chen Baozi
2013-08-15 13:19 ` Chen Baozi [this message]
2013-08-15 14:12   ` [PATCH v2 2/3] xen/arm: Support kick_cpus for OMAP5 Andrii Anisov
2013-08-16  2:04     ` Chen Baozi
2013-08-15 13:19 ` [PATCH v2 3/3] xen/arm: Enable switch to hyp mode for OMAP5432 Chen Baozi
2013-08-15 14:09   ` Andrii Anisov
2013-08-15 14:25     ` Andrii Anisov
2013-08-15 14:27       ` Andrii Anisov
2013-08-15 14:51         ` Andrii Anisov
2013-08-15 14:37     ` Chen Baozi
2013-08-15 14:42       ` Andrii Anisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376572790-27724-3-git-send-email-baozich@gmail.com \
    --to=baozich@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).