diff options
author | Tom Rini <trini@konsulko.com> | 2019-04-08 22:32:11 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-04-08 22:32:11 -0400 |
commit | ffb269ab30dbce8ab87d09942e2a6951694516f1 (patch) | |
tree | 9dd752a4a6331f7b2c5d920294a0b31b06aea8c3 /arch/riscv/lib/bootm.c | |
parent | 3c99166441bf3ea325af2da83cfe65430b49c066 (diff) | |
parent | 48b90d9db5d32e587901c4f33175488dd20fe0a5 (diff) |
Merge git://git.denx.de/u-boot-riscv
- RISC-V arch support SMP.
- Support Andestech's PLIC and PLMT.
- qemu, fu54e, ae350 boards enable SMP by default.
- Fix CONFIG_DEFAULT_DEVICE_TREE failure.
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 f36b8702ef..efbd3e23e7 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); + } } } |