summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Meng <[email protected]>2018-12-12 06:12:46 -0800
committerAndes <[email protected]>2018-12-18 09:56:27 +0800
commit3c85099aa329274c99b49672bba9e1ff710121e2 (patch)
tree1aeb3b890762be543efb0b454a59b84e7779006c
parent51ab4570f3920ae3d6822c96fe03ffb97e2072b4 (diff)
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 <[email protected]> Reviewed-by: Lukas Auer <[email protected]> Reviewed-by: Anup Patel <[email protected]>
-rw-r--r--arch/riscv/lib/bootm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 124aeefff83..60b32cca818 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);
}
}