From 9204785053e9a488b8990f9f98ff8f05c71fd0d5 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Thu, 2 Nov 2017 15:44:15 -0700 Subject: Detect harts that can't boot Linux instead of hard-coding them This checks to see if a hart can't boot Linux by looking for a compatible "mmu-type" field. If the hart can't boot Linux, then bbl masks it off. --- machine/mtrap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'machine/mtrap.c') diff --git a/machine/mtrap.c b/machine/mtrap.c index e5faae3..dba3613 100644 --- a/machine/mtrap.c +++ b/machine/mtrap.c @@ -9,6 +9,7 @@ #include "fdt.h" #include "unprivileged_memory.h" #include "platform_interface.h" +#include "disabled_hart_mask.h" #include #include #include @@ -63,7 +64,7 @@ void printm(const char* s, ...) static void send_ipi(uintptr_t recipient, int event) { - if (((platform__disabled_hart_mask >> recipient) & 1)) return; + if (((disabled_hart_mask >> recipient) & 1)) return; atomic_or(&OTHER_HLS(recipient)->mipi_pending, event); mb(); *OTHER_HLS(recipient)->ipi = 1; -- cgit v1.1