FreeBSD on Layerscape/QorIQ LX2160X
greg at unrelenting.technology
greg at unrelenting.technology
Tue May 19 20:58:10 UTC 2020
May 19, 2020 11:36 PM, "Dan Kotowski" <dan.kotowski at a9development.com> wrote:
>> Looking at NetBSD code, we might need to implement support for the custom NXP0016 config device:
>>
>> https://github.com/NetBSD/src/commit/1a0fb037e62e4e3472966e33588957919b5e3a97
>>
>> 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 no problem :D
>
> Would you be able to share any patches and kernconfs you're working from 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 versions! :)
I have linked to the SDHCI commit on my github, from there you can just navigate to all commits:
https://github.com/myfreeweb/freebsd/commits/master
Only SDHCI and I2C are relevant, everything else is general stuff in my fork,
there's some optimizations pulled from phabricator, cleanup, minimal modular 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/show_bug.cgi?id=246552):
--- i/sys/arm64/arm64/machdep.c
+++ w/sys/arm64/arm64/machdep.c
@@ -1007,9 +1007,14 @@ bus_probe(void)
has_fdt = (OF_peer(0) != 0);
#endif
#ifdef DEV_ACPI
- has_acpi = (acpi_find_table(ACPI_SIG_SPCR) != 0);
+ has_acpi = true; // (acpi_find_table(ACPI_SIG_DSDT) != 0);
#endif
+ for (int i = 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 = kern_getenv("kern.cfg.order");
if (env != NULL) {
order = env;
but I'm not sure whether it's necessary on your machine (please test without again!)
and it's odd that I haven't seen these printfs in your logs..
More information about the freebsd-arm
mailing list