[U-Boot] U-boot changes to bringup boot and secondary CPUs in HYP mode

Jayadev Kumaran jayadevk123 at gmail.com
Fri Oct 27 04:01:22 UTC 2017


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


More information about the U-Boot mailing list