#
…

2022-04-09

00:03kameks has joined #asahi-re
00:57nepeat has quit [Quit: ZNC - https://znc.in]
01:06rqou_bluetooth seems to have a broadcom chipcommon at BAR0+0x3000
01:07rqou_i still don't have tracing working, but i REd the macos driver a bunch
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi-re
01:20nepeat has joined #asahi-re
01:32yuyichao has quit [Ping timeout: 480 seconds]
01:42rqou_ah, apparently i can just dump mmio ranges from ioregistryexplorer
01:44yuyichao has joined #asahi-re
02:54PhilippvK has joined #asahi-re
02:57phiologe has quit [Ping timeout: 480 seconds]
03:25nicolas17 has quit [Quit: Konversation terminated!]
03:35rqou_i _think_ i understand how to upload bluetooth firmware now, and have a vague idea that there exist descriptor rings and doorbells for 7(?) streams of data, but i'm blocked on not having any good way to prototype a driver
03:36rqou_the pcie interface doesn't look _that_ complicated
03:36rqou_i think but haven't confirmed that hci/sco/acl are tunneled on top
03:46rqou_the macos drivers are really really overengineered
05:15nafod has quit [Quit: Ping timeout (120 seconds)]
05:17nafod has joined #asahi-re
05:35robinp_ is now known as robinp
05:47kameks has quit [Ping timeout: 480 seconds]
06:22kameks has joined #asahi-re
06:22the_lanetly_052___ has joined #asahi-re
06:28the_lanetly_052__ has quit [Ping timeout: 480 seconds]
06:41rqou_hmm ok, there's definitely something i don't understand happening, because reading one of the "bad" registers (that macos is blatantly reading) from a "proper" linux pci driver crashes the system still
06:41rqou_so macos is doing something i don't understand to make the device not crash
06:42rqou_literally the first access macos does is to read BAR0+0x5908, according to the hv trace
06:43rqou_do i have to do something with the config space? i don't really know much about how pci works
06:44rqou_how would i hv trace the config space?
07:00kode54is the BAR mapped and accessible?
07:00kode54(I'm being an obvious shit, right now, because memory access issue is the only thing I can think of)
07:00kode54(I've barely had any kernel dev experience, just scan the tree for my scant commits)
07:02alexsv has quit [Remote host closed the connection]
07:02alexsv has joined #asahi-re
07:02rqou_the BAR is accessible because i can read BAR0+0x302C
07:03rqou_but if i read BAR0+0x5908 (which macos definitely does!) it hangs the entire system
07:25rqou_hmm, AppleConvergedPCI::setupVendorSpecificConfigurationGated might be important
07:26rqou_it writes something to a bunch of pci config space registers at around 0x80
07:26rqou_and then prints "window setup done"
07:29rqou_lmao ok i chased some vtable hell and this is probably it
07:29rqou_it writes some "BAR window mapping" magic numbers to the config space
07:59rqou_there's definitely a lot of parts of this that are similar to broadcom wifi chips, but also a lot of it is different
08:19rqou_yup that was it
08:19rqou_no more crashing now
08:33kameks has quit [Ping timeout: 480 seconds]
08:57xiaomingcc[m] has joined #asahi-re
08:58xiaomingcc[m] is now known as xiaoming[m]
09:11kgarrington has joined #asahi-re
09:18the_lanetly_052___ has quit [Ping timeout: 480 seconds]
09:21kgarrington has quit [Remote host closed the connection]
09:23rqou_afaict i've successfully booted the bluetooth firmware now
09:23SSJ_GZ has joined #asahi-re
09:23rqou_(the only evidence is that there is a register that changed from "0" to "2")
09:24rqou_need to do more tracing to figure out how descriptor rings work
09:28the_lanetly_052___ has joined #asahi-re
09:33kameks has joined #asahi-re
09:35rqou_tfw i kept wondering where a giant pile of config settings were coming from, but they're in the info.plist
09:41the_lanetly_052___ has quit [Ping timeout: 480 seconds]
10:01robinp_ has joined #asahi-re
10:09robinp has quit [Ping timeout: 480 seconds]
10:32ChaosPrincess has quit [Quit: WeeChat 3.4.1]
10:33ChaosPrincess has joined #asahi-re
10:43herbas has joined #asahi-re
10:47herbas has quit []
10:54kameks has quit [Ping timeout: 480 seconds]
11:21kameks has joined #asahi-re
11:22pilonsi has joined #asahi-re
11:39pilonsi has quit [Quit: Leaving]
11:43yuyichao has quit [Quit: Konversation terminated!]
11:43yuyichao has joined #asahi-re
11:51yuyichao has quit [Quit: Konversation terminated!]
11:51yuyichao has joined #asahi-re
12:15yuyichao has quit [Ping timeout: 480 seconds]
12:21yuyichao has joined #asahi-re
12:29pilonsi has joined #asahi-re
12:55pilonsi has quit [Quit: WeeChat 2.3]
13:04pilonsi has joined #asahi-re
13:33kameks has quit [Ping timeout: 480 seconds]
13:47the_lanetly_052___ has joined #asahi-re
14:30hectour[m] has left #asahi-re [#asahi-re]
14:39phire_ is now known as phire
15:24opticron has quit [Ping timeout: 480 seconds]
16:16opticron has joined #asahi-re
16:59MajorBiscuit has joined #asahi-re
17:19MajorBiscuit has quit [Ping timeout: 480 seconds]
18:12doggkruse has joined #asahi-re
18:22doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:32SSJ_GZ has quit []
19:13amarioguy has joined #asahi-re
19:15yuyichao has quit [Ping timeout: 480 seconds]
20:11nicolas17 has joined #asahi-re
20:13amarioguy has quit [Ping timeout: 480 seconds]
20:30yuyichao has joined #asahi-re
20:34yuyichao has quit []
20:35yuyichao has joined #asahi-re
20:42yuyichao has quit [Quit: Konversation terminated!]
20:46yuyichao has joined #asahi-re
21:07amarioguy has joined #asahi-re
21:32amarioguy has quit [Ping timeout: 480 seconds]
22:18Retr0id has quit [Ping timeout: 480 seconds]
22:22amarioguy has joined #asahi-re
22:27rqou_sven: ok i bought a thunderbolt widget just to answer the DART question you had asked about
22:28rqou_from the build params: version is still 1.0, supports full bypass (unlike the prores/scaler/avd ones which do not), 42-bit PA, 32-bit VA (not 36-bit), 64 streams (not 16)
22:30amarioguy has quit [Ping timeout: 480 seconds]
22:34rqou_sven: i also tested the 36-bit iova on the prores DART and it seems to work
22:36rqou_bit31 of register 0 is also set, but i don't know what that means
22:42rqou_somebody better start looking at thunderbolt soon or i will be sad
22:53Mase3206 has joined #asahi-re
22:59Mase3206 has quit [Quit: Mase3206]
23:09Mase3206 has joined #asahi-re
23:15Mase3206_ has joined #asahi-re
23:21Mase3206 has quit [Ping timeout: 480 seconds]
23:21Mase3206_ is now known as Mase3206
23:24amarioguy has joined #asahi-re
23:42amarioguy has quit [Ping timeout: 480 seconds]
23:44Mase3206 has quit [Quit: Mase3206]
23:53amarioguy has joined #asahi-re
…