#
…

2023-05-05

00:36brolin has quit [Ping timeout: 480 seconds]
00:39brolin has joined #asahi-dev
01:09eiln has quit [Quit: WeeChat 3.8]
01:50eiln has joined #asahi-dev
01:50brolin has quit [Ping timeout: 480 seconds]
01:56nela5 has joined #asahi-dev
01:56nela has quit [Ping timeout: 480 seconds]
01:56nela5 is now known as nela
02:00gabuscus has quit []
02:03hightower2 has quit [Ping timeout: 480 seconds]
02:14gabuscus has joined #asahi-dev
02:25brolin has joined #asahi-dev
02:47eiln has quit [Quit: WeeChat 3.8]
03:11eiln has joined #asahi-dev
03:16psykose has quit [Remote host closed the connection]
03:26chadmed_ has joined #asahi-dev
03:31marcaneiln: 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
03:33eilnmarcan: on some runs it was b0f, is that different? seems to work after shutting it down though
03:34marcanthe 0 is what matters, the other flags have specific meanings. b would include PARENT_OFF which is your hint that something is wrong there.
03:35eilnah, ty. looking into it
03:38marcanok, I just realized pmgr.c is broken :p
03:38marcanit tries to power up devices before their parents
03:40marcaneiln: pushed a thing, please try it
03:40marcan(untested but eh)
03:40marcanshould make the pmgr_adt_clocks_enable work properly now
03:43eilnt8103 is unaffected, jannau/sasha has been testing ane0/ane2 for me
03:44marcanmight not have the same hierarchy there, or not get stuck if powered up in the wrong order
03:46eilnmerged & commented out the pd patch in ane-t6000 branch https://github.com/eiln/m1n1.git
03:47eilnlmk if experiments/ane.py still runs fine
03:48eilnwait i counted wrong hold on a min
04:07Z750 has quit [Quit: Ping timeout (120 seconds)]
04:07Z750 has joined #asahi-dev
04:08svenhmmm, nothing suspicious at first glance there
04:12brolin has quit [Ping timeout: 480 seconds]
04:32psykose has joined #asahi-dev
06:10hightower2 has joined #asahi-dev
06:18bisko has joined #asahi-dev
06:19hightower2 has quit []
06:30chadmed_ has quit [Quit: Page closed]
07:28bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
07:56eiln has quit [Ping timeout: 480 seconds]
07:59eiln_ has joined #asahi-dev
08:01Z750 has quit [Quit: Ping timeout (120 seconds)]
08:02Z750 has joined #asahi-dev
08:10roxfan has joined #asahi-dev
08:13roxfan2 has quit [Ping timeout: 480 seconds]
08:30mazmarcan: VMKEYLO_EL2 caught my eye... I wonder if that's the key to another problem NV I've been facing...
08:31MajorBiscuit has joined #asahi-dev
08:32nsklaus has joined #asahi-dev
08:33MajorBiscuit has quit []
08:33MajorBiscuit has joined #asahi-dev
08:48Tomdownsouth has joined #asahi-dev
08:57cylm has quit [Ping timeout: 480 seconds]
09:01MajorBiscuit has quit [Remote host closed the connection]
09:02MajorBiscuit has joined #asahi-dev
09:11MajorBiscuit has quit [Ping timeout: 480 seconds]
09:14MajorBiscuit has joined #asahi-dev
09:20eiln_ has quit [Ping timeout: 480 seconds]
09:26eiln_ has joined #asahi-dev
09:27bps has joined #asahi-dev
09:31eiln_ has joined #asahi-dev
09:36Tomdownsouth has quit [Ping timeout: 480 seconds]
09:47marcanmaz: that's for PAC, what are you thinking of?
09:48marcanAIUI 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.
09:48marcanfor macOS in m1n1 I set it to some random (maybe) constant
09:50eiln_ has quit [Ping timeout: 480 seconds]
10:01eiln_ has joined #asahi-dev
10:17Tomdownsouth has joined #asahi-dev
10:20bps has quit [Ping timeout: 480 seconds]
10:20mazmarcan: 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.
10:21marcanOh hmm...
10:21mazhowever, M2 seems to use different seeds for the authentication depending on the EL that performs it
10:21marcanso I *think* Apple's custom PAC stuff is only enabled if you flip the right bits, so without that it *should* be spec-compliant
10:22mazI've vaguely heard of something like that.
10:22marcandoes the spec say the authentication should be the same regardless of EL/TGE state?
10:23mazit implies it, as ERETAA has to be emulatable by a higher EL. withtout that, you cannot emulate PAC correctly.
10:25mazone 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.
10:38marcanmaz: tried a pacga in EL2/1/0 with TGE=0 and I get the same results, what am I missing?
10:38marcanthis is on m1pro though
10:41marcanwhen I enable Apple mode indeed I get different results
10:41marcanin particular EL2 changes, but EL1 doesn't since I didn't enable Apple mode for EL1 (which has its own register)
10:42marcanoh, and once you've enabled Apple mode in EL2 you can't turn it off again
10:46bisko has joined #asahi-dev
10:50mazmarcan: 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...
10:50mazmarcan: I have no idea what the Apple mode is though.
10:51marcanthe apple mode enables more keys and splits out the key registers for EL1/EL2/EL12 etc
10:51marcanand enables the vmkey thing
10:51mazgotcha.
10:52mazthey avoid the whole save/restore madness, which is terribly crap.
10:54mazI'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!
10:55marcanlet me try pacia too just in case
10:57marcanlet me try pacia too just in case
10:58marcanmaz: still works, make sure SCTLR_ELx has PAC enabled on both ELs of course
11:01mazmarcan: right. I must have messed up when I tried that months ago. TGE definitely is a good hint. thanks again.
11:04marcanmaz: also FWIW, TGE doesn't seem to make a difference here
11:07mazwell, the obvious conclusion is that I must have screwed up. I'm shocked.
11:09marcanmaz: 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
11:10marcanand pacga works even with PAC disabled on EL2
11:11marcanthe spec says the PAC function must be a strict function of (input, modifier, keys), so this should hold for all compliant implementations
11:13marcan(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)
11:28Tomdownsouth has quit [Ping timeout: 480 seconds]
11:41korreckj328 has joined #asahi-dev
11:56eiln_ has quit [Ping timeout: 480 seconds]
12:10korreckj328 has quit [Remote host closed the connection]
12:27brolin has joined #asahi-dev
12:37brolin has quit [Ping timeout: 480 seconds]
12:41Tomdownsouth has joined #asahi-dev
12:58billak has joined #asahi-dev
13:00billak has quit []
13:09Tomdownsouth has quit [Ping timeout: 480 seconds]
13:09eiln_ has joined #asahi-dev
13:30grange_c68 has joined #asahi-dev
13:42MajorBiscuit has quit [Quit: WeeChat 3.6]
14:10korreckj328 has joined #asahi-dev
14:15korreckj328 has quit [Remote host closed the connection]
14:17korreckj328 has joined #asahi-dev
14:29Tomdownsouth has joined #asahi-dev
14:57zalyx0 has quit [Ping timeout: 480 seconds]
15:35Tomdownsouth has quit [Ping timeout: 480 seconds]
15:49cylm has joined #asahi-dev
15:50kettenismarcan: looks like you broke chainloading
15:50kettenisNameError: name 'AMX_CTL_EL1' is not defined
15:50marcanah yeah, forgot to push that
15:51marcankettenis: try now
15:52marcan(I probably also broke a bunch of experiments, but meh :p)
15:54kettenisbetter; thanks
16:12bps has joined #asahi-dev
16:41rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
16:41Guest326 has quit [Quit: Bridge terminating on SIGTERM]
16:45Jamie has joined #asahi-dev
16:45rhysmdnz has joined #asahi-dev
16:45Jamie is now known as Guest595
17:02korreckj328 has quit [Ping timeout: 480 seconds]
17:41brolin has joined #asahi-dev
17:42TheMarcyMuppet has joined #asahi-dev
17:46korreckj328 has joined #asahi-dev
17:52brolin has quit [Ping timeout: 480 seconds]
18:19bps has quit [Remote host closed the connection]
18:19bps has joined #asahi-dev
18:31TheMarcyMuppet has quit [Remote host closed the connection]
18:45korreckj328 has quit [Remote host closed the connection]
18:53bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:07korreckj328 has joined #asahi-dev
19:11cylm has quit [Ping timeout: 480 seconds]
19:22WindowPain has quit [Read error: Connection reset by peer]
19:22zalyx0 has joined #asahi-dev
19:24WindowPain has joined #asahi-dev
19:38eiln_ has quit [Quit: WeeChat 3.8]
20:14nopeslide13 has quit [Ping timeout: 480 seconds]
20:53StupidYui has quit [Remote host closed the connection]
20:53StupidYui has joined #asahi-dev
21:01brolin has joined #asahi-dev
21:10brolin has quit [Ping timeout: 480 seconds]
21:12brolin has joined #asahi-dev
21:55eiln has joined #asahi-dev
22:15brolin has quit [Ping timeout: 480 seconds]
22:24eiln has quit [Quit: WeeChat 3.8]
22:33nopeslide13 has joined #asahi-dev
22:45nela has quit [Ping timeout: 480 seconds]
22:55nela has joined #asahi-dev
22:58bps has quit [Ping timeout: 480 seconds]
23:21bcrumb has joined #asahi-dev
23:21bcrumb has quit []
23:28bcrumb has joined #asahi-dev
23:30bcrumb has quit []
23:32bcrumb has joined #asahi-dev
23:52bcrumb has quit [Quit: WeeChat 3.8]
…