diff --git a/sysutils/opensbi/Makefile b/sysutils/opensbi/Makefile index 48d1f5e554a9..50317266b7e1 100644 --- a/sysutils/opensbi/Makefile +++ b/sysutils/opensbi/Makefile @@ -1,37 +1,37 @@ PORTNAME= opensbi DISTVERSIONPREFIX=v -DISTVERSION= 1.7 +DISTVERSION= 1.8.1 CATEGORIES= sysutils MAINTAINER= mhorne@FreeBSD.org COMMENT= RISC-V SBI bootloader and firmware WWW= https://github.com/riscv-software-src/opensbi LICENSE= BSD2CLAUSE BUILD_DEPENDS= bash:shells/bash \ dtc:sysutils/dtc USES= gmake python:build shebangfix SHEBANG_FILES= scripts/Kconfiglib/*.py USE_GITHUB= yes GH_ACCOUNT= riscv-software-src MAKE_ARGS= LLVM=1 I=${STAGEDIR}${PREFIX} V=1 \ FW_PAYLOAD=n FW_TEXT_START=0x80000000 \ OPENSBI_VERSION_GIT= PLATFORM=generic GENERIC_STRIP_ARGS= -K tohost -K fromhost INSTALL_TARGET= install PLIST_SUB+= RISCV_ABI=${PLATFORM_RISCV_ABI} PLATFORM_RISCV_ABI= lp64 post-install: ${STRIP_CMD} ${GENERIC_STRIP_ARGS} \ ${STAGEDIR}${DATADIR}/${PLATFORM_RISCV_ABI}/generic/firmware/fw_*.elf .include diff --git a/sysutils/opensbi/distinfo b/sysutils/opensbi/distinfo index 4c670b9b189d..6b93e107e752 100644 --- a/sysutils/opensbi/distinfo +++ b/sysutils/opensbi/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1751304581 -SHA256 (riscv-software-src-opensbi-v1.7_GH0.tar.gz) = 2cf856a4e5e2e052948ddb54ba48232b1f698b7f52e0374fc7d17d51e8c8f7ce -SIZE (riscv-software-src-opensbi-v1.7_GH0.tar.gz) = 490131 +TIMESTAMP = 1768236677 +SHA256 (riscv-software-src-opensbi-v1.8.1_GH0.tar.gz) = fb1ae61a85e966322101acb1c982f84d9eaafc4de7dd474a7d7546d9bb321c6f +SIZE (riscv-software-src-opensbi-v1.8.1_GH0.tar.gz) = 514734 diff --git a/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c b/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c deleted file mode 100644 index e22fa1ab8d57..000000000000 --- a/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c +++ /dev/null @@ -1,19 +0,0 @@ ---- 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; - -+ /* -+ * Disable the PMP for the sifive/fu540 platform, required to work -+ * around a hardware errata. -+ */ -+ extern int need_pmp_war; -+ if (need_pmp_war) { -+ pmp_set(0, PMP_R | PMP_W | PMP_X, -1, __riscv_xlen); -+ return 0; -+ } -+ - pmp_log2gran = sbi_hart_pmp_log2gran(scratch); - pmp_bits = sbi_hart_pmp_addrbits(scratch) - 1; - pmp_addr_max = (1UL << pmp_bits) | ((1UL << pmp_bits) - 1); diff --git a/sysutils/opensbi/files/patch-platform_generic_platform.c b/sysutils/opensbi/files/patch-platform_generic_platform.c deleted file mode 100644 index c4e535de59b5..000000000000 --- a/sysutils/opensbi/files/patch-platform_generic_platform.c +++ /dev/null @@ -1,11 +0,0 @@ ---- platform/generic/platform.c.orig 2025-06-30 03:07:30 UTC -+++ platform/generic/platform.c -@@ -30,6 +30,8 @@ - #include - #include - -+int need_pmp_war = false; -+ - /* List of platform override modules generated at compile time */ - 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 deleted file mode 100644 index d721c7224afa..000000000000 --- a/sysutils/opensbi/files/patch-platform_generic_sifive_fu540.c +++ /dev/null @@ -1,26 +0,0 @@ ---- platform/generic/sifive/fu540.c.orig 2025-06-30 03:07:30 UTC -+++ platform/generic/sifive/fu540.c -@@ -11,6 +11,15 @@ - #include - #include - -+extern int need_pmp_war; -+ -+static int sifive_fu540_early_init(bool cold_boot) -+{ -+ need_pmp_war = true; -+ -+ return 0; -+} -+ - static u64 sifive_fu540_tlbr_flush_limit(void) - { - /* -@@ -22,6 +31,7 @@ static int sifive_fu540_platform_init(const void *fdt, - - 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 5f79e53b93d8..b678f8a6e7b5 100644 --- a/sysutils/u-boot-sifive-fu540/Makefile +++ b/sysutils/u-boot-sifive-fu540/Makefile @@ -1,16 +1,18 @@ MASTERDIR= ${.CURDIR}/../u-boot-master +U_BOOT_SLAVE_PORTREVISION_2025.10=1 + MODEL= sifive-fu540 BOARD_CONFIG= sifive_unleashed_defconfig FAMILY= sifive UBOOT_ARCH= riscv64 # The FIT image will embed an OpenSBI firmware binary OPENSBI_FIRM= ${LOCALBASE}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin BUILD_DEPENDS+= ${OPENSBI_FIRM}:sysutils/opensbi MAKE_ENV+= OPENSBI=${OPENSBI_FIRM} UBOOT_MOVE= ${WRKSRC}/spl/u-boot-spl.bin UBOOT_PLIST= u-boot.itb u-boot-spl.bin .include "${MASTERDIR}/Makefile" diff --git a/sysutils/u-boot-sifive-fu740/Makefile b/sysutils/u-boot-sifive-fu740/Makefile index 3902e50d6394..246d78a2219f 100644 --- a/sysutils/u-boot-sifive-fu740/Makefile +++ b/sysutils/u-boot-sifive-fu740/Makefile @@ -1,16 +1,18 @@ MASTERDIR= ${.CURDIR}/../u-boot-master +U_BOOT_SLAVE_PORTREVISION_2025.10=1 + MODEL= sifive-fu740 BOARD_CONFIG= sifive_unmatched_defconfig FAMILY= sifive UBOOT_ARCH= riscv64 # The FIT image will embed an OpenSBI firmware binary OPENSBI_FIRM= ${LOCALBASE}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin BUILD_DEPENDS+= ${OPENSBI_FIRM}:sysutils/opensbi MAKE_ENV+= OPENSBI=${OPENSBI_FIRM} UBOOT_MOVE= ${WRKSRC}/spl/u-boot-spl.bin UBOOT_PLIST= u-boot.itb u-boot-spl.bin .include "${MASTERDIR}/Makefile" diff --git a/sysutils/u-boot-starfive-visionfive2/Makefile b/sysutils/u-boot-starfive-visionfive2/Makefile index 101a17f18a02..7c513886057f 100644 --- a/sysutils/u-boot-starfive-visionfive2/Makefile +++ b/sysutils/u-boot-starfive-visionfive2/Makefile @@ -1,16 +1,18 @@ MASTERDIR= ${.CURDIR}/../u-boot-master +U_BOOT_SLAVE_PORTREVISION_2025.10=1 + MODEL= starfive-visionfive2 BOARD_CONFIG= starfive_visionfive2_defconfig FAMILY= starfive UBOOT_ARCH= riscv64 # The FIT image will embed an OpenSBI firmware binary OPENSBI_FIRM= ${LOCALBASE}/share/opensbi/lp64/generic/firmware/fw_dynamic.bin BUILD_DEPENDS+= ${OPENSBI_FIRM}:sysutils/opensbi MAKE_ENV+= OPENSBI=${OPENSBI_FIRM} UBOOT_MOVE= ${WRKSRC}/spl/u-boot-spl.bin.normal.out UBOOT_PLIST= u-boot.itb u-boot-spl.bin.normal.out .include "${MASTERDIR}/Makefile"