* [U-Boot] RFD: ARM: enable HYP mode on OMAP5
@ 2012-11-27 12:25 Ian Molton
2013-02-19 14:25 ` [U-Boot] [PATCH] Fix omap5 hyp mode for second cpu Vincent Stehlé
0 siblings, 1 reply; 2+ messages in thread
From: Ian Molton @ 2012-11-27 12:25 UTC (permalink / raw)
To: u-boot
Hi folks,
My colleague Clemens Fischer, and I were able to bring up the OMAP5 CPU
in HYP mode with the following patch to u-boot.
Obviously the patch is not production grade yet, but we feel that it
would be of use to discuss how best to integrate the code into u-boot.
The code wakes up CPU1 before putting CPU0 into HYP mode, and CPU1 goes
back to sleep once it has entered HYP mode itself.
With this patch, a near-unmodified mainline linux kernel (patched for
ARM KVM only) will boot up with HYP mode enabled.
Many thanks to Marc and Christoffer for their help getting KVM up and
running!
Comments are welcome.
-Ian
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] Fix omap5 hyp mode for second cpu
2012-11-27 12:25 [U-Boot] RFD: ARM: enable HYP mode on OMAP5 Ian Molton
@ 2013-02-19 14:25 ` Vincent Stehlé
0 siblings, 0 replies; 2+ messages in thread
From: Vincent Stehlé @ 2013-02-19 14:25 UTC (permalink / raw)
To: u-boot
Make it work on PandaBoard 5 with 5432 ES2 and Linux.
Signed-off-by: Vincent Stehl? <v-stehle@ti.com>
---
Hi,
Here are some necessary adaptations for OMAP5 ES2, as magic value has changed.
In the mean time, we make the secondary cpu routine a bit closer to what
romcode does.
Best regards,
V.
arch/arm/lib/bootm.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 02852d6..dd8f42e 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -56,16 +56,21 @@ asm (
"ldr r12, =0x102\n"
"mov r0, pc\n"
"smc 0x1\n"
- "ldr r1, =0x48281804\n" // AUX_CORE_BOOT_1
+ "ldr r1, =0x48281800\n" /* AUX_CORE_BOOT_0 */
"mov r2, #0\n"
- "str r2, [r1]\n"
+ "str r2, [r1]\n" /* AUX_CORE_BOOT_0 */
+ "str r2, [r1, #4]\n" /* AUX_CORE_BOOT_1 */
"isb\n"
"dsb\n"
+ "mov r3, #0xf0\n"
"1: wfe\n"
- "ldr r2, [r1]\n"
- "cmp r2, #0\n"
- "movne pc, r2\n"
- "b 1b\n"
+ "ldr r2, [r1]\n" /* AUX_CORE_BOOT_0 */
+ "ands r2, r2, r3\n"
+ "beq 1b\n"
+ "ldr r2, [r1, #4]\n" /* AUX_CORE_BOOT_1 */
+ "cmp r2, #0\n"
+ "beq 1b\n"
+ "bx r2\n"
".popsection\n"
);
@@ -378,7 +383,7 @@ void hyp_enable(void) {
"ldr r1, =0x48281800\n" // AUX_CORE_BOOT_1
"ldr r2, =__hyp_init_sec\n"
"str r2, [r1, #4]\n"
- "mov r2, #0x200\n"
+ "mov r2, #0x20\n"
"str r2, [r1]\n" // AUX_CORE_BOOT_0
"isb\n"
"dmb\n"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-19 14:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 12:25 [U-Boot] RFD: ARM: enable HYP mode on OMAP5 Ian Molton
2013-02-19 14:25 ` [U-Boot] [PATCH] Fix omap5 hyp mode for second cpu Vincent Stehlé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox