Commit 3194daa10ba642269a0948282423c48fd02fadce

Authored by Vasyl Vavrychuk
Committed by Tom Rini
1 parent 52ff8020d0

vxworks: fixed cpu enable using PSCI on armv8

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>

Showing 2 changed files with 10 additions and 0 deletions Side-by-side Diff

arch/arm/lib/bootm.c
... ... @@ -448,6 +448,11 @@
448 448 }
449 449 void boot_jump_vxworks(bootm_headers_t *images)
450 450 {
  451 +#if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI)
  452 + armv8_setup_psci();
  453 + smp_kick_all_cpus();
  454 +#endif
  455 +
451 456 /* ARM VxWorks requires device tree physical address to be passed */
452 457 ((void (*)(void *))images->ep)(images->ft_addr);
453 458 }
... ... @@ -369,6 +369,11 @@
369 369 printf("## Starting vxWorks at 0x%08lx ...\n", addr);
370 370  
371 371 dcache_disable();
  372 +#if defined(CONFIG_ARM64) && defined(CONFIG_ARMV8_PSCI)
  373 + armv8_setup_psci();
  374 + smp_kick_all_cpus();
  375 +#endif
  376 +
372 377 #ifdef CONFIG_X86
373 378 /* VxWorks on x86 uses stack to pass parameters */
374 379 ((asmlinkage void (*)(int))addr)(0);