#
…

2022-04-10

00:10yamii has quit [Quit: WeeChat 3.3]
00:11amarioguy has quit [Remote host closed the connection]
00:11yamii has joined #asahi-re
02:21nicolas17 has quit [Quit: Konversation terminated!]
02:21nicolas17 has joined #asahi-re
02:47Retr0id has joined #asahi-re
02:53phiologe has joined #asahi-re
02:56PhilippvK has quit [Ping timeout: 480 seconds]
03:07jakebot has quit [Quit: The Lounge - https://thelounge.chat]
03:07jakebot has joined #asahi-re
03:41rqou_anyone got an aarch64 opcode map reference guide?
03:42rqou_apparently i need to fix "HV: store not emulated: 0xad008901"
03:44rqou_... or not, apparently simd regs aren't even available in exc_info
03:45rqou_hey marcan how hard would it be for you to fix this?
04:02nicolas17 has quit [Quit: Konversation terminated!]
04:31user982492 has joined #asahi-re
04:36phirerqou_ Lina was actually working on this problem on yesterday's stream.
04:37rqou_i missed that
04:37rqou_has the code been pushed yet?
04:38phireImplemented the 256bit reads/writes, then ran into a pathological problem with reads split across pages. So not pushed
04:39rqou_i added a hack for just the opcodes i need for now, which seems to not crash in my case
05:00phireshould work if the thing you are tracing is page aligned. It only runs into issues if a read/store starts on a previous non-traced page, and overflows into the page you are tracing
05:02Graypup_ has quit [Quit: meow]
05:02Graypup_ has joined #asahi-re
05:02rqou_afaict it's not guaranteed to be page aligned, but happens to be for now
05:07marcanrqou_: you should read the broadcom wifi driver
05:08marcaneverything you're describing about the window stuff sounds exactly like what it does
05:08rqou_i have been reading it, but it doesn't look the same?
05:08marcanI mean the idea of remapping the BAR window via config space
05:08rqou_many parts are similar though
05:08marcanand I doubt they have a different PCIe core for bluetooth so it should have the same registers for that?
05:09marcanalso there are several BAR windows, linux only uses one AFAIR
05:09marcanat least two configurable ones
05:09marcanand then other hardcoded ones
05:09rqou_yes, macos definitely uses more
05:09rqou_for bluetooth
05:09marcanyes, it uses two for wifi too
05:09rqou_macos seems to use 5 for bluetooth
05:10rqou_i did find that one of the config space registers matches the wifi side
05:10rqou_everything else seems different though, even the layout of message rings
05:10rqou_or the firmware boot process
05:10marcanthat's not surprising
05:11marcanI would expect the PCIe core to be ~the same, but not a lot of the rest since the bluetooth stuff has a very different lineage
05:11rqou_tbh poking the lower-level bar window stuff is a pain because the instant you do a "bad" read the whole system locks up
05:11rqou_something about error recovery might be broken
05:11rqou_in the pcie core
05:11marcanit's unclear if there is a way to recover
05:11rqou_but yeah, the pcie looks similar, and there's definitely a chipcommon
05:12marcansince a stuck MMIO isn't exactly recoverable except by another CPU
05:12marcanwhich is not sane
05:12marcanis there really no linux driver for this at all? like no other bluetooth driver that fits? some broadcom sdhc stuff? some android source drop?
05:12rqou_it can't be turned into a bus error?
05:12marcanI find it hard to believe nothing else uses this
05:12rqou_hrm, i'm not aware of anything
05:12marcanI dunno, maybe? I mean it sounds like a TLP that never completes
05:12rqou_there's broadcom uart bluetooth
05:12marcanmaybe there's some way to configure a timeout
05:12rqou_which afaict is also different
05:13rqou_i haven't done a thorough check of android vendor kernels though
05:13rqou_afaict nobody has bluetooth on pcie
05:14rqou_it wouldn't surprise me if broadcom cooked up something special just for apple
05:14Jamie[m]1implication of this gentoo wiki article section is that some sort of broadcom pcie bluetooth is supported
05:16rqou_afaict that's USB
05:17rqou_i strongly suspect this is something broadcom made special for apple, out of existing IP blocks
05:18rqou_if you ever meet me in person, ask me about the facetime hd chip
05:21rqou_the driver class names also strongly implies something custom: AppleConvergedPCI -> AppleConvergedIPC -> AppleConvergedIPCOLYBTControl
05:24rqou_this whole thing feels very apple overcomplicated
05:24rqou_with an ipc mechanism over pcie where you can set up multiple pipes
05:25rqou_afaict it _does_ eventually tunnel bluetooth hci though
05:25rqou_after also taking a detour through a giant undocumented networking-related stack called skywalk (which i do not care about)
05:43marcanthat was recently (finally) dumped
05:44rqou_i don't care about skywalk though
05:45marcananyway yeah, it sounds like this is an apple-specific instantiation of broadcom bluetooth, pcie, and some glue
06:24the_lanetly_052 has joined #asahi-re
06:29the_lanetly_052___ has quit [Ping timeout: 480 seconds]
06:42rqou_ugh what's the proper way to figure out which DART stream a pcie device is using?
06:43rqou_it seems nondeterministic
06:45rqou_wtf, AlignmentError on STUR emulation
06:53user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:58rqou_it's really not quite designed to trace access to general RAM, isn't it
07:05user982492 has joined #asahi-re
07:07rqou_everything here is over-layered AF
07:07rqou_seems there's a "main" message and completion ring, which maybe is used to "open" a pipe containing its own message and completion rings?
07:08rqou_but somehow this has to share a fixed number of doorbells
07:08rqou_and there's a mapping between everything encoded in the macos plist
07:53kameks has joined #asahi-re
07:54the_lanetly_052 has quit [Ping timeout: 480 seconds]
08:48user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:52user982492 has joined #asahi-re
09:11rqou_success(-ish)! i can read what appear to be bluetooth HCI commands that macos is sending to the bluetooth card
09:11rqou_still don't understand replies though, nor a giant pile of magic numbers
09:13svenlooks for rid2sid in the Linux pcie driver to get the pcie device/dart stream mapping
09:13svenit’s configurable
09:13rqou_but i see a 0xFC01 command, a 0x0C13 command and my computer hostname, and then a huge pile of 0xFD97 with a payload that starts with "BLOB"
09:13rqou_sven: how do i do that from a trace script though?
09:14rqou_rn i hardcode it and reboot if it seems wrong
09:14sventrace the writes to that rid2sid register and then find the stream from there
09:37user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:08Jamie[m]1can I stop myself from being sent into recovery mode after rebooting many times in quick succession?
10:09Jamie[m]1(i know i can get back into the OS by picking it from the boot picker, but trying to prevent being sent there in the first place)
10:11jannausee what smc reboot does, there is a boot errror count and if that exceeds a certain value iboot boots into recovery
10:12jannauI think it's sensible that it is only reset by the os but for m1n1 experimnets it would be nice to have
10:13jannauwould have been useful for display experiments and m1 ultra bringup
10:32Jamie[m]1yeah, avd experimenting is where i'm wanting it now
12:16rqou_whoops i forgot to go to bed, but success! https://github.com/AsahiLinux/m1n1/pull/192
12:58kameks has quit [Ping timeout: 480 seconds]
13:32kameks has joined #asahi-re
15:58kameks has quit [Ping timeout: 480 seconds]
16:12nicolas17 has joined #asahi-re
16:37MajorBiscuit has joined #asahi-re
17:24user982492 has joined #asahi-re
17:25roxfansleep is for the weak
17:35marcanI actually don't get sent into recovery most of the time and I reboot all the time; I'm not sure exactly what the logic is
17:35marcan(without doing the count reset)
17:35j`eynever been sent into recovery either
17:36svenme neither, and i've rebooted this thing a lot and very quickly
17:36sventhe only time I was sent into recovery was when I let that weird other watchdog thing expire
17:40jannauI think reboots are fine, reboots after crashing dcp or trying to use powered down usb ports seems to cause it
18:19user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:32MajorBiscuit has quit [Ping timeout: 480 seconds]
19:04user982492 has joined #asahi-re
19:09Mase3206 has joined #asahi-re
19:31Mase3206 has quit [Quit: Mase3206]
19:35Mase3206 has joined #asahi-re
19:38user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:39Mase3206 has quit []
19:52Mase3206 has joined #asahi-re
19:54MajorBiscuit has joined #asahi-re
20:03MajorBiscuit has quit [Ping timeout: 480 seconds]
20:15user982492 has joined #asahi-re
20:25MajorBiscuit has joined #asahi-re
20:25Mase3206 has left #asahi-re [#asahi-re]
21:15alexsv has quit [Ping timeout: 480 seconds]
21:32MajorBiscuit has quit [Ping timeout: 480 seconds]
21:39doggkruse has joined #asahi-re
21:47doggkruse has quit [Ping timeout: 480 seconds]
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:02yrlf has joined #asahi-re
22:30user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:35user982492 has joined #asahi-re
22:39user982492 has quit []
23:33user982492 has joined #asahi-re
…