diff options
author | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-04-14 13:43:24 +0900 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-05-18 11:38:05 -0700 |
commit | 2d2682512f0faf4d09a696184bf3c0bb6838baca (patch) | |
tree | 31d238d63d671ff6b8ade87e521186d30afec7e7 /arch/riscv/kernel/vmlinux.lds.S | |
parent | Linux 5.7-rc6 (diff) | |
download | linux-dev-2d2682512f0faf4d09a696184bf3c0bb6838baca.tar.xz linux-dev-2d2682512f0faf4d09a696184bf3c0bb6838baca.zip |
riscv: Allow device trees to be built into the kernel
Some systems don't provide a useful device tree to the kernel on boot.
Chasing around bootloaders for these systems is a headache, so instead
le't's just keep a device tree table in the kernel, keyed by the SOC's
unique identifier, that contains the relevant DTB.
This is only implemented for M mode right now. While we could implement
this via the SBI calls that allow access to these identifiers, we don't
have any systems that need this right now.
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/riscv/kernel/vmlinux.lds.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S index 0339b6bbe11a..e6f8016b366a 100644 --- a/arch/riscv/kernel/vmlinux.lds.S +++ b/arch/riscv/kernel/vmlinux.lds.S @@ -34,6 +34,11 @@ SECTIONS KEEP(*(__soc_early_init_table)) __soc_early_init_table_end = .; } + __soc_builtin_dtb_table : { + __soc_builtin_dtb_table_start = .; + KEEP(*(__soc_builtin_dtb_table)) + __soc_builtin_dtb_table_end = .; + } /* we have to discard exit text and such at runtime, not link time */ .exit.text : { |