the_lanetly_052___ has quit [Ping timeout: 480 seconds]
dayoyo_ has joined #asahi-dev
the_lanetly_052___ has joined #asahi-dev
dayoyo_ has quit [Quit: Leaving...]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
c10l49 is now known as c10l
the_lanetly_052___ has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
<marcan>
chadmed: nice! I might actually use that :D
<chadmed>
i had a feeling you might like something like this :)
<chadmed>
im bootstrapping clang on the mbp right now, all is going according to plan
<j`ey>
chadmed: how much ram do you have?
<chadmed>
16gb, i shaved 16gb off the rootfs the asahi installer made and turned it into a swap though so im all good
<chadmed>
the 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
<j`ey>
i tried to build clang with 8GB ram and no swap, didnt go so well
<chadmed>
heh have you ever tried to do it on a raspberry pi without distcc? that was not a very fun weekend for me
<Ella[m]>
j`ey: i managed to build clang fine with 8GB of ram and no swap though in debug mode it just wont
<j`ey>
chadmed: i have actually :p
<j`ey>
Ella[m]: cant remember if I was doing debug or release now.. I think release. I guess it depends on the -j you used
<Ella[m]>
ah yeah i was using -j6 on a rpi4 so
bisko has joined #asahi-dev
c10l has quit [Quit: Bye o/]
c10l has joined #asahi-dev
c10l has quit []
c10l has joined #asahi-dev
c10l has quit []
c10l has joined #asahi-dev
c10l has quit []
c10l has joined #asahi-dev
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
PedroArajo[m] has left #asahi-dev [#asahi-dev]
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
c10l has quit [Quit: Bye o/]
c10l has joined #asahi-dev
kov has joined #asahi-dev
bisko has quit [Read error: Connection reset by peer]
bisko has joined #asahi-dev
bisko has quit []
bisko has joined #asahi-dev
c10l has quit [Remote host closed the connection]
c10l has joined #asahi-dev
bisko has quit []
bisko has joined #asahi-dev
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bisko has joined #asahi-dev
bisko has quit []
ChaosPrincess has quit [Quit: WeeChat 3.5]
ChaosPrincess has joined #asahi-dev
millenialhacker has joined #asahi-dev
bisko has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
pseigo has quit [Quit: left]
pseigo has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
bisko has quit [Read error: Connection reset by peer]
bisko has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-dev
bisko has quit []
millenialhacker has joined #asahi-dev
bisko has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millenialhacker has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
pseigo has quit [Quit: left]
millenialhacker has joined #asahi-dev
nicolas17 has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-dev
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
<marcan>
pushed some asahi-installer stuff to collect all non-iBoot FUD firmwares (the ones that were missing for Touch Bar support)
<marcan>
so 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
<sven>
biggest 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
<sven>
just from looking at strings of the kext there also seems to be some way to get it to push logs to us
millenialhacker has joined #asahi-dev
MajorBiscuit has quit [Ping timeout: 480 seconds]
<marcan>
sven: isn't there a relatively small max ACL packet size?
chslt^ has joined #asahi-dev
<sven>
1024 bytes I think, but I can’t put more than 1020 (4*0xff) into a single ring entry
<sven>
for host->device that isn’t a problem because I can just map the buffer instead and pass an iova
<sven>
but that doesn’t work for device->host
<marcan>
huh, interesting, so it really is just borderline
<sven>
yup
<sven>
macOS limits it to 1008 or so which is also weird
<sven>
but they drive this hw a bit strange anyway
millenialhacker has quit [Ping timeout: 480 seconds]
<sven>
I’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
<sven>
dunno if that’s possible with BT though
<marcan>
I 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
<marcan>
so yeah...
<marcan>
oh wait, 1023
<marcan>
so 1025 bytes with HCI header
<sven>
Linux hci.h claims max_frame_size as 1024+4
<marcan>
The 3-DH5 packet has between 2 and 1023 information bytes
<marcan>
(including the 2-byte payload header)
<sven>
I wonder how they got 1028 then :/
<marcan>
that header is not present at the HCI layer, so 1021 data bytes + HCI header
<marcan>
probably just wrong
___nick___ has quit []
___nick___ has joined #asahi-dev
<sven>
macOS 1008 limit is also strange
<sven>
anyway, 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
<marcan>
ah wait, this is configurable
<marcan>
Host Buffer Size command
<marcan>
Maximum length (in octets) of the data portion of each HCI ACL Data
<marcan>
0xXXXX
<marcan>
Packet that the Host is able to accept.
<sven>
ohhh… interesting
<marcan>
The Controller will
<marcan>
segment the data to be transmitted
<marcan>
that data contained in HCI Data Pack-
<marcan>
from the Controller to the Host, so
<marcan>
ets will not exceed these sizes.
<marcan>
so I guess they don't actually map 1:1 to the packets on air, there's a layer of re-segmentation in the controller
<marcan>
linux never sends that hci command though, at least not in the kernel...
<marcan>
but anyway, I'm guessing you don't *actually* have to configure it
<marcan>
surely this controller knows not to try to put more data than fits in the ring
<marcan>
so it probably Just Works
<sven>
ill check if macOS sends it. worst case I’ll add it to the setup function where I need to send that calibration stuff anyway
<marcan>
yeah, good idea
<sven>
given 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
hir0pro has joined #asahi-dev
<marcan>
heh
<sven>
it also has fun features like configurable transfer/completion ring mapping that the firmware will sometimes ignore for some rings
<marcan>
lovely
<sven>
and completion rings (which I know are called like that from strings) are actually transfer rings for device-> host messages. it’s a mess
<marcan>
I mean, broadcom was involved
<marcan>
anyway, I should get some sleep and see if I can actually wrap up this touchpad mess tomorrow
<sven>
true
<marcan>
I *think* I can
<sven>
sounds like a plan :)
<sven>
goodnight!
<marcan>
and then we ship an asahi release with M2 and Mac Studio support this weekend :p
<marcan>
(and bluetooth, if you feel up to it :D)
millenialhacker has joined #asahi-dev
<sven>
sure, feel free to include it :)
<sven>
it probably still has some minor issues but people testing it will actually uncover those!
millenialhacker has quit [Ping timeout: 480 seconds]
dylanusdt[m] was banned on #asahi-dev by marcan [*!*@2001:470:1af1:101::da9f]
quarkyalice has joined #asahi-dev
quarkyalice has quit [Remote host closed the connection]
millenialhacker has joined #asahi-dev
psykose has quit [Remote host closed the connection]
psykose has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
dylanusdt[m] has quit [autokilled: Please do not spam on IRC. Email support@oftc.net with questions. (2022-07-04 17:54:24)]
quarkyalice has joined #asahi-dev
quarkyalice has quit [Read error: Connection reset by peer]
quarkyalice has joined #asahi-dev
millenialhacker has joined #asahi-dev
millenialhacker has quit [Read error: Connection timed out]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
___nick___ has quit [Ping timeout: 480 seconds]
hir0pro has quit [Quit: hir0pro]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
rqou_ has joined #asahi-dev
<rqou_>
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
<rqou_>
tl;dr you queue up a buffer in the *transfer* ring for the D2H ACL pipe
<rqou_>
and, if the data fits in the completion ring footer, it'll appear there
<rqou_>
if the data doesn't fit in the completion ring footer, it goes into the buffer you queued up
<rqou_>
and which scenario happened is indicated by bits in flags
<rqou_>
iirc i needed to do this in order for OBEX to work
<rqou_>
(also, sorry for not having been very active, Life(TM) happened)
<sven>
urgh… that sounds like a disgusting hack. Doesn’t surprise me with the rest of this mess though :/
<sven>
i wonder if that command to limit the acl size marcan found just works instead
chslt^ has quit [Ping timeout: 480 seconds]
<rqou_>
idk, never tried that command
<rqou_>
i do know that the loopback test command appears to crash the firmware
chslt^ has joined #asahi-dev
<sven>
fun
<rqou_>
anyways, in case you were wondering why the ACL D2H pipe doesn't set the virtual flag, this is why
<sven>
I’m pretty sure macOS set the virtual flag anyway
<sven>
i was just confused why it had a buffer attached
<rqou_>
the plist definitely doesn't say virtual
<rqou_>
iirc what the tracer said
<sven>
I never looked at the plist
<rqou_>
*iirc the tracer also said it doesn't
<sven>
but when I traced it it certainly had the virtual flag here
<rqou_>
... huh
<sven>
maybe different macOS version or something
<sven>
the firmware ignores almost anything anyway
<sven>
you can’t e.g. route the acl packets to another completion ring
<sven>
and using a different msi index only works for the control ring iirc
<rqou_>
yeah, i did see that in the logs
millenialhacker has joined #asahi-dev
<rqou_>
i was wondering whether or not that would work
<rqou_>
guess not
<sven>
I’m reasonably sure it also ignores the flags because it iirc still worked when I kept the flags as 0 everywhere
<rqou_>
wtf
<sven>
I at least had some flag wrong and everything still worked
<rqou_>
did you ever figure out the SCO doorbell properly?
<sven>
I found something that works :D
<sven>
i only ring it for d->h transfers and that seems to be required
<sven>
ringing it for h->d as well made the connection glitch-y
<sven>
it also seems to generate reasonable interrupts this way
<rqou_>
oh, not using 0x154 at all but using 0x174 in all cases?
<sven>
yup
<sven>
i never use that other doorbell
<rqou_>
well, if it works ¯\_(ツ)_/¯
<sven>
yeah, I almost didn’t look at what macOS does and just played with the hw until it worked
<rqou_>
nice job btw (although i haven't tested it yet)
<rqou_>
hope the prototype was useful
<sven>
definitely!
millenialhacker has quit [Ping timeout: 480 seconds]
<sven>
dunno if you saw it, but one of the two calibration blobs is used depending on the chip stepping stored in their OTP
<sven>
bf = beam forming which I guess was only introduced in later revisions
<sven>
and that strange pcie config space dance just configures the view we get into the chips address space
<rqou_>
yeah i saw that too
<sven>
bar1 has four or so windows and bar2 has another one
<rqou_>
not sure how you figured out the beamforming bits
<sven>
patched the OTP from the hv and suddenly noticed how it used the other blob
<sven>
i wanted to figure out how it does firmware selection
<sven>
and I didn’t realize that it does that from user space yet
<rqou_>
heh, i need to set up the tooling to patch stuff from the hv
<sven>
tooling is very fancy word for monkey patching the sync trace handler with if addr == whatever.. ;p
<rqou_>
oh
<rqou_>
i thought you had something much fancier
millenialhacker has joined #asahi-dev
<sven>
hrm, or I think I actually patched the C code, don’t remember
<sven>
there might be something fancier but that was the quickest way
<rqou_>
i wonder if the BT firmware is signed and how deep that rabbit hole can go
MajorBiscuit has joined #asahi-dev
<rqou_>
anybody know anybody with the seemoo-lab folks who might be interested in this driver?
millenialhacker has quit [Ping timeout: 480 seconds]
<sven>
the firmware for T2 is at least called .signed.bin
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]