#asahi-dev · 2022-10-18 16:03
svenhm, still no reply to the bt patches but they’re still in patchwork with “new” :(#asahi-dev · 2022-10-18 13:26
svenguess I just never noticed then#asahi-dev · 2022-10-18 13:25
sven nvme-apple 27bcc0000.nvme: RTKit: Unknown system endpoint: 0x0a <-- huh, looks like at some point they updated the ANS firmware and it also got that endpoint#asahi-dev · 2022-10-18 11:48
svenso the initial hack is probably to sniff BT traffic inside hci_bcm4377 and just inject that command before the audio stream starts#asahi-dev · 2022-10-18 11:48
svenwhen I looked at it it sent a suspicious command just before it started streaming audio#asahi-dev · 2022-10-18 11:47
sven(apple included them in a plist inside packerlogger or however that thing is called :D)#asahi-dev · 2022-10-18 11:47
sventhen there's https://github.com/seemoo-lab/internalblue/blob/master/internalblue/hci.py which contains a list of essentially all vendor specific commands that existed a few years ago#asahi-dev · 2022-10-18 11:47
svenif anyone else wants to take a look at it: you can use PacketLogger from the additional XCode tools to trace all bluetooth commands from inside macos#asahi-dev · 2022-10-18 11:33
svenmaybe once I’m annoyed enough with this DP and thunderbolt stuff again#asahi-dev · 2022-10-18 11:33
svenyeah, I’m not looking forward to btcoex #asahi-dev · 2022-10-18 08:24
svenshould write a patch that allows to send the VDM commands from linux#asahi-dev · 2022-10-18 08:24
svencan't really test bare metal anymore since Apple added that fake HW uart kext#asahi-dev · 2022-10-18 08:22
svenmaybe the hv slows everything down just enough#asahi-dev · 2022-10-18 08:22
svenah, nope#asahi-dev · 2022-10-18 07:46
svenif that works we should enable the command completed interrupt and use that instead of the busy loop#asahi-dev · 2022-10-18 07:45
svenbut that loop is spamming the tps chip with reads which we know is a bad idea#asahi-dev · 2022-10-18 07:45
svenI can't seem to reproduce the hang on my mini#asahi-dev · 2022-10-18 07:44
svenjannau: can you try to put the sleep into that loop here? https://github.com/AsahiLinux/linux/blob/asahi-wip/drivers/usb/typec/tipd/core.c#L316#asahi-dev · 2022-10-18 06:56
sventps6598x_exec_cmd possibly. it seems to poll for command completion instead of relying on the irq e.g.#asahi-dev · 2022-10-18 06:56
svenI bet there's some path in tipd/core.c that does just that#asahi-dev · 2022-10-18 06:56
svenjannau: hm.. we've had issues with the tps chip before when we were spamming it too fast#asahi-dev · 2022-10-17 21:40
svenmaybe it’s too fast for the tps chips now? :D#asahi-dev · 2022-10-17 21:34
sveneven if the irq stuff doesn’t work at all it should just sleep 10 msec and then work like before#asahi-dev · 2022-10-17 21:34
sven that commit still looks good to me#asahi-dev · 2022-10-17 21:33
svenhmmm… weird#asahi-dev · 2022-10-17 20:57
svenugh… I thought we fixed that at some point #asahi-dev · 2022-10-17 08:32
svenrickybobby23: I mean.. "writing to a random memory address" sounds like a recipe for crashing the SoC#asahi-dev · 2022-10-16 16:31
svennot really, I got to the point where a new epic service starts and now need to grab fields from a OSSerialzed blob :(#asahi-dev · 2022-10-16 14:00
sveniirc they use readb/writeb until the address is aligned for readq/writeq#asahi-dev · 2022-10-16 13:59
sventhere's memcpy_fromio/toio which may or may not do what you want#asahi-dev · 2022-10-16 13:55
sven(that abomination: https://github.com/AsahiLinux/m1n1/blob/270f864ae916f9349839a9eca6382180fdb39331/proxyclient/m1n1/fw/common.py#L70)#asahi-dev · 2022-10-16 13:55
svenurgh, looks like I'll have to implement a stripped down version of OSSerialize for dcp :<#asahi-dev · 2022-10-16 13:47
sveni know that there have been various patch series trying to add devm_clk_* since a few years ago already that all didn't go anywhere for various reason#asahi-dev · 2022-10-16 13:46
svenin may already. fun!#asahi-dev · 2022-10-16 13:46
svenjannau: huh, so devm_clk_* helpers finally got merged?#asahi-dev · 2022-10-16 12:05
svenhm, Bluetooth v3 is still in patchwork as “new” and with a few more other series in front of it :(#asahi-dev · 2022-10-12 16:37
sventhat was the initial discussion fwiw, https://lore.kernel.org/linux-nvme/YRE7vCyn9d1ClhRm@infradead.org/#asahi-dev · 2022-10-12 16:36
svenso you’d need to convince them ;)#asahi-dev · 2022-10-12 16:36
svenit’s probably possible to share e.g. the whole dma mapping code but the nvme guys are very concerned about performance in pci.c#asahi-dev · 2022-10-12 16:34
sventhe initial version did that but the nvme maintainers preferred to have it separate #asahi-dev · 2022-10-12 16:33
svenit’s probably fine but I can’t shake the feeling that I overlooked something else ;)#asahi-dev · 2022-10-12 16:33
svenyeah, it’s diverged quite a bit. I’ll take a closer look this weekend #asahi-dev · 2022-10-12 16:27
svenNice! I do wonder if I missed anything else from pci.c that we just haven’t run into yet now though #asahi-dev · 2022-10-12 11:44
svensure#asahi-dev · 2022-10-12 11:36
svenlooks good to me#asahi-dev · 2022-10-12 11:27
svenand I probably assumed the dma_set_max_seg_size is related to that workaround#asahi-dev · 2022-10-12 11:27
svenI know we don't need dma_set_min_align_mask because that's a workaround for broken nvme devices using swiotlb#asahi-dev · 2022-10-12 11:27
svenI based apple.c on pci.c and probably just dropped that call#asahi-dev · 2022-10-12 11:26
svenyes. it's not behind pcie on these SoCs#asahi-dev · 2022-10-12 11:25
sveni think it's really just that missing dma_set_max_seg_size call in apple.c