ports/sysutils/opensbi/files/patch-platform_generic_sifive_fu540.c
Mitchell Horne 652b56fe24 sysutils/opensbi: update to v1.3.1
Add a patch to work around an assembler error with clang 16.0. This will
be submitted upstream.

As usual, bump revision of dependent u-boot ports.

Reviewed by:	jrtc27, lwhsu (previous version)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40915
2023-08-03 13:05:13 -03:00

26 lines
727 B
C

--- platform/generic/sifive/fu540.c.orig 2022-06-26 14:27:30 UTC
+++ platform/generic/sifive/fu540.c
@@ -11,6 +11,15 @@
#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 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,