ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
shunsuke has joined #asahi-dev
shunsuke has quit [Ping timeout: 480 seconds]
shunsuke has joined #asahi-dev
shunsuke has quit [Ping timeout: 480 seconds]
shunsuke has joined #asahi-dev
Dementor has quit [Read error: Connection reset by peer]
Dementor has joined #asahi-dev
shunsuke has quit [Ping timeout: 480 seconds]
shunsuke has joined #asahi-dev
stipa is now known as Guest5516
stipa has joined #asahi-dev
shunsuke has quit [Ping timeout: 480 seconds]
Guest5516 has quit [Ping timeout: 480 seconds]
shunsuke has joined #asahi-dev
kesslerd_ has joined #asahi-dev
shunsuke has quit [Ping timeout: 480 seconds]
kesslerd has quit [Ping timeout: 480 seconds]
DarkShadow4444 has quit [Ping timeout: 480 seconds]
zef has joined #asahi-dev
shunsuke has joined #asahi-dev
zef_ has quit [Ping timeout: 480 seconds]
DarkShadow44 has joined #asahi-dev
shunsuke has quit [Ping timeout: 480 seconds]
hightower3 has joined #asahi-dev
hightower2 has quit [Ping timeout: 480 seconds]
shunsuke has joined #asahi-dev
zef_ has joined #asahi-dev
zef has quit [Ping timeout: 480 seconds]
Dementor9 has joined #asahi-dev
Dementor has quit [Ping timeout: 480 seconds]
Dementor9 is now known as Dementor
shunsuke has quit [Ping timeout: 480 seconds]
shunsuke has joined #asahi-dev
shunsuke has quit [Ping timeout: 480 seconds]
cylm has joined #asahi-dev
shunsuke has joined #asahi-dev
VinDuv has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
VinDuv has joined #asahi-dev
zalyx has quit [Quit: later alligator]
zalyx has joined #asahi-dev
<bluetail5>
can you ask for an update?
<sven>
jannau: huh, so if I connect my usb4 hub to my half-broken caldigit dock to my working caldigit dock I think I can very rarely reproduce that "entire BAR reads as -1" issue on the xhci controller in the second dock
<sven>
maybe in like 1 out of 10-15 connections
bisko has joined #asahi-dev
<jannau>
sven: it's 100% with the samsung nvme both connected directly and through the dock.
<jannau>
reproducible with the samsung 970 evo (sans Plus, afaik just different nand) from my thinkpad
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sven>
i have some local code that applies the tunables from linux in the correct sequence now but i'm not sure that'll help
<sven>
otherwise I think tracing what macos does to the pcie MMIO and the config space and comparing to linux might uncover another magic bit
<sven>
oh, or maybe we need some of those hidden tunables lina found for the gpu for atc and apciec as well
<bluetail5>
sven CalDigit... ? I had the tb4 model and under macOS, I had this dock, trying to run 4 ssds in raid 0 (stripeset). And when I then benchmarked the drive, I got an immediate kernel panic and the system rebooted. Not to mention - that unit was running super hot.
<sven>
i have the tb3 variant and that one works quite well on both macos and linux now
<sven>
and i bet my half-broken one just has some cold solder joints on the connection between the two pcbs it seems to have
nyilas has joined #asahi-dev
MajorBiscuit has joined #asahi-dev
darkapex1 has joined #asahi-dev
darkapex has quit [Read error: Connection reset by peer]
tobhe_ has joined #asahi-dev
tobhe has quit [Ping timeout: 480 seconds]
jnn is now known as jn
nyilas has quit [Remote host closed the connection]
nyilas has joined #asahi-dev
nyilas has quit [Remote host closed the connection]
nyilas has joined #asahi-dev
nyilas has quit [Remote host closed the connection]
kesslerd_ has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
<jannau>
sven: "Timing buffered disk reads: 8824 MB in 3.00 seconds = 2941.07 MB/sec" with a Titan Ridge based nvme enclosure with a PCIev3 x4 link
<sven>
\o/
<sven>
should be more than 20gbps which requires lane bonding :)
kesslerd_ has joined #asahi-dev
kesslerd has quit [Remote host closed the connection]
kesslerd_ has quit [Read error: Connection reset by peer]
<jannau>
23.5gbps netto. samsung nvme doesn't work with titan ridge either. so running out of easy tests
shunsuke has quit [Ping timeout: 480 seconds]
kesslerd has joined #asahi-dev
kesslerd has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
shunsuke has joined #asahi-dev
stipa is now known as Guest5558
stipa has joined #asahi-dev
Guest5558 has quit [Ping timeout: 480 seconds]
nyilas has joined #asahi-dev
shunsuke has quit [Ping timeout: 480 seconds]
nyilas has quit [Quit: nyilas]
shunsuke has joined #asahi-dev
<sven>
that issue still confuses me
<sven>
from what I can tell my port init is very similar to what xnu does
<sven>
I’ll push what i currently have with the tunables but I doubt that makes a difference
bisko has joined #asahi-dev
<jannau>
I'm still confused by the serror in the HV when reading the BAR, the nvme should be powered
<sven>
yeah, that’s also very strange
<sven>
I’ve never had a serror reading in that area as long as pcie is powered up
<sven>
maybe do what pci_enable_dev does manually?
<sven>
I think that one just flips a few bits in one config register
<jannau>
with the device enabled I read all 0xffffffff in the HV
eiln has quit [Remote host closed the connection]
<sven>
ok, so that means that BAR is inactive for sone reason
<sven>
but no idea how to debug this :-(
hightower3 has quit [Ping timeout: 480 seconds]
nyilas has joined #asahi-dev
<jannau>
does someone know if `dd bs=8M if=/dev/rdiskN of=/dev/null` is a valid sequential read spped test on macos?
<jannau>
the thunderbolt nvmes are considerably slower on macos. more than I would attribute to macos is bad compared to linux
<jannau>
with the x4 nvme it's 2.8 GB/s vs. 1.9 GB/s
<jannau>
with the x2 enclosure it is 1.5 vs. 1.2 GB/s
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nyilas has quit [Remote host closed the connection]
bisko has joined #asahi-dev
nyilas has joined #asahi-dev
hightower2 has joined #asahi-dev
<maz>
jannau: the cost of userspace drivers?
gladiac has joined #asahi-dev
eiln has joined #asahi-dev
stipa is now known as Guest5565
stipa has joined #asahi-dev
Guest5565 has quit [Read error: Connection reset by peer]
Glanzmann has joined #asahi-dev
<Glanzmann>
jannau: I tested on macos m1 air and compared to a amd64 with a kingston usb stick and get the same numbers, so yes your speedtest is valid: https://pbot.rmdir.de/dGb3Mf4-BvsrQ2IA7gM5xw
<sven>
I’m not gonna complain that nvme via thunderbolt is much faster on Linux for some reason :D
<Glanzmann>
c
<sven>
wouldn’t surprise if the nvme driver is just much more optimized on Linux fwiw
<sven>
hmm.. I wonder if we can easily hack lspci to read from a file when it wants to read the config space
<sven>
might be interesting to see if anything suspicious shows up when running xnu
<sven>
-F <file>Read PCI configuration dump from a given file
<sven>
:D
<sven>
jannau: ^-- can you try to dump the pci config space when running xnu and with that nvme connected and then parse it using lspci?
<sven>
hrm... actually.. looks like it doesn't just take a raw dump :/
<jannau>
it seems to parse lspci -x, shouldn't be hard to replicate
<jannau>
not sure how it works with the extended PCIe config space, dumped via lspci -xxxx
<sven>
btw. the issue with that xhci controller not working was just linux bus resource allocation here (pci 0000:30:00.0: BAR 0: failed to assign [mem size 0x00008000 64bit]) and not the issue that you see with that nvme device
<sven>
also, lspci -xxxx seems to somehow trigger the pcie hotplug interrupt on this usb4 hub 🙃
<maz>
man, TB is soooo much fun! :D
kesslerd has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
stipa is now known as Guest5568
stipa has joined #asahi-dev
<sven>
all those obscure bugs of undocumented pcie, thunderbolt, usb and phy hardware combined!
Guest5568 has quit [Ping timeout: 480 seconds]
bluetail51 has joined #asahi-dev
bluetail5 has quit [Ping timeout: 480 seconds]
mkurz has quit [Ping timeout: 480 seconds]
<jannau>
BAR is readable in the HV with macos booted, mem address is identical
kesslerd has quit [Quit: Leaving]
kesslerd has joined #asahi-dev
hightower2 has quit [Ping timeout: 480 seconds]
kesslerd has quit [Quit: Konversation terminated!]
kesslerd has joined #asahi-dev
kesslerd has quit []
kesslerd has joined #asahi-dev
kesslerd has quit []
kesslerd has joined #asahi-dev
kesslerd has quit [Remote host closed the connection]
kesslerd has joined #asahi-dev
mkurz has joined #asahi-dev
<sven>
can you dump the port MMIO Region and compare it?
Glanzmann has quit [Quit: EOF]
<sven>
maybe there’s just another magic bit like the one that enables prefetchable memory somewhere
shunsuke has quit [Quit: WeeChat 3.8]
hightower2 has joined #asahi-dev
MajorBiscuit has quit [Quit: WeeChat 3.6]
<jannau>
doesn't look like there's a significant difference if we ignore the first 36 bytes: tbt_samsung_970_evo_port0_dump.txt
<jannau>
a little surprised that APPCLK_CGDIS is set in the macos dump
<jannau>
let me format/mount the ssd
cylm has quit [Ping timeout: 480 seconds]
zef has joined #asahi-dev
zef_ has quit [Ping timeout: 480 seconds]
kode54 has quit [Quit: Ping timeout (120 seconds)]
kode54 has joined #asahi-dev
gladiac has quit [Quit: k thx bye]
<sven>
did you mean the upload that txt file? :D
<sven>
iirc the usb4 pcie also keeps the refclk off