U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoffer Dall <christoffer.dall@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: enable ARMv7 virt support for the Arndale board
Date: Fri,  1 Aug 2014 13:35:44 +0200	[thread overview]
Message-ID: <1406892944-4390-1-git-send-email-christoffer.dall@linaro.org> (raw)

From: Andre Przywara <andre.przywara@linaro.org>

To enable hypervisors utilizing the ARMv7 virtualization extension
on the Arndale board, add the simple SMP pen address writer function
and add the required configuration variables to switch all cores to
HYP mode before launching the OS.
This allows booting KVM and Xen directly from u-boot.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
---

Note that Andre previously reported a board reset on initial boot with
this patch, but I have applied this patch on upstream master of U-Boot
and tested on two separate Arndale boards and it boots perfectly fine
and lets you use KVM, so I recommend taking this patch as is.

 board/samsung/arndale/arndale.c | 10 ++++++++++
 include/configs/arndale.h       |  8 ++++++++
 2 files changed, 18 insertions(+)

diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c
index ef88314..83fd3bd 100644
--- a/board/samsung/arndale/arndale.c
+++ b/board/samsung/arndale/arndale.c
@@ -117,3 +117,13 @@ int checkboard(void)
 	return 0;
 }
 #endif
+
+#ifdef CONFIG_S5P_PA_SYSRAM
+void smp_set_core_boot_addr(unsigned long addr, int corenr)
+{
+	writel(addr, CONFIG_S5P_PA_SYSRAM);
+
+	/* make sure this write is really executed */
+	__asm__ volatile ("dsb\n");
+}
+#endif
diff --git a/include/configs/arndale.h b/include/configs/arndale.h
index 64b54ab..75f9933 100644
--- a/include/configs/arndale.h
+++ b/include/configs/arndale.h
@@ -250,4 +250,12 @@
 /* Enable Time Command */
 #define CONFIG_CMD_TIME
 
+#define CONFIG_S5P_PA_SYSRAM	0x02020000
+#define CONFIG_SMP_PEN_ADDR	CONFIG_S5P_PA_SYSRAM
+
+/* The PERIPHBASE in the CBAR register is wrong on the Arndale, so override it */
+#define CONFIG_ARM_GIC_BASE_ADDRESS	0x10480000
+
+#define CONFIG_ARMV7_VIRT
+
 #endif	/* __CONFIG_H */
-- 
1.8.5.2

             reply	other threads:[~2014-08-01 11:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 11:35 Christoffer Dall [this message]
2014-08-01 12:46 ` [U-Boot] [PATCH] ARM: enable ARMv7 virt support for the Arndale board Andreas Färber
2014-08-01 12:53   ` Christoffer Dall
2014-08-01 12:59     ` Andre Przywara
2014-08-01 13:02       ` Christoffer Dall
2014-08-01 13:29         ` Andre Przywara
2014-08-01 13:37           ` Christoffer Dall
2014-08-01 13:39           ` Andreas Färber
2014-08-30 15:14 ` [U-Boot] " Tom Rini

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=1406892944-4390-1-git-send-email-christoffer.dall@linaro.org \
    --to=christoffer.dall@linaro.org \
    --cc=u-boot@lists.denx.de \
    /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