Bug 237466 - remove fslsdma device from arm GENERIC file
Summary: remove fslsdma device from arm GENERIC file
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Many People
Assignee: freebsd-arm (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-04-22 12:12 UTC by MIHIRA Sanpei Yoshiro
Modified: 2021-08-04 02:14 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2019-04-22 12:12:04 UTC
armのGENERIC kernelにある、driver fslsdmaですが、firmware loader(sys/arm/freescale/imx/files.imx6のoptional sdma_fw )必要なのにGENERIC kernelに入っていないです。
(armのGENERICに入れるときに忘れたみたい)

firmware fileもライセンスの関係(Linux方面でだれか質問したけどライセンスの回答がきていない)のでsource treeに入れられないみたいなので。fslsdmaは消したほうが良いと思うのですが、



--- sys/arm/conf/GENERIC        (revision 346440)
+++ sys/arm/conf/GENERIC        (working copy)
@@ -252,7 +252,6 @@
 device         ti_mbox

 # DMA controller
-device         fslsdma
 device         ti_sdma
 device         a10_dmac
 device         a31_dmac
Comment 1 MIHIRA Sanpei Yoshiro freebsd_committer freebsd_triage 2019-04-22 12:21:10 UTC
(In reply to MIHIRA Sanpei Yoshiro from comment #0)

Sorry I missed to create this bug rerport.

fslsdms device in arm GENERIC needs firmware loader(sys/arm/freescale/imx/files.imx6 optional sdma_fw). But the current GENERIC file does not have sdma_fw. (I think it was forgotten to add it).

We could not import firmware for fslsdms into source tree(because there is no LICENSE information). 

So I think we remove fslsdms from arm GENERIC file.

--- sys/arm/conf/GENERIC        (revision 346440)
+++ sys/arm/conf/GENERIC        (working copy)
@@ -252,7 +252,6 @@
 device         ti_mbox

 # DMA controller
-device         fslsdma
 device         ti_sdma
 device         a10_dmac
 device         a31_dmac
Comment 2 Warner Losh freebsd_committer freebsd_triage 2019-04-22 15:19:06 UTC
Here's my translation of the Japanese into English (assisted a bit by Google, but Google's translation was terrible so I fixed it, I think).

----
The fslsdma driver is in arm's GENERIC kernel config. However, it also requires the firmware loader (optional sdma_fw) which is not included. It may have been forgotten when GENERIC was created.

There are licensing issues with the firmware needed to make this work. Enquiries with people using Linux have not resolved the issue, so the firmware can't be put into FreeBSD's source tree.

Therefore, I think that it is better to just delete fslsdma from GENERIC.
-----
The attached patch does delete fslsdma from GENERIC. Thank you for the report sanpei-san.
Comment 3 Warner Losh freebsd_committer freebsd_triage 2019-04-22 15:20:16 UTC
(looks like sanpai-san added a better translation between when I noticed the bug report and did the translation myself... Sorry for the duplication)
Comment 4 Ian Lepore freebsd_committer freebsd_triage 2019-04-27 14:55:29 UTC
I belive we can import the firmware, I found enabling licensing info here:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=3123d78e09d2f815de4d94aa35c07b3c0469c80e

It looks to me to be basically a BSD license with some modifications to forbid deecompiling or reverse-engineering.

I started on the work to import the firmware, then got sidetracked by other projects and haven't gotten back to it yet.
Comment 5 Warner Losh freebsd_committer freebsd_triage 2019-04-29 14:11:20 UTC
We should remove it until the firmware import is ready, imho.
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-07-09 17:27:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=9e3761d126c5c019d6c935e83989928eb1a0e76e

commit 9e3761d126c5c019d6c935e83989928eb1a0e76e
Author:     MIHIRA Sanpei Yoshiro <sanpei@FreeBSD.org>
AuthorDate: 2021-07-09 17:12:39 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-07-09 17:21:40 +0000

    arm: remove fslsdma from GENERIC

    The fslsdma device requires sdma_fw, but that's not included in
    GENERIC. That firmware is not in the FreeBSD tree at the moment, but
    could easily be.

    The license for the firmware can be found in the linux firmware repo:
    https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=3123d78e09d2f815de4d94aa35c07b3c0469c80e
    and looks to be a BSD license + no reverse engineer.

    We can add this back after the firmware is imported, made a port, or
    whose automatic loading can be made to happen.

    Reviewed by:            imp (with ian finding the license)
    PR:                     237466
    MFC after:              1 week

 sys/arm/conf/GENERIC | 1 -
 1 file changed, 1 deletion(-)
Comment 7 Ian Lepore freebsd_committer freebsd_triage 2021-07-09 17:35:37 UTC
Ummm... the firmware has been in the tree (in sys/contrib/dev/imx) since r368042, Nov 2020.
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-07-16 18:31:02 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f219c053852d82acb9852cd735c815ba315f416d

commit f219c053852d82acb9852cd735c815ba315f416d
Author:     MIHIRA Sanpei Yoshiro <sanpei@FreeBSD.org>
AuthorDate: 2021-07-09 17:12:39 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-07-16 18:28:44 +0000

    arm: remove fslsdma from GENERIC

    The fslsdma device requires sdma_fw, but that's not included in
    GENERIC. That firmware is not in the FreeBSD tree at the moment, but
    could easily be.

    The license for the firmware can be found in the linux firmware repo:
    https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=3123d78e09d2f815de4d94aa35c07b3c0469c80e
    and looks to be a BSD license + no reverse engineer.

    We can add this back after the firmware is imported, made a port, or
    whose automatic loading can be made to happen.

    Reviewed by:            imp (with ian finding the license)
    PR:                     237466
    MFC after:              1 week

    (cherry picked from commit 9e3761d126c5c019d6c935e83989928eb1a0e76e)

 sys/arm/conf/GENERIC | 1 -
 1 file changed, 1 deletion(-)
Comment 9 Ian Lepore freebsd_committer freebsd_triage 2021-08-03 22:25:15 UTC
(In reply to commit-hook from comment #8)

Warner, can you please revert these two commits (-current and stable/13)?  The firmware has been in-tree since Nov 2020, so it's present in 13 and 14.  It loads correctly when included in GENERIC, as shown by the dmesg snippet below.  While this was a problem when this bug was opened, by time you did the commits to remove the device, the problem had been solved (my bad for not updating the status here and closing it), and the bug just needed to be closed as OBE.

From boot -v dmesg on 14-current GENERIC with 'device fslsdma' added back...

hostuuid: using 20f73267-1dd2-11b2-802b-001f7b540040
ULE: setup cpu 0
ULE: setup cpu 1
ULE: setup cpu 2
ULE: setup cpu 3
firmware: 'sdma-imx6q' version 0: 2196 bytes loaded at 0xc08ea108
snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024]
Comment 10 Warner Losh freebsd_committer freebsd_triage 2021-08-04 02:09:43 UTC
(In reply to Ian Lepore from comment #9)
Sure. I thought I'd asked and was told it wasn't. I'm happy to revert. Sorry about that. Sorry I missed your comment a month ago too. I'm not sure how that happened. I should have been cc'd.
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-08-04 02:11:38 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e94f1a0a37fdd3252201aaa5a94f46da7f8e740e

commit e94f1a0a37fdd3252201aaa5a94f46da7f8e740e
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-08-04 02:09:18 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-08-04 02:10:32 +0000

    Revert "arm: remove fslsdma from GENERIC"

    The firmware was already in the tree when I did this commit, and I
    missed the message. The bug was obsolete.

    This reverts commit 9e3761d126c5c019d6c935e83989928eb1a0e76e.

    PR:             237466
    Sponsored by:   Netflix

 sys/arm/conf/GENERIC | 1 +
 1 file changed, 1 insertion(+)
Comment 12 commit-hook freebsd_committer freebsd_triage 2021-08-04 02:14:40 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=efc3ebeb69383a9b54f2670d8f705fd2410904b4

commit efc3ebeb69383a9b54f2670d8f705fd2410904b4
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-08-04 02:09:18 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-08-04 02:12:22 +0000

    Revert "arm: remove fslsdma from GENERIC"

    The firmware was already in the tree when I did this commit, and I
    missed the message. The bug was obsolete.

    This reverts commit 9e3761d126c5c019d6c935e83989928eb1a0e76e.

    The commit was f219c053852d82acb9852cd735c815ba315f416d in stable/13.

    PR:             237466
    Sponsored by:   Netflix

    (cherry picked from commit e94f1a0a37fdd3252201aaa5a94f46da7f8e740e)

 sys/arm/conf/GENERIC | 1 +
 1 file changed, 1 insertion(+)