#
…

2022-07-04

00:26phire has joined #asahi-dev
01:01skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
01:01skoobasteeve has joined #asahi-dev
01:01jakebot6 has quit [Quit: The Lounge - https://thelounge.chat]
01:01skoobasteeve has quit []
01:03skoobasteeve has joined #asahi-dev
01:06jakebot6 has joined #asahi-dev
01:17skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
01:19skoobasteeve has joined #asahi-dev
01:20skoobasteeve has quit []
01:20skoobasteeve has joined #asahi-dev
01:27skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
01:28skoobasteeve has joined #asahi-dev
01:29millenialhacker has joined #asahi-dev
01:37millenialhacker has quit [Ping timeout: 480 seconds]
02:11phiologe has joined #asahi-dev
02:13PhilippvK has quit [Ping timeout: 480 seconds]
03:02doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:25kov has quit [Quit: Coyote finally caught me]
03:38nicolas17 has quit [Ping timeout: 480 seconds]
04:29pseigo has joined #asahi-dev
04:41pseigo has quit [Read error: No route to host]
04:41pseigo has joined #asahi-dev
05:54the_lanetly_052 has joined #asahi-dev
06:01roxfan has joined #asahi-dev
06:14doggkruse has joined #asahi-dev
06:19jluthra has quit [Remote host closed the connection]
06:20jluthra has joined #asahi-dev
06:23doggkruse has quit [Ping timeout: 480 seconds]
06:34the_lanetly_052__ has joined #asahi-dev
06:37the_lanetly_052___ has joined #asahi-dev
06:40the_lanetly_052 has quit [Ping timeout: 480 seconds]
06:43the_lanetly_052__ has quit [Ping timeout: 480 seconds]
06:50_jannau_marcan: macos seems to use keyboard backlight on/off command on the SPI hid keyboards
06:50* _jannau_rewatches the second half of the stream
06:50_jannau_s/rewatches/watches/
06:54MajorBiscuit has joined #asahi-dev
07:06chadmedok im with sven packaging and distribution is the absolute worst oh my god
07:07chadmedtime required to repackage and boot a vanilla gento install cd: ~40 hours
07:07chadmedi guess the nice thing though is that we can install gentoo the "correct" way now
07:25bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:37the_lanetly_052___ has quit [Ping timeout: 480 seconds]
07:40dayoyo_ has joined #asahi-dev
07:52the_lanetly_052___ has joined #asahi-dev
08:07dayoyo_ has quit [Quit: Leaving...]
08:08millenialhacker has joined #asahi-dev
08:16millenialhacker has quit [Ping timeout: 480 seconds]
08:57c10l49 is now known as c10l
09:03the_lanetly_052___ has quit [Ping timeout: 480 seconds]
09:19millenialhacker has joined #asahi-dev
09:27millenialhacker has quit [Ping timeout: 480 seconds]
09:27marcanchadmed: nice! I might actually use that :D
09:31chadmedi had a feeling you might like something like this :)
09:31chadmedim bootstrapping clang on the mbp right now, all is going according to plan
09:33j`eychadmed: how much ram do you have?
09:34chadmed16gb, i shaved 16gb off the rootfs the asahi installer made and turned it into a swap though so im all good
09:34chadmedthe only thing ive been defeated by with this setup before is chromium in form of qtwebengine, which i dont use anyway so this should be fine
09:36j`eyi tried to build clang with 8GB ram and no swap, didnt go so well
09:36chadmedheh have you ever tried to do it on a raspberry pi without distcc? that was not a very fun weekend for me
09:36Ella[m]j`ey: i managed to build clang fine with 8GB of ram and no swap though in debug mode it just wont
09:37j`eychadmed: i have actually :p
09:38j`eyElla[m]: cant remember if I was doing debug or release now.. I think release. I guess it depends on the -j you used
09:38Ella[m]ah yeah i was using -j6 on a rpi4 so
09:43bisko has joined #asahi-dev
09:54c10l has quit [Quit: Bye o/]
09:55c10l has joined #asahi-dev
09:56c10l has quit []
09:58c10l has joined #asahi-dev
09:59c10l has quit []
10:00c10l has joined #asahi-dev
10:00c10l has quit []
10:01c10l has joined #asahi-dev
10:09bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:13bisko has joined #asahi-dev
10:31bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:32bisko has joined #asahi-dev
10:38PedroArajo[m] has left #asahi-dev [#asahi-dev]
10:38bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:41bisko has joined #asahi-dev
10:47millenialhacker has joined #asahi-dev
10:55millenialhacker has quit [Ping timeout: 480 seconds]
10:58c10l has quit [Quit: Bye o/]
10:58c10l has joined #asahi-dev
11:01kov has joined #asahi-dev
11:01bisko has quit [Read error: Connection reset by peer]
11:04bisko has joined #asahi-dev
11:08bisko has quit []
11:08bisko has joined #asahi-dev
11:09c10l has quit [Remote host closed the connection]
11:10c10l has joined #asahi-dev
11:11bisko has quit []
11:12bisko has joined #asahi-dev
11:22bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:24bisko has joined #asahi-dev
11:26bisko has quit []
11:29ChaosPrincess has quit [Quit: WeeChat 3.5]
11:29ChaosPrincess has joined #asahi-dev
11:53millenialhacker has joined #asahi-dev
11:55bisko has joined #asahi-dev
12:05millenialhacker has quit [Ping timeout: 480 seconds]
12:11millenialhacker has joined #asahi-dev
12:21millenialhacker has quit [Ping timeout: 480 seconds]
12:23millenialhacker has joined #asahi-dev
12:24pseigo has quit [Quit: left]
12:24pseigo has joined #asahi-dev
12:32millenialhacker has quit [Ping timeout: 480 seconds]
12:32bisko has quit [Read error: Connection reset by peer]
12:33bisko has joined #asahi-dev
13:10bisko has quit [Ping timeout: 480 seconds]
13:13bisko has joined #asahi-dev
13:13bisko has quit []
13:14millenialhacker has joined #asahi-dev
13:17bisko has joined #asahi-dev
13:22millenialhacker has quit [Ping timeout: 480 seconds]
13:51millenialhacker has joined #asahi-dev
13:57bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:01millenialhacker has quit [Ping timeout: 480 seconds]
14:48millenialhacker has joined #asahi-dev
14:57millenialhacker has quit [Ping timeout: 480 seconds]
15:18pseigo has quit [Quit: left]
15:19millenialhacker has joined #asahi-dev
15:24nicolas17 has joined #asahi-dev
15:27millenialhacker has quit [Ping timeout: 480 seconds]
15:33bisko has joined #asahi-dev
15:37___nick___ has joined #asahi-dev
15:38___nick___ has quit []
15:40___nick___ has joined #asahi-dev
15:41marcanpushed some asahi-installer stuff to collect all non-iBoot FUD firmwares (the ones that were missing for Touch Bar support)
15:42marcanso once that's released people installing from that point on on M1 MBP won't need to take another trip through the installer for Touch Bar support in the future
15:57svenhttps://github.com/AsahiLinux/linux/tree/bluetooth-wip almost happy with it now, still need to track down a few edge cases though
16:00svenbiggest one is probably how very large ACL transfers from device -> host work. I can't fit the max frame size into the ring and macos even limits it to the max event size which is much smaller
16:03svenjust from looking at strings of the kext there also seems to be some way to get it to push logs to us
16:10millenialhacker has joined #asahi-dev
16:10MajorBiscuit has quit [Ping timeout: 480 seconds]
16:14marcansven: isn't there a relatively small max ACL packet size?
16:16chslt^ has joined #asahi-dev
16:16sven1024 bytes I think, but I can’t put more than 1020 (4*0xff) into a single ring entry
16:16svenfor host->device that isn’t a problem because I can just map the buffer instead and pass an iova
16:17svenbut that doesn’t work for device->host
16:18marcanhuh, interesting, so it really is just borderline
16:18svenmacOS limits it to 1008 or so which is also weird
16:19svenbut they drive this hw a bit strange anyway
16:19millenialhacker has quit [Ping timeout: 480 seconds]
16:20svenI’ll have to see if I can just connect my Linux machine as a device to a macOS host and somehow send those large ACL frames and see what happens
16:20svendunno if that’s possible with BT though
16:21marcanI think the max packet size is 1022 bytes without the header, and then at the HCI layer it adds a 4-byte header, so 1026
16:21marcanso yeah...
16:21marcanoh wait, 1023
16:21marcanso 1025 bytes with HCI header
16:22svenLinux hci.h claims max_frame_size as 1024+4
16:23marcanThe 3-DH5 packet has between 2 and 1023 information bytes
16:23marcan(including the 2-byte payload header)
16:24svenI wonder how they got 1028 then :/
16:24marcanthat header is not present at the HCI layer, so 1021 data bytes + HCI header
16:24marcanprobably just wrong
16:27___nick___ has quit []
16:27___nick___ has joined #asahi-dev
16:27svenmacOS 1008 limit is also strange
16:28svenanyway, I’ll see if I can manage to connect macOS to a Linux machine via bt and see if I can trigger some large packages to see what’s going on
16:28marcanah wait, this is configurable
16:28marcanHost Buffer Size command
16:29marcanMaximum length (in octets) of the data portion of each HCI ACL Data
16:29marcanPacket that the Host is able to accept.
16:29svenohhh… interesting
16:29marcanThe Controller will
16:29marcansegment the data to be transmitted
16:29marcanthat data contained in HCI Data Pack-
16:29marcanfrom the Controller to the Host, so
16:29marcanets will not exceed these sizes.
16:30marcanso I guess they don't actually map 1:1 to the packets on air, there's a layer of re-segmentation in the controller
16:31marcanlinux never sends that hci command though, at least not in the kernel...
16:32marcanbut anyway, I'm guessing you don't *actually* have to configure it
16:32marcansurely this controller knows not to try to put more data than fits in the ring
16:32marcanso it probably Just Works
16:32svenill check if macOS sends it. worst case I’ll add it to the setup function where I need to send that calibration stuff anyway
16:32marcanyeah, good idea
16:33svengiven that this entire thing is a bit weird it wouldn’t surprise me if it just hangs when it can’t put the data it got into the ring
16:33hir0pro has joined #asahi-dev
16:34svenit also has fun features like configurable transfer/completion ring mapping that the firmware will sometimes ignore for some rings
16:35svenand completion rings (which I know are called like that from strings) are actually transfer rings for device-> host messages. it’s a mess
16:35marcanI mean, broadcom was involved
16:36marcananyway, I should get some sleep and see if I can actually wrap up this touchpad mess tomorrow
16:36marcanI *think* I can
16:36svensounds like a plan :)
16:36svengoodnight!
16:36marcanand then we ship an asahi release with M2 and Mac Studio support this weekend :p
16:38marcan(and bluetooth, if you feel up to it :D)
16:51millenialhacker has joined #asahi-dev
16:57svensure, feel free to include it :)
16:58svenit probably still has some minor issues but people testing it will actually uncover those!
16:59millenialhacker has quit [Ping timeout: 480 seconds]
17:19dylanusdt[m] was banned on #asahi-dev by marcan [*!*@2001:470:1af1:101::da9f]
17:24quarkyalice has joined #asahi-dev
17:27quarkyalice has quit [Remote host closed the connection]
17:36millenialhacker has joined #asahi-dev
17:39psykose has quit [Remote host closed the connection]
17:39psykose has joined #asahi-dev
17:44millenialhacker has quit [Ping timeout: 480 seconds]
17:54dylanusdt[m] has quit [autokilled: Please do not spam on IRC. Email support@oftc.net with questions. (2022-07-04 17:54:24)]
18:06quarkyalice has joined #asahi-dev
18:46quarkyalice has quit [Read error: Connection reset by peer]
18:47quarkyalice has joined #asahi-dev
18:48millenialhacker has joined #asahi-dev
19:09millenialhacker has quit [Read error: Connection timed out]
19:16millenialhacker has joined #asahi-dev
19:26millenialhacker has quit [Ping timeout: 480 seconds]
19:31millenialhacker has joined #asahi-dev
19:40millenialhacker has quit [Ping timeout: 480 seconds]
20:07___nick___ has quit [Ping timeout: 480 seconds]
20:30hir0pro has quit [Quit: hir0pro]
20:50millenialhacker has joined #asahi-dev
20:58millenialhacker has quit [Ping timeout: 480 seconds]
21:03rqou_ has joined #asahi-dev
21:04rqou_sven: (reading logs) the logic around pipe6_iobuf_off in my hacky PoC takes care of the "ACL too big to fit into completion ring" situation
21:04rqou_tl;dr you queue up a buffer in the *transfer* ring for the D2H ACL pipe
21:04rqou_and, if the data fits in the completion ring footer, it'll appear there
21:04rqou_if the data doesn't fit in the completion ring footer, it goes into the buffer you queued up
21:05rqou_and which scenario happened is indicated by bits in flags
21:05rqou_iirc i needed to do this in order for OBEX to work
21:05rqou_(also, sorry for not having been very active, Life(TM) happened)
21:06svenurgh… that sounds like a disgusting hack. Doesn’t surprise me with the rest of this mess though :/
21:08sveni wonder if that command to limit the acl size marcan found just works instead
21:09chslt^ has quit [Ping timeout: 480 seconds]
21:10rqou_idk, never tried that command
21:10rqou_i do know that the loopback test command appears to crash the firmware
21:10chslt^ has joined #asahi-dev
21:11rqou_anyways, in case you were wondering why the ACL D2H pipe doesn't set the virtual flag, this is why
21:12svenI’m pretty sure macOS set the virtual flag anyway
21:12sveni was just confused why it had a buffer attached
21:13rqou_the plist definitely doesn't say virtual
21:13rqou_iirc what the tracer said
21:13svenI never looked at the plist
21:13rqou_*iirc the tracer also said it doesn't
21:13svenbut when I traced it it certainly had the virtual flag here
21:13rqou_... huh
21:13svenmaybe different macOS version or something
21:14sventhe firmware ignores almost anything anyway
21:14svenyou can’t e.g. route the acl packets to another completion ring
21:14svenand using a different msi index only works for the control ring iirc
21:15rqou_yeah, i did see that in the logs
21:15millenialhacker has joined #asahi-dev
21:15rqou_i was wondering whether or not that would work
21:15rqou_guess not
21:16svenI’m reasonably sure it also ignores the flags because it iirc still worked when I kept the flags as 0 everywhere
21:16svenI at least had some flag wrong and everything still worked
21:17rqou_did you ever figure out the SCO doorbell properly?
21:17svenI found something that works :D
21:17sveni only ring it for d->h transfers and that seems to be required
21:18svenringing it for h->d as well made the connection glitch-y
21:19svenit also seems to generate reasonable interrupts this way
21:20rqou_oh, not using 0x154 at all but using 0x174 in all cases?
21:21sveni never use that other doorbell
21:21rqou_well, if it works ¯\_(ツ)_/¯
21:22svenyeah, I almost didn’t look at what macOS does and just played with the hw until it worked
21:22rqou_nice job btw (although i haven't tested it yet)
21:22rqou_hope the prototype was useful
21:23svendefinitely!
21:23millenialhacker has quit [Ping timeout: 480 seconds]
21:23svendunno if you saw it, but one of the two calibration blobs is used depending on the chip stepping stored in their OTP
21:24svenbf = beam forming which I guess was only introduced in later revisions
21:25svenand that strange pcie config space dance just configures the view we get into the chips address space
21:25rqou_yeah i saw that too
21:25svenbar1 has four or so windows and bar2 has another one
21:25rqou_not sure how you figured out the beamforming bits
21:26svenpatched the OTP from the hv and suddenly noticed how it used the other blob
21:26sveni wanted to figure out how it does firmware selection
21:26svenand I didn’t realize that it does that from user space yet
21:27rqou_heh, i need to set up the tooling to patch stuff from the hv
21:27sventooling is very fancy word for monkey patching the sync trace handler with if addr == whatever.. ;p
21:28rqou_i thought you had something much fancier
21:28millenialhacker has joined #asahi-dev
21:28svenhrm, or I think I actually patched the C code, don’t remember
21:28sventhere might be something fancier but that was the quickest way
21:34rqou_i wonder if the BT firmware is signed and how deep that rabbit hole can go
21:35MajorBiscuit has joined #asahi-dev
21:35rqou_anybody know anybody with the seemoo-lab folks who might be interested in this driver?
21:36millenialhacker has quit [Ping timeout: 480 seconds]
21:36sventhe firmware for T2 is at least called .signed.bin
22:00millenialhacker has joined #asahi-dev
22:08millenialhacker has quit [Ping timeout: 480 seconds]
22:16MajorBiscuit has quit [Ping timeout: 480 seconds]
22:30CME has quit []
22:30CME has joined #asahi-dev
22:30riker77_ has joined #asahi-dev
22:33jnn has joined #asahi-dev
22:35jn has quit [Ping timeout: 480 seconds]
22:36riker77 has quit [Ping timeout: 480 seconds]
22:36riker77_ is now known as riker77
23:28chslt^ has quit [Ping timeout: 480 seconds]
…