diff --git a/machine/fdt.c b/machine/fdt.c index d5beda1..fee3ae9 100644 --- a/machine/fdt.c +++ b/machine/fdt.c @@ -651,8 +651,12 @@ static bool hart_filter_mask(const struct hart_filter *filter) { if (filter->mmu_type == NULL) return true; if (strcmp(filter->status, "okay")) return true; +#if __riscv_xlen == 32 + if (!strcmp(filter->mmu_type, "riscv,sv32")) return false; +#else if (!strcmp(filter->mmu_type, "riscv,sv39")) return false; if (!strcmp(filter->mmu_type, "riscv,sv48")) return false; +#endif printm("hart_filter_mask saw unknown hart type: status=\"%s\", mmu_type=\"%s\"\n", filter->status, filter->mmu_type); return true;