public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] U-boot changes to bringup boot and secondary CPUs in HYP mode
@ 2017-10-27  4:01 Jayadev Kumaran
  2017-10-27 11:04 ` Lukasz Majewski
  0 siblings, 1 reply; 2+ messages in thread
From: Jayadev Kumaran @ 2017-10-27  4:01 UTC (permalink / raw)
  To: u-boot

Hello all,

I am currently trying to bring up Xen on OMAP5432. When I try to boot the
board it shows








*Starting kernel ...- UART enabled -- CPU 00000000 booting -- Xen must be
entered in NS Hyp mode -- Please update the bootloader -- Boot failed -*
After applying the below patch , the boot CPU started loading.

diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
index 86c0e42..696da4b 100644
--- a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
+++ b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
@@ -19,7 +19,20 @@
  ENTRY(save_boot_params)
      ldr    r1, =OMAP_SRAM_SCRATCH_BOOT_PARAMS
      str    r0, [r1]
+/*
+ * Turn on hypervisor mode on CPU#0
+ */
+#ifdef CONFIG_DRA7XX_HYPERVISOR_ON
+    mov    r0, lr        @ This is a great place to switch into hyp mode
+                @ only the r0 was needed from _start and is now
+                @ free; all other general purpose registers were
+                @ already free.
+    ldr    r12, =0x102    @ Set PL310 control register - value in R0
+    .word    0xe1600070    @ SMC #0 - hand assembled because -march=armv5
+                @ call ROM Code API to set control register
+#else
      bx    lr
+#endif /* CONFIG_DRA7XX_HYPERVISOR_ON */
  ENDPROC(save_boot_params)
   ENTRY(set_pl310_ctrl_reg)

However now the secondary CPUs fail to load;







*(XEN) Bringing up CPU1- CPU 00000001 booting -- Xen must be entered in NS
Hyp mode -- Please update the bootloader -- Boot failed -*
Can someone provide the proper U-boot changes required to load the CPUs in
HYP mode

Thanks and Regards

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-27 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27  4:01 [U-Boot] U-boot changes to bringup boot and secondary CPUs in HYP mode Jayadev Kumaran
2017-10-27 11:04 ` Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox