aboutsummaryrefslogtreecommitdiff
path: root/bbl
diff options
context:
space:
mode:
authorYan <892930505@qq.com>2020-11-01 08:14:48 +0800
committerGitHub <noreply@github.com>2020-10-31 17:14:48 -0700
commita4d4298ca10527a51fad86c53a93c48e6f510092 (patch)
tree7f2c843dd521181cbf3ae8ffa5ba660997c0b3f3 /bbl
parentdef2f01eee49aa639c6e393d161687998cd64c4e (diff)
downloadriscv-pk-a4d4298ca10527a51fad86c53a93c48e6f510092.zip
riscv-pk-a4d4298ca10527a51fad86c53a93c48e6f510092.tar.gz
riscv-pk-a4d4298ca10527a51fad86c53a93c48e6f510092.tar.bz2
Disable device tree filter when load a dts from file (#219)
* add device tree in elf, using --with-dts to add the absolute path of device tree * Disable device tree filter * Remove *.dtb dependence, when the --with-dts option is not used
Diffstat (limited to 'bbl')
-rw-r--r--bbl/bbl.c2
-rw-r--r--bbl/bbl.lds1
2 files changed, 3 insertions, 0 deletions
diff --git a/bbl/bbl.c b/bbl/bbl.c
index 3b92fc1..fdb1672 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 CUSTOM_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 */