OSDN Git Service

riscv: add BUILTIN_DTB support for MMU-enabled targets
authorVitaly Wool <vitaly.wool@konsulko.com>
Fri, 15 Jan 2021 23:49:48 +0000 (01:49 +0200)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 19 Feb 2021 07:17:54 +0000 (23:17 -0800)
commitf105aa940e78a87b6b6c82d7c230db86386ff013
tree8b4db6d53e4af826738e36a39ebe90f72b0029c2
parentf766f77a74f5784d8d4d3c36b1900731f97d08d0
riscv: add BUILTIN_DTB support for MMU-enabled targets

Sometimes, especially in a production system we may not want to
use a "smart bootloader" like u-boot to load kernel, ramdisk and
device tree from a filesystem on eMMC, but rather load the kernel
from a NAND partition and just run it as soon as we can, and in
this case it is convenient to have device tree compiled into the
kernel binary. Since this case is not limited to MMU-less systems,
let's support it for these which have MMU enabled too.

While at it, provide __dtb_start as a parameter to setup_vm() in
BUILTIN_DTB case, so we don't have to duplicate BUILTIN_DTB specific
processing in MMU-enabled and MMU-disabled versions of setup_vm().

Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/kernel/head.S
arch/riscv/mm/init.c