Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2020 21:47:08 +0000
From:      Dan Kotowski <dan.kotowski@a9development.com>
To:        "greg@unrelenting.technology" <greg@unrelenting.technology>
Cc:        Marcin Wojtas <mw@semihalf.com>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: FreeBSD on Layerscape/QorIQ LX2160X
Message-ID:  <V-BinCCW40oe9epmCy3PPRne_2Fw2dkKUkYizp8YjBU4vUjs7Q5v07m1nJ_rh_CLEfxWgYhYNbQ0_qIRIJ6ombUQ51U9zm0xsveNNH_JstM=@a9development.com>
In-Reply-To: <86119565e5927716a9feebabcb611871@unrelenting.technology>
References:  <JXdx2L0dNn6BmD5KjF5iCCkc-z3xUH-gPmRZGiF4TCDESdw2lmPGWJNuOQWsxoE9Eumz8bFoXkrgr0rxkm9RCxCIw6fF3NrwSQFvsLtOSsY=@a9development.com> <947c2f9bfaad823a2b104b8741502b40@unrelenting.technology> <c88780825e96fe583b32adf86416706e@unrelenting.technology> <d709b1aae3d33f49fadcce9817cb102a@unrelenting.technology> <LqTdXCGMiTFwSobCq9LtV5QVLOZ42AiBDUTC9UrdM67cUlD_I8Y7no-8F7d_vs3VDJwIFJLgHTSZVrbkIXXeZ_-hcU0FxfWj0dr-GvhKXHA=@a9development.com> <b04385d558850dc1dfa60fc398c9ac6c@unrelenting.technology> <CAPv3WKdyOzegfK4NJjKzXQTp9jGV9VkDRWxY%2BhDudzWQKkRfEQ@mail.gmail.com> <3e81db774e0fc1a3c2251c89b7629e1b@unrelenting.technology> <86119565e5927716a9feebabcb611871@unrelenting.technology>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > Looking at NetBSD code, we might need to implement support for the cu=
stom NXP0016 config device:
> > > https://github.com/NetBSD/src/commit/1a0fb037e62e4e3472966e3358895791=
9b5e3a97
> > > I'll have time to attempt a blind port of that code next week :D
> > > There is a way to get any stock OS (even Windows!) to work with this =
PCIe controller,
> > > but it involves awful hacks and legacy interrupts, unacceptable stuff=
:
> > > https://twitter.com/linux4kix/status/1260946442346205184
> > > so you'll have to wait for now.
> >
> > I've waited this many months to finally get this far, another week is n=
o problem :D
> > Would you be able to share any patches and kernconfs you're working fro=
m so I have a frame of
> > reference? My own dev skills are certainly nowhere near yours, but I'd =
like to at least read
> > through the code you've applied to get us this far and maybe even learn=
 something new along the
> > way.
>
> Most of what got you "far" is upgrading the firmware to the latest dev ve=
rsions! :)
>
> I have linked to the SDHCI commit on my github, from there you can just n=
avigate to all commits:
> https://github.com/myfreeweb/freebsd/commits/master
>
> Only SDHCI and I2C are relevant, everything else is general stuff in my f=
ork,
> there's some optimizations pulled from phabricator, cleanup, minimal modu=
lar amd64 config,
> Pixelbook devices, various other WIPs and unmerged patches, etc.
>
> The changes relevant to ARM64 in general are:
> https://reviews.freebsd.org/D24423
> https://reviews.freebsd.org/D21017
> https://reviews.freebsd.org/D20974
> https://reviews.freebsd.org/D20835
>
> And what's not on github is this (for https://bugs.freebsd.org/bugzilla/s=
how_bug.cgi?id=3D246552):
>
> --- i/sys/arm64/arm64/machdep.c
> +++ w/sys/arm64/arm64/machdep.c
> @@ -1007,9 +1007,14 @@ bus_probe(void)
> has_fdt =3D (OF_peer(0) !=3D 0);
> #endif
> #ifdef DEV_ACPI
>
> -         has_acpi =3D (acpi_find_table(ACPI_SIG_SPCR) !=3D 0);
>
>
>
> -         has_acpi =3D true; // (acpi_find_table(ACPI_SIG_DSDT) !=3D 0);
>
>
>
> #endif
>
> -         for (int i =3D 0; i < 4; i++) {
>
>
> -         printf("spcr %lu\\n", acpi_find_table(ACPI_SIG_SPCR));
>
>
> -         printf("dsdt %lu\\n", acpi_find_table(ACPI_SIG_DSDT));
>
>
> -         }
>
>
> -         env =3D kern_getenv("kern.cfg.order");
>           if (env !=3D NULL) {
>                   order =3D env;
>
>
>
> but I'm not sure whether it's necessary on your machine (please test with=
out again!)
> and it's odd that I haven't seen these printfs in your logs..

NVMe gumstick installed, didn't even get to a shell before kernel panic:

https://gist.github.com/agrajag9/92385331633a7b42fa310b8d33d1a765

I spent some time looking at that NetBSD Layerscape code - I couldn't figur=
e out how to add it trivially to the current HEAD on my own, so I'm looking=
 forward to seeing how we're going to yeet that in for testing...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?V-BinCCW40oe9epmCy3PPRne_2Fw2dkKUkYizp8YjBU4vUjs7Q5v07m1nJ_rh_CLEfxWgYhYNbQ0_qIRIJ6ombUQ51U9zm0xsveNNH_JstM=>