diff options
author | Lukas Auer <lukas.auer@aisec.fraunhofer.de> | 2019-03-17 19:28:38 +0100 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2019-04-08 09:44:26 +0800 |
commit | f28ad250e6ef95ca58490b4e8651749d4f7e5c06 (patch) | |
tree | 195ec450c4a3fa9cc52260724ada8d50068782a1 /arch/riscv/lib/bootm.c | |
parent | 3dea63c8445b25eb3de471410bbafcf54c9f0e9b (diff) | |
download | u-boot-f28ad250e6ef95ca58490b4e8651749d4f7e5c06.zip u-boot-f28ad250e6ef95ca58490b4e8651749d4f7e5c06.tar.gz u-boot-f28ad250e6ef95ca58490b4e8651749d4f7e5c06.tar.bz2 |
riscv: boot images passed to bootm on all harts
Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/riscv/lib/bootm.c')
-rw-r--r-- | arch/riscv/lib/bootm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index f36b870..efbd3e2 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -13,6 +13,7 @@ #include <image.h> #include <asm/byteorder.h> #include <asm/csr.h> +#include <asm/smp.h> #include <dm/device.h> #include <dm/root.h> #include <u-boot/zlib.h> @@ -81,6 +82,9 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) { void (*kernel)(ulong hart, void *dtb); int fake = (flag & BOOTM_STATE_OS_FAKE_GO); +#ifdef CONFIG_SMP + int ret; +#endif kernel = (void (*)(ulong, void *))images->ep; @@ -92,8 +96,15 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) announce_and_cleanup(fake); if (!fake) { - if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) + if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) { +#ifdef CONFIG_SMP + ret = smp_call_function(images->ep, + (ulong)images->ft_addr, 0); + if (ret) + hang(); +#endif kernel(gd->arch.boot_hart, images->ft_addr); + } } } |