]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
RISC-V: copy the DTB to early KVA
authormhorne <mhorne@FreeBSD.org>
Mon, 6 Apr 2020 22:48:43 +0000 (22:48 +0000)
committermhorne <mhorne@FreeBSD.org>
Mon, 6 Apr 2020 22:48:43 +0000 (22:48 +0000)
commit1b03c6be66be0bc0b943126afb1ad07c91fde3f5
tree571415efb821031c65c1b7be0777dfb5881bd06d
parent0111f9afb0df4e964ce911562e266f0da2941371
RISC-V: copy the DTB to early KVA

The location of the device-tree blob is passed to the kernel by the
previous booting stage (i.e. BBL or OpenSBI). Currently, we leave it
untouched and mark the 1MB of memory holding it as unavailable.

Instead, do what is done by other fake_preload_metadata() routines and
copy to the DTB to KVA space. This is more in line with what loader(8)
will provide us in the future, and it allows us to reclaim the hole in
physical memory.

Reviewed by: markj, kp (earlier version)
Differential Revision: https://reviews.freebsd.org/D24152
sys/riscv/include/machdep.h
sys/riscv/include/metadata.h [new file with mode: 0644]
sys/riscv/include/vmparam.h
sys/riscv/riscv/genassym.c
sys/riscv/riscv/locore.S
sys/riscv/riscv/machdep.c
sys/riscv/riscv/pmap.c