#
#asahi-dev · 2022-12-13 02:30
marcanjannau: someone mentioned a race between gdm and DCP (probably). right now the DRM device is only registered asynchronously of the probe function, right?
#asahi-dev · 2022-12-13 00:51
marcan(<32bit writes don't work)
#asahi-dev · 2022-12-13 00:51
marcanthe SD card controller has the opposite problem: it has an issue on Apple machines that the same chips don't seem to have anywhere else
#asahi-dev · 2022-12-13 00:51
marcancyrozap: could possibly be a PCIe issue
#asahi-dev · 2022-12-13 00:03
jannaumarcan: PR with a revert (Aand tracing fixes) in https://github.com/AsahiLinux/linux/pull/90
#asahi-dev · 2022-12-12 22:13
cyrozapThough it may not be strictly necessary.
#asahi-dev · 2022-12-12 22:13
cyrozapAlso, I think it might be easier to trigger the issue with UAS drives.
#asahi-dev · 2022-12-12 22:12
cyrozapUSB. This shouldn't be necessary, since I've been able to trigger the fault with mechanical hard drives on 5 Gbps USB, but maybe it's the fact that, even with the newer firmware, the USB link is now getting saturated (I saw ~973 MB/s on the P5 Plus drive before the system detected the bad write).
#asahi-dev · 2022-12-12 22:12
cyrozapI just managed to trigger the fault on firmware version 210330_70_02_40. When I tried earlier, I was using a cheap USB 3 thumb drive (64 GB, 100 MB/s max read speed) and a Crucial P5 250 GB SSD in a SuperSpeed Plus Gen 2x1 enclosure. This time, instead of the cheap USB drive, I used a Crucial P5 Plus 2 TB SSD in a SuperSpeed Plus Gen 2x1 enclosure, so now both SSDs plugged into the card support 10 Gbps
#asahi-dev · 2022-12-12 21:53
cyrozapI was using the one from macOS 13.0, but I don't think the slight version difference should matter that much since I know the fault can be triggered on even older versions.
#asahi-dev · 2022-12-12 21:38
jannaumy firmware version is the one shipped with macos 12.3
#asahi-dev · 2022-12-12 21:36
cyrozapjannau: Thanks for your help! It's especially interesting to see that you're running a slightly older version than what I have (191118_70_11_08 vs. 191118_70_11_11), and yet haven't encountered the issue. Meanwhile, I've uploaded a much more recent firmware (210330_70_02_40) to my ASM3142 card and haven't been able to trigger the fault yet.
#asahi-dev · 2022-12-12 21:28
jannaucyrozap: fw version is 191118701108, both SSDs (500G / 256G) now completely read without issue
#asahi-dev · 2022-12-12 21:26
cyrozapjannau: Interesting... Would you mind running `dd if=/usr/lib/firmware/asmedia/asm2214a-apple.bin bs=1 skip=128 count=6 2>/dev/null | xxd -ps`? That will print the version of the firmware you have installed.
#asahi-dev · 2022-12-12 21:02
jannaucyrozap: seems to work here without issues, both SSDs copied 70GB with 226MB/s (mac studio, linux 6.1-rc8 + asahi)
#asahi-dev · 2022-12-12 21:01
cyrozapIt'll be interesting to see if this issue happens on Apple hardware, and whether it happens in just Linux or in macOS, too.
#asahi-dev · 2022-12-12 20:51
cyrozapASM3142 firmware version: 191118_70_11_11 (the one I extracted from a kernelcache)
#asahi-dev · 2022-12-12 20:49
cyrozapI've confirmed that the issue still exists even when running the firmware Apple ships. Tested with Linux 6.0.11 on POWER9.
#asahi-dev · 2022-12-12 20:12
sven*them
#asahi-dev · 2022-12-12 20:12
svenif this can be reproduced on macOS I’m pretty sure apple will make then fix it (assuming they haven’t already)
#asahi-dev · 2022-12-12 20:00
cyrozapzzywysm_: Yeah, that's why I'm testing on my ASM3142 card the firmware that Apple ships--I want to see if Apple had them fix the issue in firmware.
#asahi-dev · 2022-12-12 19:53
zzywysm_cyrozap: you may notice that SSDs are far more reliable in Apple hardware than anywhere else, and it's for the same reason
#asahi-dev · 2022-12-12 19:52
zzywysm_cyrozap: there is also the possibility that Apple's hardware qual team found the same bug and made ASMedia fix it for them
#asahi-dev · 2022-12-12 19:41
cyrozapAnd if you _can't_ trigger the fault, I'll be really interested to know about that, since that would mean that the issue likely has something to do specifically with the POWER9 IOMMU or its kernel driver (though this issue doesn't occur with any of the TI or Fresco Logic USB host controllers I've tried).
#asahi-dev · 2022-12-12 19:35
cyrozapI'm not sure if there's a way to enable tracing the DMA buffers (or whatever they're called) allocated by the xHCI driver, but assuming you can successfully trigger the fault, it would be helpful to know what buffer is being overrun (assuming that's what the issue is and the xHC isn't just trying to write to some random address).
#asahi-dev · 2022-12-12 19:25
cyrozapbtw, thanks for helping me look into this!
#asahi-dev · 2022-12-12 19:21
cyrozapdrives into the same host controller, then start two reads from them (`sudo dd if=/dev/sdN of=/dev/null bs=1G iflag=direct status=progress`) as simultaneously as possible. Doing this triggers the issue almost immediately. It also works with USB hard drives, though it may trigger slightly less than immediately.
#asahi-dev · 2022-12-12 19:21
cyrozapmarcan: Firmware version shouldn't matter--I've seen the issue with every ASMedia USB host controller I've tested, from the original ASM1042 through the ASM3142 (it seems I haven't tried the ASM3242 yet). But I'll load the Apple ASM3142 firmware on an ASM3142 card I have here and see if I can trigger the fault, just to be sure. The most reliable way I've found to trigger it is to plug in two USB NVMe
#asahi-dev · 2022-12-12 16:59
mpsncopa: some people already use alpine on m1 for full year
#asahi-dev · 2022-12-12 16:57
mps#asahi-alt is for alternate distro discussions
#asahi-dev · 2022-12-12 16:57
ncopais that #asahi-alt better for that? ^^^
#asahi-dev · 2022-12-12 16:57
ncopa"If you are a developer for a distribution and interested in officially supporting Apple Silicon machines, please get in touch! We’d love to work with you to make it happen." https://asahilinux.org/2022/03/asahi-linux-alpha-release/#can-i-install-other-distros
#asahi-dev · 2022-12-12 16:54
mpsthis is mostly development channel
#asahi-dev · 2022-12-12 16:54
ncopaok. thanks!
#asahi-dev · 2022-12-12 16:53
mpsncopa: join #asahi-alt
#asahi-dev · 2022-12-12 16:51
ncopa> If you are a developer for a distribution and interested in officially supporting Apple Silicon machines, please get in touch!
#asahi-dev · 2022-12-12 16:51
ncopaactually.... Hey (with the intention to get in touch!)
#asahi-dev · 2022-12-12 16:48
ncopaHey (with the intention to run alpine linux with asahi kernel)
#asahi-dev · 2022-12-12 08:25
ChaosPrincessmarcan: mind cherry-picking c5895db and 3e14469 from https://github.com/WhatAmISupposedToPutHere/linux/commits/spi-nor ? Those add the binding for the nvram, so you can have a linux equivalent of `bless`
#asahi-dev · 2022-12-12 07:20
marcanyeah
#asahi-dev · 2022-12-12 07:17
svenso the usb controller breaking there would be very obvious
#asahi-dev · 2022-12-12 07:17
svenoh, macOS would also panic if there’s a dart fault fwiw
#asahi-dev · 2022-12-12 07:15
marcanwe could try running the same firmware as you?
#asahi-dev · 2022-12-12 07:15
marcancyrozap: I saw the zero addr quirk thing. for us, we do get full proper fault addresses, so iff we can reproduce the same problem we might be able to shed light on it
#asahi-dev · 2022-12-12 07:13
svenyeah, dart will complain in dmesg when there’s a fault
#asahi-dev · 2022-12-12 07:03
marcanwe do have IOMMU fault interrupts hooked up as far as I know
#asahi-dev · 2022-12-12 07:03
marcancyrozap: we have a strict IOMMU and haven't seen such issues yet (maybe it doesn't apply to our firmware? I can't imagine Apple shipping broken USB controllers... wait, I can >_>)
#asahi-dev · 2022-12-12 06:29
cyrozapI first wrote about this issue a couple of years ago, but have yet to discover exactly what's going wrong, and where. You can find the original thread where I discussed it here: https://lore.kernel.org/all/CAO3ALPyB1JDvvC27JGgAoTuHh0w+897tPhmTKX9PQWBFCrrnbQ@mail.gmail.com/
#asahi-dev · 2022-12-12 06:28
cyrozapoccurs.
#asahi-dev · 2022-12-12 06:28
cyrozapreproduce the error on POWER9 systems, which have a very strict IOMMU, so I was curious if the same issue affects Apple Silicon systems, which I assume also have a strict IOMMU. Even if the platform doesn't support any kind of capability like EEH (Enhanced Error Handling), where the IOMMU reports misbehaving devices to the OS, it would be interesting to see if any data gets lost or memory corruption

plus ›