#
✕ nick:marcan
#asahi-dev · 2023-05-08 08:25
marcanwell it's 4 on ARM right now but yeah
#asahi-dev · 2023-05-08 08:25
marcansven: yeah and I bet that's so the rtkit driver can use it for buffers
#asahi-dev · 2023-05-08 08:25
marcanthe amounts of hacks in there...
#asahi-dev · 2023-05-08 08:25
marcaneven with linux's bad subsystems sometimes
#asahi-dev · 2023-05-08 08:24
marcanI don't think people appreciate just how much clunkier and underdesigned xnu is compared to linux
#asahi-dev · 2023-05-08 08:23
marcanneed a hook from driver A to driver B? no problem, add a function!
#asahi-dev · 2023-05-08 08:23
marcanI love how apple just gets to not design anything and just invented DT-specified function calls for this
#asahi-dev · 2023-05-08 08:23
marcanALSA also has that layer (macaudio which ties everything together and makes it sane)
#asahi-dev · 2023-05-08 08:22
marcanit's just going to be more and more of a mess and hard to abstract out more
#asahi-dev · 2023-05-08 08:22
marcansome day we're going to have to poke them for something I bet
#asahi-dev · 2023-05-08 08:22
marcanyou know we have those retimers on i2c right?
#asahi-dev · 2023-05-08 08:22
marcanand yeah I'm getting the feeling very few other platforms handle this and they're all too particular to unify sanely anyway
#asahi-dev · 2023-05-08 08:21
marcansgtm
#asahi-dev · 2023-05-08 08:20
marcanwfm
#asahi-dev · 2023-05-08 08:20
marcandoesn't really work here
#asahi-dev · 2023-05-08 08:20
marcanyeah
#asahi-dev · 2023-05-08 08:20
marcanoh the other way around
#asahi-dev · 2023-05-08 08:20
marcanis that the one that's mostly intended for x86 machines with firmware doing everything?
#asahi-dev · 2023-05-08 08:19
marcanI wonder if this is going to be another mailbox or it actually makes sense to unify it at some point
#asahi-dev · 2023-05-08 08:19
marcanheh, lovely
#asahi-dev · 2023-05-08 08:18
marcanmodulo us getting stuff wrong it actually looks pretty decent as kernel abstractions go
#asahi-dev · 2023-05-08 08:18
marcanactually from what I saw of ASoC, it might be an interesting model to look at for how to design an abstraction that somehow works for a million disparate SoCs and codecs
#asahi-dev · 2023-05-08 08:17
marcanI encourage you to use as many horrible hacks as you want to make it work, because at this point it's more valuable to 1) make everything work, then 2) figure out how to fix the Linux subsystem mess once we know exactly how it has to work
#asahi-dev · 2023-05-08 08:16
marcanyeah that might explain some things
#asahi-dev · 2023-05-08 08:16
marcanha!
#asahi-dev · 2023-05-08 08:16
marcan(I'm actually surprised that worked as often as it did)
#asahi-dev · 2023-05-08 08:16
marcansounds like the codec shutdown vs clock shutdown was in the wrong order :D
#asahi-dev · 2023-05-08 08:12
marcanit's starting to smell like the audio codec issues we had, i.e. something is fundamentally broken in a way that causes races or undefined behavior, and that randomly gets better or worse with different kernels and configs
#asahi-dev · 2023-05-08 08:11
marcansven: unsupported kernel BS aside, someone on Reddit mentioned some 10gbps device not working (works via a 5gbps hub)
#asahi-dev · 2023-05-05 15:52
marcan(I probably also broke a bunch of experiments, but meh :p)
#asahi-dev · 2023-05-05 15:51
marcankettenis: try now
#asahi-dev · 2023-05-05 15:50
marcanah yeah, forgot to push that
#asahi-dev · 2023-05-05 11:13
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)
#asahi-dev · 2023-05-05 11:11
marcanthe spec says the PAC function must be a strict function of (input, modifier, keys), so this should hold for all compliant implementations
#asahi-dev · 2023-05-05 11:10
marcanand pacga works even with PAC disabled on EL2
#asahi-dev · 2023-05-05 11:09
marcanmaz: 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
#asahi-dev · 2023-05-05 11:04
marcanmaz: also FWIW, TGE doesn't seem to make a difference here
#asahi-dev · 2023-05-05 10:58
marcanmaz: still works, make sure SCTLR_ELx has PAC enabled on both ELs of course
#asahi-dev · 2023-05-05 10:57
marcanlet me try pacia too just in case
#asahi-dev · 2023-05-05 10:55
marcanlet me try pacia too just in case
#asahi-dev · 2023-05-05 10:51
marcanand enables the vmkey thing
#asahi-dev · 2023-05-05 10:51
marcanthe apple mode enables more keys and splits out the key registers for EL1/EL2/EL12 etc
#asahi-dev · 2023-05-05 10:42
marcanoh, and once you've enabled Apple mode in EL2 you can't turn it off again
#asahi-dev · 2023-05-05 10:41
marcanin particular EL2 changes, but EL1 doesn't since I didn't enable Apple mode for EL1 (which has its own register)
#asahi-dev · 2023-05-05 10:41
marcanwhen I enable Apple mode indeed I get different results
#asahi-dev · 2023-05-05 10:38
marcanthis is on m1pro though
#asahi-dev · 2023-05-05 10:38
marcanmaz: tried a pacga in EL2/1/0 with TGE=0 and I get the same results, what am I missing?
#asahi-dev · 2023-05-05 10:22
marcandoes the spec say the authentication should be the same regardless of EL/TGE state?
#asahi-dev · 2023-05-05 10:21
marcanso I *think* Apple's custom PAC stuff is only enabled if you flip the right bits, so without that it *should* be spec-compliant
#asahi-dev · 2023-05-05 10:21
marcanOh hmm...

plus ›