marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | "Does XXX work yet?": https://alx.sh/fs | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-alt #asahi-stream #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
hightower4 has joined #asahi
Brainium has joined #asahi
hightower3 has quit [Ping timeout: 480 seconds]
ceinem has joined #asahi
BenTheTechGuy has quit [Quit: WeeChat 3.8]
Brainium has quit [Quit: Konversation terminated!]
gabuscus has quit []
gabuscus has joined #asahi
crabbedhaloablut has joined #asahi
ten1572377432 has quit [Remote host closed the connection]
ten1572377432 has joined #asahi
user982492 has joined #asahi
zalyx0 has quit [Quit: later alligator]
zalyx0 has joined #asahi
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
possiblemeatball has quit [Ping timeout: 480 seconds]
possiblemeatball has joined #asahi
ten1572377432 has quit [Remote host closed the connection]
ten1572377432 has joined #asahi
oomar has joined #asahi
oomar has quit []
possiblemeatball has quit [Quit: Quit]
oomar has joined #asahi
<oomar>
?
oomar has quit []
oomar has joined #asahi
oomar has left #asahi [#asahi]
oomar has joined #asahi
oomar has quit []
oomar has joined #asahi
oomar has quit []
gladiac has quit [Quit: k thx bye]
<leio>
Do JetBrains IDEs work on asahi? I shouldn't expect any userspace problems from 16kB pages or anything? Looking what I will lose from the architecture switch other than standalone skype and slack before making the hardware order
ShaozeChen has quit [Remote host closed the connection]
<nicolas17>
leio: does JetBrains use Electron/Chromium?
<leio>
it's java
<leio>
(and kotlin)
<leio>
so, uh, awt or something? They have a arm64 tarball
<leio>
so I think it's mostly about understanding whether the page size could be causing it trouble
<leio>
compared to other arm64
<nicolas17>
I thought I read about problems with it
<nicolas17>
but I searched my IRC logs and it seems people were getting crashes *running the x86 version in an emulator*, before the official arm64 version was out
<marcan>
IIRC java stuff has OpenGL-related bugs and you need *handwaves* some config settings to make it not suck but other than that it should work
<marcan>
conclusion about some of the java GL glitches was that it's probably java's fault, since they also happen with software rendering
<leio>
other than that, my main blockers would seem to be missing dts and display out, out of which I can assume the former is done by the time I get it, or can do it easy enough (your mac pro stream certainly made it look easy enough), with the display being the question mark I don't have any more info on than it's WIP
<leio>
skype and slack hopefully work sufficiently in browser
<marcan>
which machine?
<nicolas17>
ah yeah there might be some graphical glitches, but I mean in early days when people tried it in box64, it was just crashing on startup
<leio>
mac studio M2 Ultra is what I have my eyes on
<nicolas17>
and that's no longer the case
<marcan>
ah yeah, we don't have devicetrees for that yet but it would be nice to have someone to test them
<marcan>
(mostly so I don't have to spend money on one myself :p)
<leio>
I don't mind writing them myself, I just don't think I'll be the first
<marcan>
it should be ~easy to write them, someone just needs to do it (I will if nobody else gets to it first)
<marcan>
m1n1 version I just tagged should have the GPU stuff for M2 Ultra
<marcan>
main thing is the same problem as all the M2 desktops, no display out whatsoever until the displayport patches are ready and merged
<marcan>
right now it's looking like, paradoxically, we'll release with *only* Type C displayport out first (no built-in HDMI), the opposite of the state of the M1 desktops so far
<marcan>
and there will probably be no video out during the bootloader screens at first
<marcan>
once we have *something* we'll work on fixing those details
<nicolas17>
hm does sshd run out of the box?
<marcan>
not IIRC, though people have variously managed to enable it blind :p
<j`ey>
init=/bin/sshd :P
<marcan>
lol
<marcan>
I just use the hypervisor to get a console but yeah
<marcan>
main reason this is taking so long is there's a stupidly huge amount of machinery involved in display crossbaring/bring-up/muxing/etc across the stack, and this is now required on M2 since all the display outputs are basically "generic"
<marcan>
on M1 the main display output for desktops was still "hardwired" and mostly pre-configured by iBoot even after they stopped doing full framebuffer bring-up in 12.x
<marcan>
so that made our life easy
<marcan>
but now this whole thing depends on the big hairy ball of display hotplug/muxing/etc logic
<marcan>
it's not even clear how much of a pain bringing this to the bootloader side will be, which is why it'll probably come later
<leio>
ok, so it's quite certain it'll work - eventually. Just a question whether I get to see about trying to help out or just cheer on and use OSX meanwhile
<marcan>
everything will work eventually :-)
<nicolas17>
marcan: I think siguza has M2 Ultra btw
<marcan>
but yeah the blockers for this one are the same as for all the other M2 desktops
<marcan>
so once it works on one it will work on all
<marcan>
(modulo the dual die thing on M2 Ultra but at worst we can just enable half of it initially and say only half the ports work, iff that turns out to be a problem at all)
<leio>
now the hard part is really figuring out what configuration I want. There's the reasonable configuration, and then there's the "it's over 6000€ already, I guess more RAM and GPUs doesn't cost much more percentually" :(
<marcan>
mood
<leio>
and then waiting for 6 weeks, guess they hand-solder things upon order
<j`ey>
will it working on M2 mean it also works on M1?
<marcan>
yes
<j`ey>
noice
<nicolas17>
what's the "it"? :)
<marcan>
displayport out
<marcan>
and I guess unexpectedly this also means we'll probably end up supporting bootloader display output on any port on M1 too once that works at all on M2
<marcan>
which I had no plans to spend any time on any time soon as long as HDMI worked, but they kind of forced our hand here sooo
<marcan>
well, DP alt mode anyway (which shouldn't be too bad), zero plans to support thunderbolt in m1n1 :p
<marcan>
(someday someone will be bored enough to implement that but yeah, if you need to mess with your bootloader, please hook up via DP if only temporarily)
<nicolas17>
does Apple render the boot logo in every output? is that in iBoot or just early kernel?
<marcan>
they don't enable *any* outputs
<marcan>
that went away with 12.x
<marcan>
there isn't even an apple logo in the framebuffer any more
<nicolas17>
I mean I do get an Apple logo, but maybe that's halfway through XNU boot already
<marcan>
yeah, by then the gpu and everything is up and redraws it
<marcan>
I think that's literally userspace by then
<marcan>
drawn by WindowServer presumably
<nicolas17>
probably
<nicolas17>
I was curious if the bootloader supported all the different ports to draw the logo, but "they don't do that at all" answers that :P
<nicolas17>
wait what about the "keep holding to enter recovery" message when you hold the power button?
<marcan>
doesn't exist on desktops :D
<marcan>
they used to have that in 11.x when they did display bring-up on HDMI
<nicolas17>
ohh I see
<marcan>
now they ditched it and they use the power LED for signaling
<marcan>
it goes dimmer when you've held it down for long enough
<marcan>
and blinks orange when in recovery panic mode etc
<nicolas17>
I have a laptop, I guess the logo *does* render early there?
<nicolas17>
and not on external displays?
<marcan>
yes, laptops still do early framebuffer bring-up
<marcan>
which is why M2* is not a problem there
<marcan>
only blocker there is me getting wifi up, and me being annoyed we still can't support desktops :p
<nicolas17>
what machine has wifi issues?
<marcan>
all the 2023 ones have a new wifi chip
<marcan>
just needs basic bringup (hopefully)
<nicolas17>
I feel like my M2 MBP 13" hit a sweet spot of new/fast vs asahi support :D
<marcan>
annoyingly, we only have iBoot keys up to 13.0beta1, which is like a month before M2 came out
<marcan>
that would've been *really* useful to have since it would tell us what the right way to talk to DCP to enable video via the iBoot protocol/etc on M2 with the display mux is
<marcan>
:/
<marcan>
though I guess getting keys for M2 builds would require someone with a dev/etc t8112 which is a whole different story...
<nicolas17>
hmm there has to be newer keys
<nicolas17>
let me search chat logs :P
<sven>
tbt in m1n1 lol. I wouldn’t wish that pain upon anyone :D
<nicolas17>
we never got around to putting mac keys on theapplewiki but tbh I hate using the wiki for keys, but I keep putting off a proper db/api for it...
<nicolas17>
yeah I was gonna say "there's newer post-M2 versions but isn't iboot different per device anyway", then I realized these *were* M2 :D
<sven>
pretty sure they mentioned in here or there was some toot or whatever
<marcan>
guess I have some ghidraing to do...
<nicolas17>
I heard the M1 keys came from a dev/whatever *iPad*
<sven>
hah
<nicolas17>
dunno about these M2 ones but it wouldn't surprise me if it was an iPad too :P
<sven>
I wonder if it’s rogue apple employees or if those dev devices, uh, fell of a truck
<marcan>
I've actually never looked at the iBoot dcp side before, the stuff we have in m1n1 was blindly reversed from the DCP *firmware* side
<marcan>
but I do know iBoot screws around with the other EPIC endpoints too since I saw the mailbox logs
<marcan>
so it'll be interesting to find out what it does and whether we can use it to bring up display on M2 desktops without full dcpep which would *suck*
<sven>
I got the dptx stuff up but back then I found no way to use the iboot ep. It was always complain about something
<marcan>
sven: how hard is it to stupid hardcode dpalt mode for atcphy?
<sven>
fixing that would be very interesting
<marcan>
ah ok
<marcan>
yeah
<sven>
uh… lots of magic pokes
<sven>
and you can’t fully hardcode it
<marcan>
I mean obviously it works on laptops for the disp0 output at *least*
<sven>
since the setup depends on link rate and orientation, etc.
<marcan>
right
<sven>
so essentially you need to talk to tipd and dptx and then do the setup
<nicolas17>
sven: "can't tell you what's my source or it would go away, Craig Federighi would change his home locks and stuff" (that's what I said when people asked me where I got watchOS ipsws)
<marcan>
but it shouldn't be too painful given we're not dealing with linux and hotplug right?
<sven>
it’s not *that* bad
<sven>
yeaj
<sven>
most of the pain comes from hotplug and interaction with dwc3 and thunderbolt
<marcan>
tipd in general sets up the alt modes by itself, right?
<sven>
yes
<marcan>
so we just have to query it to see if it found any?
<sven>
pretty Much
<sven>
from what I can tell you can’t even control it
<marcan>
should be easy to iterate the ports and find the first output and call it the boot display then
<sven>
the control commands from that tps6598x aren’t implemented
<marcan>
lovely
<sven>
but then again, this thing is likely based on newer tipd chups and TI really didn’t want to give me any datasheets
<marcan>
did we ever figure out if they manage to not screw up negotiation for DP+USB3 modes?
<sven>
“please just use the goshen ridge ridge reference design or talk to your account manager” 🙄
<nicolas17>
tipd = TI (company) USB-PD?
<marcan>
friend still has a monitor that goes straight into 4-lane DP+USB2 which is ridiculous (on macOS)
<sven>
if tipd does that I have no idea how to to work around it
<marcan>
sigh
<sven>
i couldn’t configure any priorities (also Not implemented)
<marcan>
I think it *is* possible to grab the firmware out of these things, but it probably needs swd shenanigans
<marcan>
I think someone managed to do it
<sven>
but again, maybe new commands in the usb4 variant
<marcan>
so if it comes to that we can probably go full RE on this mess and see what's possible
<sven>
so I’d have to look at the firmware
<marcan>
but story for another day
<sven>
yeah
<sven>
from what I know everyone reimplements TI’s firmware anyway because it apparently sucks :D
<nicolas17>
that's in ROM in the chip itself?
<sven>
i think I know how the update works
<sven>
but those are only patches
<sven>
and I couldn’t find any memory read command
<sven>
nicolas17: rom + patches on top of that in some flash
<sven>
I assume the rom is already apple specific though since the chip is rebranded as apple cd321x anyway
<nicolas17>
right, but it's not "iBoot loads firmware on boot" like others
<marcan>
firmware is in flash but xnu commands the patch load I think
<sven>
(fun story: if you used to google cd321x google would ask if you meant tps6598x before that was widely known :D)
<marcan>
so I think initially it runs from ROM only, that's how they implement the relative recoverability/safety
<marcan>
(basically it boots in "DFU" mode)
<sven>
hmm… then iboot already has to do that
<marcan>
no, we do it in m1n1
<sven>
I haven’t seen xnu send any patches
<marcan>
no I mean
<sven>
ohhhh
<sven>
yeah
<marcan>
the patches are in flash
<sven>
that makes sense
<marcan>
but it won't actually load/run them until you tell it to
<marcan>
presumably to guarantee you can always reflash it
<sven>
yeah, could be
<marcan>
(that's my interpretation anyway)
<sven>
that certainly fits
<nicolas17>
yeah, but the fact that it's patches means you can't just grab the full firmware off iBoot/XNU which is the annoying part here :P
<sven>
yup :(
<marcan>
yeah
<marcan>
it's just a pile of jumps to lalaland
<sven>
and I looked for a vendor command to read memory and didn’t find anything
<marcan>
and the ROM is definitely apple-specific
<marcan>
I looked at the patches, there's tons missing
<sven>
even after doing the weird unlock flash access dance
<marcan>
I think at least on some T2 version someone managed to SWD the ROM out, which is how those vendor commands were found
<marcan>
so hopefully that still works on current chips
<marcan>
also I think they use the same chips on dumb stuff like iPhone cases or something?
<marcan>
so there's probably a way to get a guinea pig like that and not destroy a mac
<sven>
they use that chip _everywhere_
<sven>
Even their dumb tbt3 to 2 adapter has an older variant on it
<marcan>
heh
<nicolas17>
searching cd321x on duckduckgo mostly shows me sven's commits lol
<marcan>
lol
<sven>
you’ll also find the ti version in almost every usb dock because I think it’s part of the intel thunderbolt reference design things they force onto vendors
<sven>
:D
<sven>
that thing is also silly. You can order the tbt controller off mouser/digikey but getting the datasheet require a Intel nda
<sven>
nicolas17: probably because apple calls that chip cd3212/3/etc and I only I made up that x because they’re all essentially the same
<nicolas17>
did you see the "USB-C to MagSafe 3 Cable" has updateable firmware?
<nicolas17>
if people complain about asahi telemetry tell them their charging cable has "analytics" too /s
<nicolas17>
sven: I see "Cypress" in this fw
<sven>
lol, just ordered a few cd3211 from china for 10 eur :D
<sven>
also, it seems to be cheaper to get a qfn breakout pcb made by jlcpcb than ordering a premade one 😅
Guest98 has quit []
lena6 has quit [Read error: Connection reset by peer]
vx has joined #asahi
vx is now known as Guest129
zhdi has joined #asahi
cylm_ has quit [Ping timeout: 480 seconds]
<marcan>
meh, firebloom makes iBoot reverse engineering so annoying :/
<sven>
oh, duh, I should’ve ordered the 3218 instead. Let me fix that
<sven>
stupid chips with similar names *sigh*
<jannau>
I've discovered at least one bug in my initial dptx for m1n1 which prevented that from working even if dptx + dcp_iboot on the primary dcp works
<chadmed>
wow $23 for a cd3218 on ali express. seems like a low reward for how hard it is to get these things to fall off the back of a truck in transit
<ar>
(what's firebloom?)
<sven>
I just ordered one of 10$ from eBay
<sven>
last one in that offer though
<sven>
but I don’t think I’ll need more than one unless I severely mess up the soldering
<sven>
*for 10$
<j`ey>
ar: it's a modified C toolchain that adds some memory safety stuff
<sven>
oh,lol, even 6 layer pcbs with covered vias are stupidly cheap on jlcpcb. I guess I’ll just route out all balls to pads then to make sure I don’t mess up the pinout
<marcan>
aaargh ghidra can't properly handle structs straddling registers and stack in function args :/
<marcan>
ar: fat pointers for C
<ar>
so, kinda like CHERI?
<maz>
sort of. only without any HW garantee.
leitao has joined #asahi
bisko has joined #asahi
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi
bcrumb has joined #asahi
<bcrumb>
Are asahi kernel updates for fedora going to be compatible with the arch version?
<bcrumb>
I suppose they should
<bcrumb>
I am heavily dependent on arch currently so asking for that reason
<bcrumb>
Will monitor answers in history log
bcrumb has quit []
elvishjerricco has quit [Remote host closed the connection]
elvishjerricco has joined #asahi
elvishjerricco has quit [Remote host closed the connection]
elvishjerricco has joined #asahi
elvishjerricco has quit [Remote host closed the connection]
elvishjerricco has joined #asahi
elvishjerricco has quit [Remote host closed the connection]
elvishjerricco has joined #asahi
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
afroboy has joined #asahi
afroboy has quit [Ping timeout: 480 seconds]
afroboy has joined #asahi
bcrumb has joined #asahi
bcrumb has quit []
chadmed has quit [Ping timeout: 480 seconds]
lena6 has joined #asahi
bcrumb has joined #asahi
jelly has quit [Remote host closed the connection]
bcrumb has quit [Quit: WeeChat 4.0.3]
bcrumb has joined #asahi
leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bcrumb_ has joined #asahi
jelly has joined #asahi
chadmed has joined #asahi
bcrumb has quit [Ping timeout: 480 seconds]
leitao has joined #asahi
bisko has joined #asahi
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hightower2 has joined #asahi
hightower4 has quit [Ping timeout: 480 seconds]
hightower2 has quit [Ping timeout: 480 seconds]
CoolStar_ has joined #asahi
bcrumb has joined #asahi
jeisom has joined #asahi
CoolStar has quit [Ping timeout: 480 seconds]
bcrumb_ has quit [Ping timeout: 480 seconds]
ciggi has joined #asahi
user982492 has joined #asahi
jeisom has quit [Quit: Leaving]
user982492 has quit [Remote host closed the connection]
lewurm`` has joined #asahi
jeisom has joined #asahi
user982492 has joined #asahi
lewurm has quit [Read error: Connection reset by peer]