From a161e6f3ef31004e47a5b94b85c2e84b764f8637 Mon Sep 17 00:00:00 2001 From: Yan <892930505@qq.com> Date: Fri, 30 Oct 2020 05:27:39 +0800 Subject: Disable device tree filter when load a dts from file (#217) * add device tree in elf, using --with-dts to add the absolute path of device tree * Disable device tree filter --- bbl/bbl.c | 2 ++ bbl/bbl.lds | 1 + 2 files changed, 3 insertions(+) (limited to 'bbl') diff --git a/bbl/bbl.c b/bbl/bbl.c index 3b92fc1..8e29801 100644 --- a/bbl/bbl.c +++ b/bbl/bbl.c @@ -41,11 +41,13 @@ static void filter_dtb(uintptr_t source) uint32_t size = fdt_size(source); memcpy((void*)dest, (void*)source, size); +#ifndef MACHINE_DTS // Remove information from the chained FDT filter_harts(dest, &disabled_hart_mask); filter_plic(dest); filter_compat(dest, "riscv,clint0"); filter_compat(dest, "riscv,debug-013"); +#endif } static void protect_memory(void) diff --git a/bbl/bbl.lds b/bbl/bbl.lds index 624f691..9d51f1d 100644 --- a/bbl/bbl.lds +++ b/bbl/bbl.lds @@ -67,6 +67,7 @@ SECTIONS *(.srodata*) *(.gnu.linkonce.d.*) *(.comment) + *(.dtb) } /* End of initialized data segment */ -- cgit v1.1