]> git.sur5r.net Git - u-boot/commitdiff
vxworks: fixed cpu enable using PSCI on armv8
authorVasyl Vavrychuk <vvavrychuk@gmail.com>
Tue, 10 Apr 2018 09:36:36 +0000 (12:36 +0300)
committerTom Rini <trini@konsulko.com>
Fri, 13 Apr 2018 21:06:05 +0000 (17:06 -0400)
Without armv8_setup_psci register VBAR_EL3 is not set up property which
makes SMC calls jump to invalid location.

smp_kick_all_cpus is required to make slave cpus leave gic_wait_for_interrupt.
Without this they will never pursue booting process.

Fix was applied to the two ways of booting VxWorks: bootvx and bootm commands.

This implementation is very similar to what is done in boot_jump_linux
in arch/arm/lib/bootm.c file.

Tested on VxWorks 7 release SR0520 2017-12-08 Intel Stratix 10 SX SoC
Development Kit board.

Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@globallogic.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/arm/lib/bootm.c
cmd/elf.c

index cfc236f964e9a09cce7da945f73c832787bd6edd..91a64bec34cf27a1124ecbe62342c86dc7b68497 100644 (file)
@@ -448,6 +448,11 @@ void boot_prep_vxworks(bootm_headers_t *images)
 }
 void boot_jump_vxworks(bootm_headers_t *images)
 {
+#if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI)
+       armv8_setup_psci();
+       smp_kick_all_cpus();
+#endif
+
        /* ARM VxWorks requires device tree physical address to be passed */
        ((void (*)(void *))images->ep)(images->ft_addr);
 }
index 038796498c0b24f2e7a305282fc2b7ef43f2e113..19479bb706e06c9ccd97f6c855e39d54778c7c5e 100644 (file)
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -369,6 +369,11 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        printf("## Starting vxWorks at 0x%08lx ...\n", addr);
 
        dcache_disable();
+#if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI)
+       armv8_setup_psci();
+       smp_kick_all_cpus();
+#endif
+
 #ifdef CONFIG_X86
        /* VxWorks on x86 uses stack to pass parameters */
        ((asmlinkage void (*)(int))addr)(0);