From nobody Tue Oct 10 17:03:08 2023 X-Original-To: freebsd-riscv@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S4j0N2HfSz4x36k for ; Tue, 10 Oct 2023 17:03:32 +0000 (UTC) (envelope-from csgordon@fastmail.com) Received: from wnew4-smtp.messagingengine.com (wnew4-smtp.messagingengine.com [64.147.123.18]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4S4j0N0GVqz4flK for ; Tue, 10 Oct 2023 17:03:32 +0000 (UTC) (envelope-from csgordon@fastmail.com) Authentication-Results: mx1.freebsd.org; none Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 239FD2B001E4; Tue, 10 Oct 2023 13:03:30 -0400 (EDT) Received: from imap53 ([10.202.2.103]) by compute2.internal (MEProxy); Tue, 10 Oct 2023 13:03:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1696957409; x=1696958009; bh=kO wko5x15tZj9RS0lI9Hw4CzT8BuQ/J86zBd/KMms5Q=; b=aXY8FLlt2MMcbHYzug yB3hIfR1Id5mcIFBHRaO4NMerks7QMFLAYHRnagjhFF5Wr4oMrZgv8daYlB0Qic3 uKnu8xKGj556kBSuCW0bqNA+YGo2rYN2LV6bpjZrQVKUAH06Q1QK1oZCLXoEEIhx /lzE8wBLkH1Sd+otMNYE+mH2wkPrjKSMnLQTjkEVtcMLXL1YjO+gbu+urtFfewjB 9JiCpCdZoBMu8pUYcp16Fa7czKsjQNZQ8/darpvzXi+VqC7iTFE0hoKzdBHc8mFT nM/QtpSisBsLsgfQHex74onXRfpfSizrsbCBd0lTmBiwp9muRUXeflba5TzKCh1S Rtkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=i60c149f6.fm2; t=1696957409; x=1696958009; bh=kOw ko5x15tZj9RS0lI9Hw4CzT8BuQ/J86zBd/KMms5Q=; b=KtKAZRjriECBJntpdao GMR9G4Pu9BQo779DkOHmZsC8o88N3YzPUMyMKJFPrDohbNxP9eqADhtcgg6ZUjSg k5ZBCjhvkOe3nf4oeqEUoiLet3Z8w2dTj2eg8+yBGJWXxm2AZN5O5yDGRJRzsyhc rf69VP6q1Fy37H8SgPgWrQRSg/AhsiuW/fSKyL3056CXOlgZIviMuSKg8cj+NUuK kT841DWv5O1RzE1fkliEZ9cM/OcY/NULIGrponuxfCKaD6GwCd21FJS8Owd9QQIg OerR6Wqb2wlaIyLVmEjq8X6iOKKjQdF1glxOfxrM3HpMfHB5VDdsOeUZPpdaiFYC /8g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheehgddutdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesrgdtreerreertdenucfhrhhomhepfdevohhl ihhnucfurdcuifhorhguohhnfdcuoegtshhgohhrughonhesfhgrshhtmhgrihhlrdgtoh hmqeenucggtffrrghtthgvrhhnpeefueefteektdefgeegudetieegtdfgffdvhfejieej veelgffgudegjedtheeiueenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomheptghsghhorhguohhnsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i60c149f6:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2AC703640066; Tue, 10 Oct 2023 13:03:29 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1019-ged83ad8595-fm-20231002.001-ged83ad85 List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-riscv@freebsd.org X-BeenThere: freebsd-riscv@freebsd.org MIME-Version: 1.0 Message-Id: <6c0ddf11-b9c9-4861-affc-7f21e82df755@app.fastmail.com> In-Reply-To: References: <55416c03-c838-46d5-8f18-f6eb1657f4a5@app.fastmail.com> <7f59abe7-11ee-4efe-9688-28e5722fec9a@app.fastmail.com> Date: Tue, 10 Oct 2023 12:03:08 -0500 From: "Colin S. Gordon" To: "JMT Sihvola" , freebsd-riscv@freebsd.org Subject: Re: StarFive VisionFive 2 support Content-Type: multipart/alternative; boundary=45102aa67e8d43f5a0e4bf4e18079fc8 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Queue-Id: 4S4j0N0GVqz4flK --45102aa67e8d43f5a0e4bf4e18079fc8 Content-Type: text/plain I agree some clarity on the licensing issue would be nice. It seems clear that GPL-only licensed code isn't allowed in the kernel, but if MIT-licensed code (and dual-licensed including an MIT option) is then that would simplify things greatly. I currently don't have proper clock support, though it looks like that part of your work is under BSD, so I'll grab that rather than writing my own from scratch. I haven't hit the DMA bug you noted yet, but I also haven't really done much with the filesystem yet (in particular, I haven't done much *writing* to the disk yet, just basic tests, and haven't built install media yet --- bsdinstall fails for me currently because it can't create files it wants in a read-only memory disk). I guess the other operative question is: which dtb are you using? I see you have one checked in --- where did it come from? OpenBSD for a while only supported one particular dtb which was *not* one of the ones from the StarFive public releases on Github, and I've been working with the one that I know works for OpenBSD. I can trace lookup failure for the biu and ciu clocks through to a missing property in the dtb I'm using (#clock-names) and then to some kind of misinterpretation I haven't debugged yet when I manually add that property to the mmc nodes. -Colin On Tue, Oct 10, 2023, at 10:16, JMT Sihvola wrote: > > Colin S. Gordon wrote: > >I see some GPL and MIT license headers in your current changes, which I'm trying to avoid, but I'll gladly build on some of the BSD-licensed > changes. > > So far I've not quite grasped what is FreeBSD's stance on this issue. > Some of my question on IRC have gone unanswered but I've got a picture > that some dual-licensed files are used as such. I myself extracted > some of the most important header code and used it under MIT > license (naturally giving credits to the original author). > > Colin S. Gordon wrote: > >It looks like I did at least partly duplicate your work with the dwmmc driver(https://github.com/csgordon/freebsd-starfive2/commit/fd7 > >00cd60e466bacfd60c1dcc3b4 [github.com]), which I mostly adapted from one of the existing drivers. I'll also take a look at M. Horne's code, I wasn't aware of that myself. > > Oddly enough, for me MMC didn't require any additional code beyond offering > clocks, (maybe the reset driver) and fixing that DMA bug which was > initially reported here: > https://reviews.freebsd.org/D34118 > > ...and which I re-reported here: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273694 > > I don't recall having any issues with biu and ciu clocks, so I'm not > sure what that is about. > > -Jari > > --45102aa67e8d43f5a0e4bf4e18079fc8 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
I agree so= me clarity on the licensing issue would be nice. It seems clear that GPL= -only licensed code isn't allowed in the kernel, but if MIT-licensed cod= e (and dual-licensed including an MIT option) is then that would simplif= y things greatly.

I currently don't have pr= oper clock support, though it looks like that part of your work is under= BSD, so I'll grab that rather than writing my own from scratch. I haven= 't hit the DMA bug you noted yet, but I also haven't really done much wi= th the filesystem yet (in particular, I haven't done much *writing* to t= he disk yet, just basic tests, and haven't built install media yet --- b= sdinstall fails for me currently because it can't create files it wants = in a read-only memory disk).

I guess the ot= her operative question is: which dtb are you using? I see you have one c= hecked in --- where did it come from? OpenBSD for a while only supported= one particular dtb which was *not* one of the ones from the StarFive pu= blic releases on Github, and I've been working with the one that I know = works for OpenBSD. I can trace lookup failure for the biu and ciu clocks= through to a missing property in the dtb I'm using (#clock-names) and t= hen to some kind of misinterpretation I haven't debugged yet when I manu= ally add that property to the mmc nodes.

-C= olin

On Tue, Oct 10, 2023, at 10:16, JMT Si= hvola wrote:

Colin S. Gordon wrote:
>I see some GPL= and MIT license headers in your current changes, which I'm trying to av= oid, but I'll gladly build on some of the BSD-licensed
cha= nges.

So far I've not quite grasped what is= FreeBSD's stance on this issue.
Some of my question on IR= C have gone unanswered but I've got a picture
that some du= al-licensed files are used as such. I myself extracted
som= e of the most important header code and used it under MIT
= license (naturally giving credits to the original author).

Colin S. Gordon wrote:
>It looks like I= did at least partly duplicate your work with the dwmmc driver(https://githu= b.com/csgordon/freebsd-starfive2/commit/fd7
>00cd60= e466bacfd60c1dcc3b4 [github.com]), which I mostly adapted from one of th= e existing drivers.  I'll also take a look at M. Horne's code, I wa= sn't aware of that myself.

Oddly enough, fo= r me MMC didn't require any additional code beyond offering 
clocks, (maybe the reset driver) and fixing that DMA bug which w= as 
initially reported here:

...and which I re-reported here:

I don't recall having any issues with biu and= ciu clocks, so I'm not
sure what that is about.
=

-Jari



--45102aa67e8d43f5a0e4bf4e18079fc8--