#
✕ nick:sven
#asahi-dev · 2026-01-25 14:00
svenit's all open-coded in xnu
#asahi-dev · 2026-01-25 14:00
svenmy point is that the dockchannel kext isn't used for that early uart
#asahi-dev · 2026-01-25 14:00
svennot my point
#asahi-dev · 2026-01-25 13:59
svenfrom what i can tell the uart implementation is directly hacked into xnu to allow something similar to earlycon
#asahi-dev · 2026-01-25 13:58
sventhanks, that matches what i suspected
#asahi-dev · 2026-01-25 13:55
sveni think the uart dockchannel one is directly connected to whatever that "kanzi in system" co-proc is, and the mtp one to, well, MTP
#asahi-dev · 2026-01-25 13:55
svenanyone got a m2 device tree for me? i suspect that the uart dockchannel fifo is separate from the mtp dockchannel fifo
#asahi-dev · 2026-01-25 13:54
svenso yeah, looking at dockchannel this thing definitely wants to be something like a mailbox and not that weird parent/subnode things with an interrupt controller
#asahi-dev · 2026-01-25 13:30
svenhuh, especially the KASLR RNG breaking is weird
#asahi-dev · 2026-01-25 13:27
svenonly noticed because there was occasional lag and because all cores were somehow busy at ~30% all the time
#asahi-dev · 2026-01-25 13:27
sventook me almost a day to realize i built the kernel without rust support :D
#asahi-dev · 2026-01-25 13:26
sveneven dcp and llvmpipe was surprisingly usable at ccc
#asahi-dev · 2026-01-25 13:25
svenhttps://f.svpe.de/a997364eda82d157897f859caefd6326a5601affa80cd6aef6fd18ac30f38f5a_kistrace.png this looks simple enough
#asahi-dev · 2026-01-25 13:23
sventl;dr: disable SIP, ifconfig XHC0 up and then wireshark
#asahi-dev · 2026-01-25 13:22
svenoh no, i got a trace. i was just annoyed how complicated that was
#asahi-dev · 2026-01-25 13:11
svenapple makes sniffing usb on macos surprisingly hard :/
#asahi-dev · 2026-01-25 12:10
svennow what would be really great if we could also issue a reboot command through this, but that's work for later
#asahi-dev · 2026-01-25 12:09
sven0x800 bytes FIFO I think
#asahi-dev · 2026-01-25 12:08
sven*we have for HID
#asahi-dev · 2026-01-25 12:08
svenso yeah, interrupts and status registers for how much space is left, etc
#asahi-dev · 2026-01-25 12:07
svenseems to work exactly the same as the downstream dockchannel thingy we have to HID on M2+
#asahi-dev · 2026-01-25 12:06
sventhen please don't backseat reverse engineer this
#asahi-dev · 2026-01-25 12:05
svenfeel free to try it yourself
#asahi-dev · 2026-01-25 12:05
sven+s
#asahi-dev · 2026-01-25 12:05
svenmaz: there is afaict, there are also status register for how much space is left i bet
#asahi-dev · 2026-01-25 12:04
svenpitust: why would you do that?
#asahi-dev · 2026-01-25 12:04
svenpitust: no idea
#asahi-dev · 2026-01-25 12:04
svenand then implement a small tool that just uses libusb to access that serial
#asahi-dev · 2026-01-25 12:03
svenjust need to figure out an easy way to sniff usb traffic now because i can't find my usb2 sniffer anymore
#asahi-dev · 2026-01-25 12:03
sveni tested this on my m1
#asahi-dev · 2026-01-25 12:03
svenyes!
#asahi-dev · 2026-01-25 12:00
svenno idea what they are, also don't really care tbh
#asahi-dev · 2026-01-25 11:48
svendata is read from offset 0x401c which returns 0x0000aabb where aa is the next byte and bb the number of bytes left in the fifo
#asahi-dev · 2026-01-25 11:35
svenfor c in "Hello, World!\n": write32(0x23d128000 + 0x4004, ord(c))
#asahi-dev · 2026-01-25 11:35
svenso that was easy
#asahi-dev · 2026-01-25 11:35
sven;-)
#asahi-dev · 2026-01-25 11:35
svenHello, World!
#asahi-dev · 2026-01-25 11:35
svencat /dev/cu.kis-100000-ch-0
#asahi-dev · 2026-01-25 11:30
sventhere's no need for serial for that to work
#asahi-dev · 2026-01-25 11:30
svenno, it doesn't
#asahi-dev · 2026-01-25 11:30
svenso this just works with macos 26 apparently
#asahi-dev · 2026-01-25 11:30
sventhere
#asahi-dev · 2026-01-25 11:30
sven"/dev/cu.kis-100000-ch-0 /dev/cu.kis-100000-ch-1 /dev/cu.kis-100000-ch-2 /dev/cu.kis-100000-ch-3"
#asahi-dev · 2026-01-25 11:29
svenbah
#asahi-dev · 2026-01-25 11:29
sven ls /dev/cu.kis-100000-ch-*
#asahi-dev · 2026-01-25 11:29
svenls /dev/cu.kis-100000-ch-*
#asahi-dev · 2026-01-25 11:14
sventhe fun part is that you can also do this from m1n1 for the device itself, so we could just do that and get something like uart without extra hardware even for early bringup
#asahi-dev · 2026-01-25 11:13
svenhttps://github.com/AsahiLinux/tuxvdmtool/commit/44682921ace2790f543554818b00e19ee87694ba ;)
#asahi-dev · 2026-01-25 11:11
sventhere's debugusb code in libirecovery (though not serial) and there's a applekis.kext in 12.3 and 12.3.1 kernelcaches that should have support for serial
#asahi-dev · 2026-01-25 11:02
sven*be at

plus ›