ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
Wubbzy04 has quit [Ping timeout: 480 seconds]
Wubbzy04 has joined #asahi-dev
pounce has joined #asahi-dev
iaguis has joined #asahi-dev
Wubbzy04 has quit [Ping timeout: 480 seconds]
Wubbzy04 has joined #asahi-dev
iaguis has quit [Ping timeout: 480 seconds]
kidplayer666 has quit [Quit: Connection closed for inactivity]
Wubbzy04 has quit [Ping timeout: 480 seconds]
jeisom has quit [Quit: Leaving]
iaguis has joined #asahi-dev
Wubbzy04 has joined #asahi-dev
rootbeerdan has quit [Quit: rootbeerdan]
rootbeerdan has joined #asahi-dev
gmuuywom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Wubbzy04 has quit [Ping timeout: 480 seconds]
jeisom has joined #asahi-dev
Wubbzy04 has joined #asahi-dev
Wubbzy04 has quit [Ping timeout: 480 seconds]
jeisom has quit [Ping timeout: 480 seconds]
tdmackey has joined #asahi-dev
CoolStar has quit [Read error: Connection reset by peer]
KxCORP has quit [Ping timeout: 480 seconds]
KxCORP has joined #asahi-dev
crabbedhaloablut has joined #asahi-dev
john-cabaj has quit [Ping timeout: 480 seconds]
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #asahi-dev
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #asahi-dev
tristan2_ has joined #asahi-dev
tristan2 has quit [Ping timeout: 480 seconds]
phire has quit [Remote host closed the connection]
phire has joined #asahi-dev
<DannyB> I got m3 working. It was the dumbest thing in the world and now i am going to hang my head in shame.
<DannyB> On the m3's, mem_size_actual is not set in the boot_args. It's just 0. XNU uses mem_size (masked with ~page_size) in that case
<DannyB> we do not
<DannyB> so it was not actually creating the whole of memory region map
<DannyB> (but also not issuing any error)
csbaur^ has joined #asahi-dev
<maz> well, that's just a lot of memory! :D
<maz> in any case, congrats, and good that you got to the bottom of it!
<maz> you just have to sort out the interrupt controller now...
<sven> hah, nice! glad it works now :)
c4sp3r has joined #asahi-dev
c4sp3r has quit []
kilolima has quit [Remote host closed the connection]
RoguePlanet has joined #asahi-dev
RoguePlanet has quit []
kidplayer666 has joined #asahi-dev
sneak has quit []
sneak has joined #asahi-dev
baozich has joined #asahi-dev
chadmed has quit [Remote host closed the connection]
<j`ey> DannyB: woo
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
iaguis_ has joined #asahi-dev
iaguis is now known as Guest8643
iaguis_ is now known as iaguis
Guest8643 has quit [Ping timeout: 480 seconds]
baozich has quit [Ping timeout: 480 seconds]
jeisom has joined #asahi-dev
<DannyB> maz: The interrupt controller is done. USB required a little new code but just about done. Mostly because apple matches anything with a certain compatible string instead of a fixed path i2c0 (which doesn't even exist on the m3 max). So i had to add a tree walk to find the compatible HPM instances because the code assumes they are i2c0 (which doesn't even exist on this machine) and that they are a subpath of i2c0 (the
<DannyB> subpath doesn't exist either).
<maz> DannyB: amazing!
<j`ey> DannyB: gonna push to the PR?
<maz> any chance you could share the idregs?
<DannyB> oh crap forgot about that, one sec
<sven> very nice
<maz> (hopefully no major new feature so that I don't have to start saving money... :D)
<sven> hah
<sven> i‘ll probably wait for the soc with usb4gen2 or however that even faster thunderbolt thing Intel announced it called :)
<sven> *is
<maz> sven: and you'll spend another 3 years reverse-engineering it! ;-)
<sven> probably *sigh*
<sven> doesn’t help that $work actually wants me to do some work they pay me for as well ;)
<maz> yeah, same here. fortunately, I managed to sell NV as being relevant to $work. it is quite a stretch of one's imagination, but hey...
<sven> hah, nice. my day job is entirely unrelated to Linux so selling anything I do as relevant for them is probably impossible :D
baozich has joined #asahi-dev
nicolas17 has quit [Ping timeout: 480 seconds]
baozich has quit [Ping timeout: 480 seconds]
utsweetyfish has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
john-cabaj has joined #asahi-dev
roxfan2 has joined #asahi-dev
roxfan has quit [Ping timeout: 480 seconds]
nicolas17 has joined #asahi-dev
eiln has joined #asahi-dev
<DannyB> PRODUCT: Mac15,9
<DannyB> NAME: MacBook Pro (16-inch, M3 Max, Nov 2023)
<DannyB> MODEL: j516cap
<DannyB> SRTG: iBoot-8104.0.0.300.45
<DannyB> CPRV: 0x12
<eiln> niiice
<j`ey> nicolas17: ^
utsweetyfish has joined #asahi-dev
eiln has quit [Quit: WeeChat 4.1.1]
jnn is now known as jn
<krbtgt> what was the workaround that beta4 added?
russelltg has joined #asahi-dev
<DannyB> oh well, USB is now powered/controled by an SPMI controller
<DannyB> So that will have tow ait
john-cabaj has quit [Remote host closed the connection]
flom84 has joined #asahi-dev
john-cabaj has joined #asahi-dev
<DannyB> i'll see if the phys will just power on magically without having to twiddle bits
<DannyB> i'm sure this will go swimmingl
<DannyB> y
baozich has joined #asahi-dev
<sven> huh
<sven> Can you upload the adt somewhere? (note that iirc the wifi password and possibly other personal data is in there and you may want to remove those)
<DannyB> There is no i2c0 anymore, or hpmBusManager, the hpm devices are children of an SPMI nub
<sven> weird
<DannyB> AppleHPM kext has been updated to handle it
<sven> Sounds like they changed their usb pd controller chips
<DannyB> it looks like they call it a "TC Controller"
<DannyB> there is an appletccontroller class now in AppleHPM that seems to do the work
baozich has quit [Ping timeout: 480 seconds]
<DannyB> and the hpm are compatible with usbc,sn20120x,spmi
<sven> Type C controller maybe
<DannyB> the drd's and such still exist
<DannyB> so it's just power and interrupt and mode control
<sven> yeah, sounds like a new pd controller
<DannyB> beyond my skills :)
<sven> can’t find anything public about sn20120x :/
<sven> there’s a decent chance that device mode is still going to work if you just ignore that thing
<sven> (unless they also changed the PHY)
<DannyB> the phys are still compatible with the old one
<DannyB> staring this doesn't look horribly complicated
midou has quit [Ping timeout: 480 seconds]
<sven> device mode should work then since it doesn’t need VBUS to be powered
<DannyB> i think the sn is synopsis
flom84 has quit [Quit: Leaving]
<DannyB> I think this is a synopsis based usb-c power delivery controller
<DannyB> sorry, synopsys
<sven> maybe it’s part of the soc now
<DannyB> yeah, that would make sense
<DannyB> what format you want the ADT in
<DannyB> i have the ioreg archive around, but i can get whatever is helpful
<sven> oh, you already told me all the interesting bits :)
<DannyB> ;-)
<DannyB> dart: dart /arm-io/dart-usb0 at 0x702f80000 is a t8110
<DannyB> dart: dart /arm-io/dart-usb1 at 0xb02f80000 is a t8110
<DannyB> dart: dart /arm-io/dart-usb2 at 0xf02f80000 is a t8110
<DannyB> USB1: initialized at 0x10004dec2e0
<DannyB> USB0: initialized at 0x1000702bc30
<DannyB> USB2: initialized at 0x10004dec860
<DannyB> my hack maybe worked?
midou has joined #asahi-dev
<sven> looks good do far!
<sven> *so
<DannyB> AIC seems off
<DannyB> AIC: AIC3 with 1/2 dies, 2528/4096 IRQs, reg_size:40004 die_stride:04a00
<DannyB> not sure i believe it's 2 dies
minecrell has quit [Quit: Ping timeout (120 seconds)]
minecrell has joined #asahi-dev
<DannyB> they work
<DannyB> i can get proxyclient over normal usb
<j`ey> DannyB: woo, now boot linux!
<DannyB> Okay, time to package this up in the pr
<DannyB> before i get much further
<sven> nice work :-)
<DannyB> thanks for your help :)
<DannyB> i never would have figured this out without bouncing things off people here :)
<maz> you did a brilliant job, congrats!
billak has joined #asahi-dev
RoguePlanet has joined #asahi-dev
RoguePlanet has quit []
<janneg> DannyB: it is 1 die. the second number is the maximum numnber of dies the implemenation can handle. the theoretical limit is 8 but so far Mx Max can only handle irqs from 2 dies i.e. for Mx Max pairs in Mx Ultra (if aic3 in still compatible to aic2 in that regard)
<janneg> ifixit has identifies a Texas Instruments SN2012017 battery charger on the iphone 15 pro
<janneg> but the macbook pro teardown has Texas Instruments SN25A12 USB type-C controllers
<janneg> not that either of those has any useful public information
kidplayer666 has quit [Quit: Connection closed for inactivity]
tbodt has quit []
tbodt has joined #asahi-dev
<nicolas17> macOS 14.1.2 is out
baozich has joined #asahi-dev
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi-dev
baozich has quit [Ping timeout: 480 seconds]
gmuuywom has joined #asahi-dev
gmuuywom has quit []
<nicolas17> DannyB: this is CPID 6031 right?
<nicolas17> apparently it's not the same bootrom as M3 Pro :|
gmuuywom has joined #asahi-dev
gmuuywom has quit []
gmuuywom has joined #asahi-dev
gmuuywom has quit []
billak has quit [Quit: Konversation terminated!]
baozich has joined #asahi-dev
baozich has quit [Ping timeout: 480 seconds]
<janneg> M3 Macbook Pro still uses cd3217 as type-c controller
pthariensflame has joined #asahi-dev
<nicolas17> looks like macOS 14.1.2 is just a WebKit security bugfix
pthariensflame has quit []
<kettenis> janneg: those u-boot memory map updates are just for completeness?
<janneg> kettenis: partially, dcpext0/dispext0 on t602x which drives simple-framebuffer needs ps_afr from pmgr_gfx at 0x404e80000
<janneg> 0x480000000 is only for completeness without current use
<kettenis> i'm asking to decide whether I should try to get this included in 2023.01 or if it is ok for this to go onto the -next branch
<janneg> u-boot accesses the whole simple-framebuffer power-domain tree and runs into a data abort on the unmapped 0x404e80000 + 0x100 with https://github.com/AsahiLinux/linux/commit/760ed8e3be2f4a8c550f197aeb135e7564e0ee2e
<janneg> don't ask my why ps_dispext0_cpu0 has ps_afr as parent (via ps_dispext0_sys)
<leio> I wonder if that was the u-boot crash I had then and still haven't looked further after just payloading kernel instead to stage2
<leio> that was something about address 0x2404e80100
<janneg> leio: yes. m2 ultra always used dcpext0 (on the second die)
<leio> ok, so I might be able to get EFI now then, great
<janneg> the second die has an offset of 0x2000000000
<leio> don't expect that to help for HDMI though, but I'll try to get to u-boot for a proper gentoo installer thing work at some point again
kidplayer666 has joined #asahi-dev
<janneg> leio: I have a partial solution for the dcp/hdmi issue on linux. dcp at least wakes up but is not fully working except with tracing and verbose rtkit syslog logging
<j`ey> more timing fun :(
<leio> janneg: ok. I'm busy on workdays mostly in macOS for iOS stuff anyhow, no hurry, but if I can help test if it's a matter of no suitable device then I can do that
<janneg> I'm not sure about that. I tried horrible mdelay() crimes without any luck
<leio> maybe in about two weeks I'm back fully in my dear GNOME UI and can stop being frustrated about the window management :)
<leio> but yeah, if it's a matter of device, we can also do live debugging session if it helps, etc
<kettenis> push for 2024.01 it is then
<janneg> I think it's the same problem I see/saw with dcp on the m2 pro so until that's solved I can test myself
<leio> it's just hitting somehow harder on the ultra?
<janneg> we could try dcpext1 and see if that fixes the issue on the ultra as well (don't ask me why that doesn't depend on ps_afr)
<leio> I'd be game, but in an hour or tomorrow/saturday
roxfan2 is now known as roxfan
WindowPa- has joined #asahi-dev
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
WindowPain has quit [Ping timeout: 480 seconds]
___nick___ has quit [Ping timeout: 480 seconds]
nicolas17 has quit [Read error: Connection reset by peer]
nicolas17 has joined #asahi-dev
PaulFertser has quit [Ping timeout: 480 seconds]
PaulFertser has joined #asahi-dev
pthariensflame has joined #asahi-dev
pthariensflame has quit [Quit: Textual IRC Client: www.textualapp.com]
john-cabaj has quit [Remote host closed the connection]
john-cabaj has joined #asahi-dev
<DannyB> nicolas17: yes
<DannyB> janneg: I have a feeling the m3 regular is just a chip replacement and nothing else
<DannyB> So fun question that should be obvious that isn't
<DannyB> unlike the other macbook pro's, the m3 max starts on cpu4, and not cpu0. Is there a way to tell which one we are currently on? smp_start_secondaries assumes we start on CPU0, and then crashes trying to start our current CPU :)
<DannyB> but it's not obvious to me how to figure out which of the device tree nodes represents the one we are currently running on.
<DannyB> (and there does not appear to be like /chosen/primary-cpu or something like that
<DannyB> i guess extract the core/cluster/die ids and see if they match and skip it
<DannyB> or something
<kettenis> does it start on one of the P-cores now?
<j`ey> look at the mpidr_el1 register?
<DannyB> yes, it starts on the first p-core
<janneg> I suppose M3 macbook pro is an earlier design than the m3 pro/max. It was supposed to be announced in the summer but is late because there was not enough chip supply for macbook air 15"
<janneg> so it looks more like the m1/m2 macbook pro 14"
<DannyB> j`ey: The core number in MPIDR_EL1 is 0.
<j`ey> oh
<kettenis> is MPIDR_EL1 entirely 0? Or just the core number within the cluster?
<DannyB> ooh good question
<DannyB> i didn't think to check whether the other AFF bits are the cluster and die
jeisom has quit [Ping timeout: 480 seconds]
<DannyB> oh they aren't, duh
<DannyB> okay, this will be esay
<DannyB> actually, xnu does it a super funny way
<DannyB> they read all the entries and see which has the state string "running"
<DannyB> lol
<nicolas17> janneg: ...was there a m1/m2 macbook pro 14"?
<nicolas17> I thought M1 and M2 were only used on the 13", and the 14" started on M1/M2 Pro
chadmed has quit [Remote host closed the connection]
jeisom has joined #asahi-dev