vxworks: fixed cpu enable using PSCI on armv8
PATCH 1/1 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 similiar to what is done in boot_jump_linux in arch/arm/lib/bootm.c file.
Tested on VxWorks 7 release SR0520 2017-12-08.
--- arch/arm/lib/bootm.c | 5 +++++ cmd/elf.c | 5 +++++ 2 files changed, 10 insertions(+)
arch/arm/lib/bootm.c +5 -0
@@ -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); }
cmd/elf.c +5 -0
@@ -368,6 +368,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);
Signature · 1 line
2.11.0
PATCH 1/1 vxworks: fixed cpu enable using PSCI on armv8
Hi Vasyl,
Quoted 6 lines · Vasyl Vavrychuk
Without
armv8_setup_psciregisterVBAR_EL3is not set up property which makes SMC calls jump to invalid location.
smp_kick_all_cpusis required to make slave cpus leavegic_wait_for_interrupt. Without this they will never pursue booting process.
Quoted 6 lines
Fix was applied to the two ways of booting VxWorks: bootvx and bootm commands.
This implementation is very similiar to what is done in
boot_jump_linuxinarch/arm/lib/bootm.cfile.Tested on VxWorks 7 release SR0520 2017-12-08.
Could you please indicate the board you used for the testing as well? Thanks!
Quoted 7 lines
Signed-off-by Vasyl Vavrychuk <[email protected]>--- arch/arm/lib/bootm.c | 5 +++++ cmd/elf.c | 5 +++++ 2 files changed, 10 insertions(+)
Otherwise,
Regards,
Bin
PATCH v2 1/1 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 similiar 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.
--- arch/arm/lib/bootm.c | 5 +++++ cmd/elf.c | 5 +++++ 2 files changed, 10 insertions(+)
arch/arm/lib/bootm.c +5 -0
@@ -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); }
cmd/elf.c +5 -0
@@ -368,6 +368,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);
Signature · 1 line
2.11.0
PATCH v2 1/1 vxworks: fixed cpu enable using PSCI on armv8
Quoted 8 lines · Vasyl Vavrychuk
Without
armv8_setup_psciregisterVBAR_EL3is not set up property which makes SMC calls jump to invalid location.
smp_kick_all_cpusis required to make slave cpus leavegic_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.
Quoted 8 lines
This implementation is very similar to what is done in
boot_jump_linuxinarch/arm/lib/bootm.cfile.Tested on VxWorks 7 release SR0520 2017-12-08 Intel Stratix 10 SX SoC Development Kit board.
Signed-off-by Vasyl Vavrychuk <[email protected]>Reviewed-by Bin Meng <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180413/fe688029/attachment.sig>