From owner-svn-ports-head@freebsd.org Thu Feb 4 15:27:40 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F7BC5468A2; Thu, 4 Feb 2021 15:27:40 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DWj983b99z4VR2; Thu, 4 Feb 2021 15:27:40 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E0215DD7; Thu, 4 Feb 2021 15:27:40 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 114FRees034555; Thu, 4 Feb 2021 15:27:40 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 114FRdcr034548; Thu, 4 Feb 2021 15:27:39 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202102041527.114FRdcr034548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Thu, 4 Feb 2021 15:27:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r564036 - in head/sysutils: opensbi opensbi/files u-boot-sifive-fu540 X-SVN-Group: ports-head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sysutils: opensbi opensbi/files u-boot-sifive-fu540 X-SVN-Commit-Revision: 564036 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2021 15:27:40 -0000 Author: mhorne (src committer) Date: Thu Feb 4 15:27:38 2021 New Revision: 564036 URL: https://svnweb.freebsd.org/changeset/ports/564036 Log: sysutils/opensbi: update to v0.9 This change adds a patch to disable the PMP for the sifive/fu540 target, which is a workaround to a PMP errata in the chip. The OpenSBI update itself is quite minor. Bump the dependent port, sysutils/u-boot-sifive-fu540. Reviewed by: lwhsu, kp Approved by: lwhsu (ports) Tested by: Klaus Küchemann (maciphone2@googlemail.com) Differential Revision: https://reviews.freebsd.org/D28471 Added: head/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c (contents, props changed) head/sysutils/opensbi/files/patch-platform_generic_platform.c (contents, props changed) head/sysutils/opensbi/files/patch-platform_sifive_fu540_platform.c (contents, props changed) Deleted: head/sysutils/opensbi/files/patch-Makefile Modified: head/sysutils/opensbi/Makefile head/sysutils/opensbi/distinfo head/sysutils/opensbi/pkg-plist head/sysutils/u-boot-sifive-fu540/Makefile Modified: head/sysutils/opensbi/Makefile ============================================================================== --- head/sysutils/opensbi/Makefile Thu Feb 4 15:13:23 2021 (r564035) +++ head/sysutils/opensbi/Makefile Thu Feb 4 15:27:38 2021 (r564036) @@ -2,7 +2,7 @@ PORTNAME= opensbi DISTVERSIONPREFIX=v -DISTVERSION= 0.8 +DISTVERSION= 0.9 CATEGORIES= sysutils MAINTAINER= mhorne@FreeBSD.org Modified: head/sysutils/opensbi/distinfo ============================================================================== --- head/sysutils/opensbi/distinfo Thu Feb 4 15:13:23 2021 (r564035) +++ head/sysutils/opensbi/distinfo Thu Feb 4 15:27:38 2021 (r564036) @@ -1,3 +1,3 @@ -TIMESTAMP = 1592679770 -SHA256 (riscv-opensbi-v0.8_GH0.tar.gz) = 17e048ac765e92e15f7436b604452614cf88dc2bcbbaab18cdc024f3fdd4c575 -SIZE (riscv-opensbi-v0.8_GH0.tar.gz) = 172450 +TIMESTAMP = 1610993580 +SHA256 (riscv-opensbi-v0.9_GH0.tar.gz) = 60f995cb3cd03e3cf5e649194d3395d0fe67499fd960a36cf7058a4efde686f0 +SIZE (riscv-opensbi-v0.9_GH0.tar.gz) = 189688 Added: head/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c Thu Feb 4 15:27:38 2021 (r564036) @@ -0,0 +1,19 @@ +--- lib/sbi/sbi_hart.c.orig 2021-01-30 20:30:32 UTC ++++ lib/sbi/sbi_hart.c +@@ -188,6 +188,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_gran_log2 = log2roundup(sbi_hart_pmp_granularity(scratch)); + pmp_bits = sbi_hart_pmp_addrbits(scratch) - 1; + pmp_addr_max = (1UL << pmp_bits) | ((1UL << pmp_bits) - 1); Added: head/sysutils/opensbi/files/patch-platform_generic_platform.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/opensbi/files/patch-platform_generic_platform.c Thu Feb 4 15:27:38 2021 (r564036) @@ -0,0 +1,11 @@ +--- platform/generic/platform.c.orig 2021-01-30 20:29:48 UTC ++++ platform/generic/platform.c +@@ -22,6 +22,8 @@ + #include + #include + ++int need_pmp_war = FALSE; ++ + extern const struct platform_override sifive_fu540; + + static const struct platform_override *special_platforms[] = { Added: head/sysutils/opensbi/files/patch-platform_sifive_fu540_platform.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/opensbi/files/patch-platform_sifive_fu540_platform.c Thu Feb 4 15:27:38 2021 (r564036) @@ -0,0 +1,10 @@ +--- platform/sifive/fu540/platform.c.orig 2021-01-30 20:28:07 UTC ++++ platform/sifive/fu540/platform.c +@@ -20,6 +20,7 @@ + #include + + /* clang-format off */ ++int need_pmp_war = TRUE; + + #define FU540_HART_COUNT 5 + Modified: head/sysutils/opensbi/pkg-plist ============================================================================== --- head/sysutils/opensbi/pkg-plist Thu Feb 4 15:13:23 2021 (r564035) +++ head/sysutils/opensbi/pkg-plist Thu Feb 4 15:27:38 2021 (r564036) @@ -11,6 +11,7 @@ include/sbi/sbi_bitops.h include/sbi/sbi_console.h include/sbi/sbi_const.h include/sbi/sbi_csr_detect.h +include/sbi/sbi_domain.h include/sbi/sbi_ecall.h include/sbi/sbi_ecall_interface.h include/sbi/sbi_emulate_csr.h @@ -36,6 +37,7 @@ include/sbi/sbi_trap.h include/sbi/sbi_types.h include/sbi/sbi_unpriv.h include/sbi/sbi_version.h +include/sbi_utils/fdt/fdt_domain.h include/sbi_utils/fdt/fdt_fixup.h include/sbi_utils/fdt/fdt_helper.h include/sbi_utils/ipi/fdt_ipi.h Modified: head/sysutils/u-boot-sifive-fu540/Makefile ============================================================================== --- head/sysutils/u-boot-sifive-fu540/Makefile Thu Feb 4 15:13:23 2021 (r564035) +++ head/sysutils/u-boot-sifive-fu540/Makefile Thu Feb 4 15:27:38 2021 (r564036) @@ -2,6 +2,8 @@ MASTERDIR= ${.CURDIR}/../u-boot-master +U_BOOT_SLAVE_PORTREVISION_2020.10= 1 + MODEL= sifive-fu540 BOARD_CONFIG= sifive_fu540_defconfig FAMILY= sifive