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
chrisl has quit [Ping timeout: 480 seconds]
zumi_ has joined #asahi-dev
zumi has quit [Ping timeout: 480 seconds]
zumi_ is now known as zumi
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
john-cabaj has quit [Quit: john-cabaj]
john-cabaj has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
master91122 has quit [Quit: Connection closed for inactivity]
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
john-cabaj has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
yuyichao_ has quit [Ping timeout: 480 seconds]
chrisl has quit [Ping timeout: 480 seconds]
tobhe has joined #asahi-dev
hexdump02 has quit [Ping timeout: 480 seconds]
tobhe_ has quit [Ping timeout: 480 seconds]
catred has quit [Remote host closed the connection]
chrisl has joined #asahi-dev
nora_ has joined #asahi-dev
nora has quit [Ping timeout: 480 seconds]
chrisl has quit [Ping timeout: 480 seconds]
ddxtanx has quit [Remote host closed the connection]
ddxtanx has joined #asahi-dev
pb17 has quit [Remote host closed the connection]
pb17 has joined #asahi-dev
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
Larwive has joined #asahi-dev
chrisl has joined #asahi-dev
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit [Read error: Connection reset by peer]
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chadmed has quit []
chrisl has quit [Ping timeout: 480 seconds]
chadmed has joined #asahi-dev
zumi_ has joined #asahi-dev
zumi has quit [Ping timeout: 480 seconds]
zumi_ is now known as zumi
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
nimprod3l has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
nimprod3l has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
nimprod3l has joined #asahi-dev
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
<fl0_id>
@amarioguy - oh and if I tried to run it again, it would not give an error / timeout but just not respond and I'd have to close the shell forcefully
<sven>
fl0_id: you'd need to understand what actually changed and if that new way is indeed correct and then make it conditional on the compatible
<fl0_id>
sven mmh thx that already helps. though not sure how. maybe for starters I'd just add some print statements...
<sven>
adding print statements? how is that going to help?
<fl0_id>
to try to understand the data structure that it's reading before it breaks. to see what's what. Like just locally of course for trying things. sorry if I am misunderstanding something
<sven>
ah, sure, that might help
<sven>
i'd probably trace the pmu using the hv and see what values macos updates and if they match that new scrpad offset
croissant_ has joined #asahi-dev
opticron has quit [Read error: Connection reset by peer]
<sven>
and isn't the error count that thing that increases automatically?
<sven>
so maybe also do a few boots without resetting it and confirm that it's incremented
opticron has joined #asahi-dev
croissant has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
<fl0_id>
sven ok. it might be, I don't know enough to know which error count that s
<fl0_id>
*is
<fl0_id>
sven tracing is prob a good idea, but I think I don't have a setup yet for that. (so far I only have avery basic second macos container, which is now set up to boot m1n1 and would have to check how much work it would be to enable a ful hv / tracing setup on that
chrisl has joined #asahi-dev
balrog_ has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
balrog has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
cylm has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
zumi_ has joined #asahi-dev
zumi has quit [Ping timeout: 480 seconds]
zumi_ is now known as zumi
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
chrisl has joined #asahi-dev
pb17 has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
lion328 has quit [Quit: Leaving]
lion328 has joined #asahi-dev
apalos has quit []
apalos has joined #asahi-dev
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
Larwive has quit [Remote host closed the connection]
croissant_ has quit []
croissant has joined #asahi-dev
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
okb has joined #asahi-dev
Drago has joined #asahi-dev
jnn is now known as jn
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
Drago has quit [Ping timeout: 480 seconds]
Drago has joined #asahi-dev
Drago has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
lynndotpy has quit [Quit: bye bye]
lynndotpy has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
WindowPain4 has joined #asahi-dev
yuyichao_ has joined #asahi-dev
WindowPain has quit [Ping timeout: 480 seconds]
WindowPain4 is now known as WindowPain
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
eluks has quit [Remote host closed the connection]
eluks has joined #asahi-dev
zumi_ has joined #asahi-dev
zumi has quit [Ping timeout: 480 seconds]
zumi_ is now known as zumi
chrisl has joined #asahi-dev
chrisl has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
phire has quit [Ping timeout: 480 seconds]
<amarioguy>
fl0_id: saw the results - that register should be well defined on the platform?
<amarioguy>
the uart timeout is concerning tho - because an undefined MSR would throw an exception
<amarioguy>
which m1n1 then recovers from
<amarioguy>
sven: does m4 at least boot to m1n1 shell as of rn?
<sven>
dunno
<sven>
depending on your firmware version it may not boot at all due to an apple bug
<amarioguy>
right, heard of that one, for now, i'll probably just hard limit my support to m1/m2 and pro equivalents until i get more time to properly examine the m4 case
miyuh_ has joined #asahi-dev
<miyuh_>
a
<miyuh_>
hey all im new here.. i love linux and open source and i wanna contribute. what's the best way to get started?
<chaos_princess>
is there a specific missing feature that you are interested in?
<miyuh_>
to be honest i havent even installed it yet so maybe i should start there.. i am interested in getting into driver development though!
<chaos_princess>
so, i know it might sound unkind, but maybe pick an easier project? This one is unfortunately one of "you are thrown right into the deep end of the pool, figure it out yourself" ones.
<fl0_id>
amarioguy I guess so? you know more then me tbh. do you think it would make sense to try other registers, to check if it's just sth about this on or sth else?
<fl0_id>
I can also try updating my stage1 m1n1 / check if there were any changes or generally try to check uart
Drago has joined #asahi-dev
Drago has quit [Ping timeout: 480 seconds]
chrisl has joined #asahi-dev
<sven>
amarioguy: if you (or anyone else) wants to work on m4 support try disabling SPRR/GXF on M1/M2/M3 and make XNU boot under the hv. iirc there's even one kernel that also comes with SPTM
<sven>
i.e. emulate SPRR/GXF and all other apple instructions somehow
<sven>
should be possible but painful, might need nested virtualization
chrisl has quit [Ping timeout: 480 seconds]
<amarioguy>
fl0_id: hm - i guess you could try reading ICH_VTR_EL2? (would be a mrs(ICH_VTR_EL2) in m1n1 console) would verify if the CPU interface exists at least
ece314378925355451680698427415 has joined #asahi-dev
<amarioguy>
sven: for m4 bringup, i assume the problem is mainly that you need GXF for m1n1 to be able to do HV tracing?
<amarioguy>
or the opposite, where you need it jettisoned entirely?
<amarioguy>
ik that on m4 apple makes it so that you either run under SPTM at all times if you specify a mach-o to kmutil, or you don't get GXF at all if you do raw binary instead, but wouldn't tracing be possible in the latter case anyways?
<sven>
how?
<sven>
how would run xnu without gxf/sprr?
<amarioguy>
ohhhh i see the dilemma now ugh
<sven>
+you
<sven>
right, so we can simulate that situation on m1/m2/m3 already by just disabling it ourselves
<sven>
it's gonna be messy though since the pagetable permission bits will be all wrong and we'll have to fix that all up
<amarioguy>
right - i have an m4 system anyhow, just got it in today so i can look into it in a day or so - i believe apple does have a way to do nested virtualization of SPTM/GXF stuff so it probably can be done but to say "messy" is putting it lightly i suspect
<sven>
so we'll need two sets of shadow pagetables for XNU-EL2 and XNU-GL2 and keep that all in sync
<amarioguy>
btw moving to asahi-re for a sec
<sven>
nested sptm/gxf virt probably just uses the hardware itself
<sven>
which is disabled for raw boot objects so that won't help us i think
<amarioguy>
yes exactly my concern, if the de-feature disables the nested case, that's bad
<amarioguy>
i assume the KDK kernels also need SPTM?
<sven>
it's gonna disable all apple-specific extensions
<sven>
yeah, open source xnu contains the SPTM entry point
<sven>
one of the first thing it does it call out to SPTM there
<chaos_princess>
you need a real macos install to run it under hv, otherwise it will kernel panic shortly after loading the kernel
<chadmed>
if you want to save space you _can_ install m1n1 on top of your macos install. the operation is reversible by running bputil -f on the container
<chadmed>
if you have data on macos that you care about then ofc you should use a second macos install with the hv
<amarioguy>
sven: no yea for sure this is definitely not a single day work, definitely didn't mean to imply that, personally doubt i'm gonna be the one to finish it out