projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5ea1e5
)
riscv: bootm: Pass mhartid CSR value to kernel
author
Bin Meng
<
[email protected]
>
Wed, 26 Sep 2018 13:55:16 +0000
(06:55 -0700)
committer
Andes
<
[email protected]
>
Wed, 3 Oct 2018 09:48:08 +0000
(17:48 +0800)
So far this is hardcoded to zero, and we should read the value from
mhartid CSR and pass it to Linux kernel.
Suggested-by: Lukas Auer <
[email protected]
>
Signed-off-by: Bin Meng <
[email protected]
>
Reviewed-by: Lukas Auer <
[email protected]
>
Reviewed-by: Rick Chen <
[email protected]
>
arch/riscv/lib/bootm.c
patch
|
blob
|
history
diff --git
a/arch/riscv/lib/bootm.c
b/arch/riscv/lib/bootm.c
index 6893108fe324b1ba66ce7dd2ec651010ff74306e..a7a9fb921b6b31d64ee7bff17a871e4f6c2d2c46 100644
(file)
--- a/
arch/riscv/lib/bootm.c
+++ b/
arch/riscv/lib/bootm.c
@@
-11,6
+11,7
@@
#include <image.h>
#include <u-boot/zlib.h>
#include <asm/byteorder.h>
+#include <asm/csr.h>
DECLARE_GLOBAL_DATA_PTR;
@@
-57,9
+58,9
@@
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
printf("\nStarting kernel ...\n\n");
cleanup_before_linux();
- /* TODO: hardcode the hart id to zero for now */
+
if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len)
- kernel(
0
, images->ft_addr);
+ kernel(
csr_read(mhartid)
, images->ft_addr);
/* does not return */