aboutsummaryrefslogtreecommitdiff
path: root/bbl
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-08-09 17:13:55 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-08-09 18:06:05 -0700
commit147cfa612b8a601ee7646da3bce5267e08c30bdc (patch)
treedb800512c351b0fb1cb07fd8542f4e40586d76d7 /bbl
parentca24f3c904186cb6babfc74fd6c4e133e4542b5e (diff)
downloadriscv-pk-147cfa612b8a601ee7646da3bce5267e08c30bdc.zip
riscv-pk-147cfa612b8a601ee7646da3bce5267e08c30bdc.tar.gz
riscv-pk-147cfa612b8a601ee7646da3bce5267e08c30bdc.tar.bz2
The DTB argument to boot_other_hart shouldn't be used in BBL
I screwed up refactoring bbl.
Diffstat (limited to 'bbl')
-rw-r--r--bbl/bbl.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/bbl/bbl.c b/bbl/bbl.c
index 7d1be2a..d3d6d9f 100644
--- a/bbl/bbl.c
+++ b/bbl/bbl.c
@@ -17,7 +17,7 @@ static uintptr_t dtb_output()
return (end + MEGAPAGE_SIZE - 1) / MEGAPAGE_SIZE * MEGAPAGE_SIZE;
}
-static uintptr_t filter_dtb(uintptr_t source)
+static void filter_dtb(uintptr_t source)
{
uintptr_t dest = dtb_output();
uint32_t size = fdt_size(source);
@@ -28,31 +28,29 @@ static uintptr_t filter_dtb(uintptr_t source)
filter_plic(dest);
filter_compat(dest, "riscv,clint0");
filter_compat(dest, "riscv,debug-013");
-
- return dest;
}
-void boot_other_hart(uintptr_t dtb)
+void boot_other_hart(uintptr_t unused __attribute__((unused)))
{
const void* entry;
do {
entry = entry_point;
mb();
} while (!entry);
- enter_supervisor_mode(entry, read_csr(mhartid), dtb);
+ enter_supervisor_mode(entry, read_csr(mhartid), dtb_output());
}
void boot_loader(uintptr_t dtb)
{
extern char _payload_start;
- dtb = filter_dtb(dtb);
+ filter_dtb(dtb);
#ifdef PK_ENABLE_LOGO
print_logo();
#endif
#ifdef PK_PRINT_DEVICE_TREE
- fdt_print(dtb);
+ fdt_print(dtb_output());
#endif
mb();
entry_point = &_payload_start;
- boot_other_hart(dtb);
+ boot_other_hart(0);
}