ports/sysutils/opensbi/files/patch-platform_generic_sifive_fu540.c
Mitchell Horne 1ebf5e656c sysutils/opensbi: update to v1.6
Remove the port platform OPTIONS in favor of the 'generic' platform
only. This has been the only one we've shipped with for a few versions
now.

This cleans up the Makefile, but more to the point, there is some kind
of build regression with the new version that doing the make and install
in a single step seems to fix.

Bump dependent u-boot ports.

Sponsored by:	The FreeBSD Foundation
2025-02-24 17:17:28 -04:00

27 lines
753 B
C

--- platform/generic/sifive/fu540.c.orig 2022-06-26 14:27:30 UTC
+++ platform/generic/sifive/fu540.c
@@ -11,6 +11,16 @@
#include <sbi_utils/fdt/fdt_helper.h>
#include <sbi_utils/fdt/fdt_fixup.h>
+extern int need_pmp_war;
+
+static int sifive_fu540_early_init(bool cold_boot, const void *fdt,
+ const struct fdt_match *match)
+{
+ need_pmp_war = true;
+
+ return 0;
+}
+
static u64 sifive_fu540_tlbr_flush_limit(const struct fdt_match *match)
{
/*
@@ -41,6 +50,7 @@ const struct platform_override sifive_fu540 = {
};
const struct platform_override sifive_fu540 = {
+ .early_init = sifive_fu540_early_init,
.match_table = sifive_fu540_match,
.tlbr_flush_limit = sifive_fu540_tlbr_flush_limit,
.fdt_fixup = sifive_fu540_fdt_fixup,