git: 8e0b9063b872 - main - sysutils/opensbi: update to v1.7

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Wed, 02 Jul 2025 16:28:47 UTC
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8e0b9063b8726a42bb0632b3313fe8dc01053210

commit 8e0b9063b8726a42bb0632b3313fe8dc01053210
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2025-06-30 17:42:12 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2025-07-02 16:27:27 +0000

    sysutils/opensbi: update to v1.7
    
    Bump dependent u-boot ports.
    
    Sponsored by:   The FreeBSD Foundation
---
 sysutils/opensbi/Makefile                          |  2 +-
 sysutils/opensbi/distinfo                          |  6 +++---
 sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c   |  6 +++---
 .../files/patch-platform_generic_platform.c        | 12 +++++------
 .../files/patch-platform_generic_sifive_fu540.c    | 23 +++++++++++-----------
 sysutils/u-boot-sifive-fu540/Makefile              |  2 +-
 sysutils/u-boot-sifive-fu740/Makefile              |  2 +-
 sysutils/u-boot-starfive-visionfive2/Makefile      |  2 +-
 8 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/sysutils/opensbi/Makefile b/sysutils/opensbi/Makefile
index 703e9218ed9f..48d1f5e554a9 100644
--- a/sysutils/opensbi/Makefile
+++ b/sysutils/opensbi/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	opensbi
 DISTVERSIONPREFIX=v
-DISTVERSION=	1.6
+DISTVERSION=	1.7
 CATEGORIES=	sysutils
 
 MAINTAINER=	mhorne@FreeBSD.org
diff --git a/sysutils/opensbi/distinfo b/sysutils/opensbi/distinfo
index 27de00840a02..4c670b9b189d 100644
--- a/sysutils/opensbi/distinfo
+++ b/sysutils/opensbi/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1735930463
-SHA256 (riscv-software-src-opensbi-v1.6_GH0.tar.gz) = d11702103f177a2914e94eec57ce5ed820296d874f6b6525c4482e55d71a3667
-SIZE (riscv-software-src-opensbi-v1.6_GH0.tar.gz) = 476631
+TIMESTAMP = 1751304581
+SHA256 (riscv-software-src-opensbi-v1.7_GH0.tar.gz) = 2cf856a4e5e2e052948ddb54ba48232b1f698b7f52e0374fc7d17d51e8c8f7ce
+SIZE (riscv-software-src-opensbi-v1.7_GH0.tar.gz) = 490131
diff --git a/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c b/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c
index 73263b9d2715..e22fa1ab8d57 100644
--- a/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c
+++ b/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c
@@ -1,6 +1,6 @@
---- lib/sbi/sbi_hart.c.orig	2023-12-27 03:02:58.000000000 -0400
-+++ lib/sbi/sbi_hart.c	2024-01-11 14:10:09.723340000 -0400
-@@ -523,6 +523,16 @@
+--- lib/sbi/sbi_hart.c.orig	2025-06-30 03:07:30 UTC
++++ lib/sbi/sbi_hart.c
+@@ -567,6 +567,16 @@ int sbi_hart_pmp_configure(struct sbi_scratch *scratch
  	if (!pmp_count)
  		return 0;
  
diff --git a/sysutils/opensbi/files/patch-platform_generic_platform.c b/sysutils/opensbi/files/patch-platform_generic_platform.c
index 2e6ed1159868..c4e535de59b5 100644
--- a/sysutils/opensbi/files/patch-platform_generic_platform.c
+++ b/sysutils/opensbi/files/patch-platform_generic_platform.c
@@ -1,11 +1,11 @@
---- platform/generic/platform.c.orig	2022-06-25 03:42:10 UTC
+--- platform/generic/platform.c.orig	2025-06-30 03:07:30 UTC
 +++ platform/generic/platform.c
-@@ -24,6 +24,8 @@
- #include <sbi_utils/ipi/fdt_ipi.h>
- #include <sbi_utils/reset/fdt_reset.h>
+@@ -30,6 +30,8 @@
+ #include <sbi_utils/serial/semihosting.h>
+ #include <sbi_utils/timer/fdt_timer.h>
  
 +int need_pmp_war = false;
 +
  /* List of platform override modules generated at compile time */
- extern const struct platform_override *platform_override_modules[];
- extern unsigned long platform_override_modules_size;
+ extern const struct fdt_driver *const platform_override_modules[];
+ 
diff --git a/sysutils/opensbi/files/patch-platform_generic_sifive_fu540.c b/sysutils/opensbi/files/patch-platform_generic_sifive_fu540.c
index 9f776d796e1b..d721c7224afa 100644
--- a/sysutils/opensbi/files/patch-platform_generic_sifive_fu540.c
+++ b/sysutils/opensbi/files/patch-platform_generic_sifive_fu540.c
@@ -1,27 +1,26 @@
---- platform/generic/sifive/fu540.c.orig	2022-06-26 14:27:30 UTC
+--- platform/generic/sifive/fu540.c.orig	2025-06-30 03:07:30 UTC
 +++ platform/generic/sifive/fu540.c
-@@ -11,6 +11,16 @@
+@@ -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 void *fdt,
-+				    const struct fdt_match *match)
++static int sifive_fu540_early_init(bool cold_boot)
 +{
 +	need_pmp_war = true;
 +
 +	return 0;
 +}
 +
- static u64 sifive_fu540_tlbr_flush_limit(const struct fdt_match *match)
+ static u64 sifive_fu540_tlbr_flush_limit(void)
  {
  	/*
-@@ -41,6 +50,7 @@ const struct platform_override sifive_fu540 = {
- };
+@@ -22,6 +31,7 @@ static int sifive_fu540_platform_init(const void *fdt,
  
- 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,
+ static int sifive_fu540_platform_init(const void *fdt, int nodeoff, const struct fdt_match *match)
+ {
++	generic_platform_ops.early_init = sifive_fu540_early_init;
+ 	generic_platform_ops.get_tlbr_flush_limit = sifive_fu540_tlbr_flush_limit;
+ 
+ 	return 0;
diff --git a/sysutils/u-boot-sifive-fu540/Makefile b/sysutils/u-boot-sifive-fu540/Makefile
index 51643c092390..ea3f4d044cb0 100644
--- a/sysutils/u-boot-sifive-fu540/Makefile
+++ b/sysutils/u-boot-sifive-fu540/Makefile
@@ -1,6 +1,6 @@
 MASTERDIR=	${.CURDIR}/../u-boot-master
 
-U_BOOT_SLAVE_PORTREVISION_2024.07=1
+U_BOOT_SLAVE_PORTREVISION_2025.04=1
 
 MODEL=		sifive-fu540
 BOARD_CONFIG=	sifive_unleashed_defconfig
diff --git a/sysutils/u-boot-sifive-fu740/Makefile b/sysutils/u-boot-sifive-fu740/Makefile
index 98d38e935010..9fd0f9a3a8a2 100644
--- a/sysutils/u-boot-sifive-fu740/Makefile
+++ b/sysutils/u-boot-sifive-fu740/Makefile
@@ -1,6 +1,6 @@
 MASTERDIR=	${.CURDIR}/../u-boot-master
 
-U_BOOT_SLAVE_PORTREVISION_2024.07=1
+U_BOOT_SLAVE_PORTREVISION_2025.04=1
 
 MODEL=		sifive-fu740
 BOARD_CONFIG=	sifive_unmatched_defconfig
diff --git a/sysutils/u-boot-starfive-visionfive2/Makefile b/sysutils/u-boot-starfive-visionfive2/Makefile
index 391d3b2321e6..52e8559b7713 100644
--- a/sysutils/u-boot-starfive-visionfive2/Makefile
+++ b/sysutils/u-boot-starfive-visionfive2/Makefile
@@ -1,6 +1,6 @@
 MASTERDIR=	${.CURDIR}/../u-boot-master
 
-U_BOOT_SLAVE_PORTREVISION_2024.07=1
+U_BOOT_SLAVE_PORTREVISION_2025.04=1
 
 MODEL=		starfive-visionfive2
 BOARD_CONFIG=	starfive_visionfive2_defconfig