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
brolin has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
eiln has quit [Quit: WeeChat 3.8]
eiln has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
nela5 has joined #asahi-dev
nela has quit [Ping timeout: 480 seconds]
nela5 is now known as nela
gabuscus has quit []
hightower2 has quit [Ping timeout: 480 seconds]
gabuscus has joined #asahi-dev
brolin has joined #asahi-dev
eiln has quit [Quit: WeeChat 3.8]
eiln has joined #asahi-dev
psykose has quit [Remote host closed the connection]
chadmed_ has joined #asahi-dev
<marcan> eiln: 10f means the intended mode is f but the actual mode is 0, which usually happens when a parent power domain is not turned on or something else is causing the domain to be down for some other reason
<eiln> marcan: on some runs it was b0f, is that different? seems to work after shutting it down though
<marcan> the 0 is what matters, the other flags have specific meanings. b would include PARENT_OFF which is your hint that something is wrong there.
<eiln> ah, ty. looking into it
<marcan> ok, I just realized pmgr.c is broken :p
<marcan> it tries to power up devices before their parents
<marcan> eiln: pushed a thing, please try it
<marcan> (untested but eh)
<marcan> should make the pmgr_adt_clocks_enable work properly now
<eiln> t8103 is unaffected, jannau/sasha has been testing ane0/ane2 for me
<marcan> might not have the same hierarchy there, or not get stuck if powered up in the wrong order
<eiln> merged & commented out the pd patch in ane-t6000 branch https://github.com/eiln/m1n1.git
<eiln> lmk if experiments/ane.py still runs fine
<eiln> wait i counted wrong hold on a min
<eiln> fixed
Z750 has quit [Quit: Ping timeout (120 seconds)]
Z750 has joined #asahi-dev
<sven> hmmm, nothing suspicious at first glance there
brolin has quit [Ping timeout: 480 seconds]
psykose has joined #asahi-dev
hightower2 has joined #asahi-dev
bisko has joined #asahi-dev
hightower2 has quit []
chadmed_ has quit [Quit: Page closed]
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eiln has quit [Ping timeout: 480 seconds]
eiln_ has joined #asahi-dev
Z750 has quit [Quit: Ping timeout (120 seconds)]
Z750 has joined #asahi-dev
roxfan has joined #asahi-dev
roxfan2 has quit [Ping timeout: 480 seconds]
<maz> marcan: VMKEYLO_EL2 caught my eye... I wonder if that's the key to another problem NV I've been facing...
MajorBiscuit has joined #asahi-dev
nsklaus has joined #asahi-dev
MajorBiscuit has quit []
MajorBiscuit has joined #asahi-dev
Tomdownsouth has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
MajorBiscuit has quit [Remote host closed the connection]
MajorBiscuit has joined #asahi-dev
MajorBiscuit has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #asahi-dev
eiln_ has quit [Ping timeout: 480 seconds]
eiln_ has joined #asahi-dev
bps has joined #asahi-dev
eiln_ has joined #asahi-dev
Tomdownsouth has quit [Ping timeout: 480 seconds]
<marcan> maz: that's for PAC, what are you thinking of?
<marcan> AIUI VMKEY* is a randomizer key mixed in so that different VMs have different PAC hashes, but it should be completely harmless to set it to any arbitrary (consistent) value.
<marcan> for macOS in m1n1 I set it to some random (maybe) constant
eiln_ has quit [Ping timeout: 480 seconds]
eiln_ has joined #asahi-dev
Tomdownsouth has joined #asahi-dev
bps has quit [Ping timeout: 480 seconds]
<maz> marcan: with NV, we have to trap ERET between the virtual EL2 and EL1. which means that when you do an ERETAA/ERETAB, EL2 needs to emulate the authentication.
<marcan> Oh hmm...
<maz> however, M2 seems to use different seeds for the authentication depending on the EL that performs it
<marcan> so I *think* Apple's custom PAC stuff is only enabled if you flip the right bits, so without that it *should* be spec-compliant
<maz> I've vaguely heard of something like that.
<marcan> does the spec say the authentication should be the same regardless of EL/TGE state?
<maz> it implies it, as ERETAA has to be emulatable by a higher EL. withtout that, you cannot emulate PAC correctly.
<maz> one potential alternative would be to have a custom mini-guest that is used only for the purpose of computing the PAC for ERETA{A,B}, but that is incredibly overkill.
<marcan> maz: tried a pacga in EL2/1/0 with TGE=0 and I get the same results, what am I missing?
<marcan> this is on m1pro though
<marcan> when I enable Apple mode indeed I get different results
<marcan> in particular EL2 changes, but EL1 doesn't since I didn't enable Apple mode for EL1 (which has its own register)
<marcan> oh, and once you've enabled Apple mode in EL2 you can't turn it off again
bisko has joined #asahi-dev
<maz> marcan: interesting. I wonder if I get caught by the PAC emulation happening once TGE has been switched back to 1. but the spec doesn't say anything about the value of TGE, and I guess it could use some tightening...
<maz> marcan: I have no idea what the Apple mode is though.
<marcan> the apple mode enables more keys and splits out the key registers for EL1/EL2/EL12 etc
<marcan> and enables the vmkey thing
<maz> gotcha.
<maz> they avoid the whole save/restore madness, which is terribly crap.
<maz> I'll get back to that at some point. I'm too deep into other sort of trap handling to context-switch now... thanks for giving it a go!
<marcan> let me try pacia too just in case
<marcan> let me try pacia too just in case
<marcan> maz: still works, make sure SCTLR_ELx has PAC enabled on both ELs of course
<maz> marcan: right. I must have messed up when I tried that months ago. TGE definitely is a good hint. thanks again.
<marcan> maz: also FWIW, TGE doesn't seem to make a difference here
<maz> well, the obvious conclusion is that I must have screwed up. I'm shocked.
<marcan> maz: also pacga and pacia give the same result (modulo bit mask) for the same inputs/keys, so if you want to bypass SCTLR/etc issues, just move the I keys into the G keys and use pacga and do your own bit masking to emulate what the guest would do
<marcan> and pacga works even with PAC disabled on EL2
<marcan> the spec says the PAC function must be a strict function of (input, modifier, keys), so this should hold for all compliant implementations
<marcan> (that all changes in apple mode, there they mix in a per-boot random value and other modifiers, which among other things lets them just use constants for the kernel keys since they are internally diversified anyway)
Tomdownsouth has quit [Ping timeout: 480 seconds]
korreckj328 has joined #asahi-dev
eiln_ has quit [Ping timeout: 480 seconds]
korreckj328 has quit [Remote host closed the connection]
brolin has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
Tomdownsouth has joined #asahi-dev
billak has joined #asahi-dev
billak has quit []
Tomdownsouth has quit [Ping timeout: 480 seconds]
eiln_ has joined #asahi-dev
grange_c68 has joined #asahi-dev
MajorBiscuit has quit [Quit: WeeChat 3.6]
korreckj328 has joined #asahi-dev
korreckj328 has quit [Remote host closed the connection]
korreckj328 has joined #asahi-dev
Tomdownsouth has joined #asahi-dev
zalyx0 has quit [Ping timeout: 480 seconds]
Tomdownsouth has quit [Ping timeout: 480 seconds]
cylm has joined #asahi-dev
<kettenis> marcan: looks like you broke chainloading
<kettenis> NameError: name 'AMX_CTL_EL1' is not defined
<marcan> ah yeah, forgot to push that
<marcan> kettenis: try now
<marcan> (I probably also broke a bunch of experiments, but meh :p)
<kettenis> better; thanks
bps has joined #asahi-dev
rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
Guest326 has quit [Quit: Bridge terminating on SIGTERM]
Jamie has joined #asahi-dev
rhysmdnz has joined #asahi-dev
Jamie is now known as Guest595
korreckj328 has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
TheMarcyMuppet has joined #asahi-dev
korreckj328 has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
bps has quit [Remote host closed the connection]
bps has joined #asahi-dev
TheMarcyMuppet has quit [Remote host closed the connection]
korreckj328 has quit [Remote host closed the connection]
bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
korreckj328 has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
WindowPain has quit [Read error: Connection reset by peer]
zalyx0 has joined #asahi-dev
WindowPain has joined #asahi-dev
eiln_ has quit [Quit: WeeChat 3.8]
nopeslide13 has quit [Ping timeout: 480 seconds]
StupidYui has quit [Remote host closed the connection]
StupidYui has joined #asahi-dev
brolin has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
brolin has joined #asahi-dev
eiln has joined #asahi-dev
brolin has quit [Ping timeout: 480 seconds]
eiln has quit [Quit: WeeChat 3.8]
nopeslide13 has joined #asahi-dev
nela has quit [Ping timeout: 480 seconds]
nela has joined #asahi-dev
bps has quit [Ping timeout: 480 seconds]
bcrumb has joined #asahi-dev
bcrumb has quit []
bcrumb has joined #asahi-dev
bcrumb has quit []
bcrumb has joined #asahi-dev
bcrumb has quit [Quit: WeeChat 3.8]