From: Bin Meng Date: Wed, 12 Dec 2018 14:12:46 +0000 (-0800) Subject: riscv: bootm: Change to use boot_hart from global data X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=3c85099aa329274c99b49672bba9e1ff710121e2;p=u-boot.git riscv: bootm: Change to use boot_hart from global data Avoid reading mhartid CSR directly, instead use the one we saved in the global data structure before. With this patch, BBL no longer needs to be hacked to provide the mhartid CSR emulation for S-mode U-Boot. Signed-off-by: Bin Meng Reviewed-by: Lukas Auer Reviewed-by: Anup Patel --- diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index 124aeefff8..60b32cca81 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -93,7 +93,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) if (!fake) { if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) - kernel(csr_read(mhartid), images->ft_addr); + kernel(gd->arch.boot_hart, images->ft_addr); } }