#
…

2021-11-24

01:39yuyichao has joined #asahi-dev
02:17yuyichao has quit [Quit: Konversation terminated!]
02:26yuyichao has joined #asahi-dev
02:26yuyichao has quit []
02:31yuyichao has joined #asahi-dev
02:47grange_c2 has joined #asahi-dev
02:50maz_ has joined #asahi-dev
02:52maz has quit [Ping timeout: 480 seconds]
02:53grange_c has quit [Ping timeout: 480 seconds]
02:53grange_c2 is now known as grange_c
03:17phiologe has quit [Ping timeout: 480 seconds]
03:39kov has quit [Quit: Coyote finally caught me]
03:45flying_sausages has quit [Ping timeout: 480 seconds]
03:52flying_sausages has joined #asahi-dev
05:49marcanrobher_: by the way, do you want to review strictly everything that touches devicetree/bindings, or are you okay with me pushing trivial ones to asahi-soc directly? (thinking of patches that just add SoC/board compatibles and nothing else)
05:50marcan(you'll still get CCed of course, just wondering if you want me to wait for your r-b on those trivial ones or not)
06:39marcan elif 'maxItems' in schema and not 'minItems' in schema:
06:39marcan schema['minItems'] = schema['maxItems']
06:39marcan elif 'minItems' in schema and not 'maxItems' in schema:
06:39marcan schema['maxItems'] = schema['minItems']
06:39marcanwell that took a while to figure out why maxItems: 1 was getting added...
07:11maz_ is now known as maz
07:34marcanPMGR v3 going out now
08:04marcansven: I swear USB is just terribad on macos, even recent versions
08:04marcanmy iMac just decided to not detect my keyboard, and I don't think any device mode shenanigans were involved here
08:05marcanhope with your reset hack all this works properly on Linux :D
08:05sveni'm pretty sure the ports also very occasionally break when they're in host mode
08:05sveni just don't know how to provoke that yet
08:05marcanyeah for me it just happens randomly
08:05svenwhile i can reproduce the device mode fail reliably now
08:06svenas much as i hate the reset hack i'm kinda convinced it's just necessary for this cursed controller at this point
08:10kode54I had to reboot recently due to USB
08:11svensleep should also fix
08:11kode54it stopped detecting my USB microphone and camera, and the onboard audio stopped working too
08:11sventhat's when macOS triggers the dwc3 reset in the atc phy
08:12svenhuh, onboard audio sounds like something unrelated breaking as well
08:14kode54probably needed a coreaudio reset too
08:14kode54I kick that one occasionally with `sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod`
08:15marcanall this macos bugginess is great, we can point it out to all the "Linux will never work as well as macOS" people :p
08:15kode54which I learned from how homebrew kicks it when removing plugins
08:50marcanbtw, the extra 2 ports on the iMac don't work; it detects the PCIe host controller but then it dies
08:50marcanwill poke around
08:51marcanjannau: other than that (which isn't your fault), your DTs seem to work on at least j274, j313 and j456
08:52marcanI'll ack them, just want to poke around this USB issue a bit first
08:58_jannau_could it be related to the cd321x? i.e. missing configuration as host only port
09:13marcanno, it's the xHCI controller dying badly
09:21marcanI suspect it's a problem with interrupt delivery
09:29marcanlooks like at least *one* irq does get delivered...
09:32marcanheh, now it went into an IRQ storm
09:32marcanI sense an issue...
09:36marcanah, this HC is an ASMedia, not a Fresco, so that might explain some differences
09:38mazmarcan: using MSI or INTx?
09:39mazsome controllers have 'interesting' implementations either way...
09:39marcanthis controller already has quirks in xhci-pci, so...
09:39maztry booting with pci=nomsi, just to see...
09:40marcannope, still fails the same way
09:41mazat least it is consistent.
09:42marcanyeah, heh
09:42marcanwell, it's been years since I had to fight xHCI... I guess it was about time it reared its ugly head again.
09:42marcandinner first, though
09:42mazI gave up on xHCI after the Renesas debacle...
09:43marcanwhich one?
09:44mazuPD72020x
09:44marcanwhat did they do? (besides have a secret handshake for their windows driver...)
09:44mazgoes into a very funky state if you program it with a 64bit address and then switch it back to 32bit.
09:44marcan(I wrote the original version of the QEMU virtual xHCI...)
09:45mazit keeps the top bits in some intermediate, non SW visible register, and you start getting page fault in the IOMMU.
09:45mazno amount of resetting can fix it.
09:46mazthe only solution I found was to let the fault happen, and then to reset it. only then you can get a sane state.
10:00kov has joined #asahi-dev
11:09the_lanetly_052___ has joined #asahi-dev
11:18kettenis has quit [Quit: leaving]
11:19kettenis has joined #asahi-dev
11:28skipwich has quit [Remote host closed the connection]
11:33aleasto has joined #asahi-dev
11:57skipwich has joined #asahi-dev
12:35yuyichao has quit [Quit: Konversation terminated!]
12:36yuyichao has joined #asahi-dev
14:03yuyichao has quit [Ping timeout: 480 seconds]
14:18yuyichao has joined #asahi-dev
14:56pg12 has quit [Ping timeout: 480 seconds]
15:05pg12 has joined #asahi-dev
15:51psykose has quit [Remote host closed the connection]
15:56marcanmaz: tl;dr the goddamn thing has RAM firmware, embedded in Apple's *global XHCI driver* of all places
15:56marcanno wonder it didn't process commands with no firmware
15:56marcanevents work though!
15:57amw has quit [Ping timeout: 480 seconds]
16:00kettenisgotta save those 2 cents for an EEPROM!
16:01marcannah, I think they do this because they don't like ROMs because they are places you can hide a backdoor
16:01marcanthey want as much stuff securebooted as possible, and firmware inside macOS implicitly is
16:01marcanflash ROMs, I mean
16:02marcanthe firmware load procedure involves writing the memory address to a PCI config register, then writing 16 bits of data from firmware offset 0 and the top 16 bits coming from firmware offset 8000, to a BAR.
16:02marcanyes, really.
16:04svenand the usb curse strikes again!
16:05marcanI think I'm going to put this on the back burner and revisit it when I get to wifi, which also involves firmware nonsense...
16:05marcanand that'll involve writing firmware extractors into the installer
16:06mazmarcan: it's the bestest. just burn it.
16:06armarcan: the return of the fwcutter
16:06marcanI already found out I have to do that for AVD M3 firmware so...
16:06marcanbut whatever, who cares if we have to load some firmwares out of the recovery dmg and some out of the kernelcache in the installer >_>
16:09marcanah, I see why they used this one instead of the fresco, because this one actually does proper TypeC/Gen2/10G
16:13marcanapparently this likely *is* a 3142, because the 3142 and the 2142... have the same PCI ID. lovely.
16:14kettenissome of the google results suggested it is just a firmware upgrade ;)
16:14marcanyeah, quite likely
16:15marcanI'll buy a random 3142 PCIe card so I can validate how to tell whether the firmware is loaded or not, and that I don't break the Flash-ful ones
16:16the_lanetly_052__ has joined #asahi-dev
16:16marcanarrives today, I love Japan shipping ;)
16:16ketteniswould be interesting to see if Apple uses a custom firmware on not
16:17marcanthere's a RAM readback command, so that should be easy to check
16:22the_lanetly_052___ has quit [Ping timeout: 480 seconds]
16:51squags has quit [Ping timeout: 480 seconds]
17:01squags has joined #asahi-dev
17:09squags has quit [Ping timeout: 480 seconds]
17:15squags has joined #asahi-dev
17:46X-Scale` has joined #asahi-dev
17:49X-Scale has quit [Ping timeout: 480 seconds]
17:52pg12 has quit [Ping timeout: 480 seconds]
18:22pg12 has joined #asahi-dev
18:34the_lanetly_052__ has quit [Ping timeout: 480 seconds]
18:36svenokay, Rtkit command 0xb very likely is “set AP power state”. If you send it with the same state twice rtkit will crash with a message along the lines of “Invalid AP power state”
18:37svenI guess that makes 0x6 “set iop power state” then
18:39svenand 0x7 is the ack for 0x6 and ofc 0xb is the ack for 0xb because who needs consistency anyway
18:56X-Scale has joined #asahi-dev
19:00X-Scale` has quit [Ping timeout: 480 seconds]
19:30___nick___ has joined #asahi-dev
19:30___nick___ has quit []
19:31___nick___ has joined #asahi-dev
20:03yuyichao_ has joined #asahi-dev
20:07yuyichao has quit [Ping timeout: 480 seconds]
20:18klaus has quit [Quit: Lost terminal]
20:22palmer_ has joined #asahi-dev
20:23palmer_ has quit [Remote host closed the connection]
20:44palmer_ has joined #asahi-dev
20:44palmer_ has quit [Remote host closed the connection]
20:45palmer_ has joined #asahi-dev
20:45palmer_ has quit [Remote host closed the connection]
20:52squags_ has joined #asahi-dev
20:58squags has quit [Ping timeout: 480 seconds]
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:47klaus has joined #asahi-dev
22:10yuyichao has joined #asahi-dev
22:10aleasto has quit [Quit: Konversation terminated!]
22:13yuyichao_ has quit [Ping timeout: 480 seconds]
…