#
✕ nick:sven
#asahi-dev · 2026-07-23 20:12
svenmacos vms have the same userspace as bare-metal macos, don't they?
#asahi-dev · 2026-07-23 20:03
sventhis is all gonna be so very cursed. i think i love it :D
#asahi-dev · 2026-07-23 19:58
svenmaybe commpage is enough because that's where it gets the values from
#asahi-dev · 2026-07-23 19:58
svenyeah, maybe
#asahi-dev · 2026-07-23 19:57
svenyup, direct sysreg write from EL0
#asahi-dev · 2026-07-23 19:57
svenlet me double check but iirc it's a direct sysreg write
#asahi-dev · 2026-07-23 19:56
svenflips between RX and RW
#asahi-dev · 2026-07-23 19:56
svenit's the fast JIT thingy
#asahi-dev · 2026-07-23 19:56
svenyes
#asahi-dev · 2026-07-23 19:56
svenand maybe we can disable that by messing with the commpage
#asahi-dev · 2026-07-23 19:56
svenonly exception i know about is that SPRR thing
#asahi-dev · 2026-07-23 19:55
sveni'm pretty sure EL1/GL1 is all r/o
#asahi-dev · 2026-07-23 19:54
sven(or GL0, whatever)
#asahi-dev · 2026-07-23 19:54
sveni don't know about the EL0 code
#asahi-dev · 2026-07-23 19:53
svenmy understanding is that at least XNU and that secure kernel thingy are pre-loaded by iboot
#asahi-dev · 2026-07-23 19:53
svenbut i guess we will need patching for when EL0 tries to e.g. access that sprr map for JIT
#asahi-dev · 2026-07-23 19:52
svenshould work since we know that xnu's code can't change anyway
#asahi-dev · 2026-07-23 19:52
svenmy current plan is to just replace all the unknown instructions we know about (genter,gexit,msr,mrs for locked sysregs) with hvc
#asahi-dev · 2026-07-23 19:51
sventhen we'd get the trap
#asahi-dev · 2026-07-23 19:51
svenwe could make the shadow table redirect unknown addresses to a page that's no access in stage 2
#asahi-dev · 2026-07-23 19:51
svenso sptm adds a new page at 0x1234 to the stage 1 table and we don't know about it so the shadow table just has no mapping.. ohh
#asahi-dev · 2026-07-23 19:50
sventhe faul will go to EL1, won't it?
#asahi-dev · 2026-07-23 19:49
svenhm.. true, that could work. requires patching the EL1 exception handler but this needs a bunch of patches to xnu anyway
#asahi-dev · 2026-07-23 19:44
svenbreak before make is e.g. invalidate old entry -> dsb -> tlbi -> add new entry -> dsb -> entry is live, so there's no maintenance insn we could trap after that entry has been added
#asahi-dev · 2026-07-23 19:41
sveni thought about trapping TLB maintenance instructions but that's not gonna be enough I think. if you're just adding new entries you don't have to invalidate anything if I read the ARM ARM correctly
#asahi-dev · 2026-07-23 19:41
svenpagetables just figure out which functions touch them and sniff arguments there
#asahi-dev · 2026-07-23 19:41
svenmeanwhile, i've been thinking about emulating sprr with shadow pagetables. the trickiest part is probably how to track changes, and i can really only come up with two solutions which i both dislike: a) map all pagetables read-only for the guests and track all changes whenever we get a trap to EL2 and b) since we know that only SPTM can change
#asahi-dev · 2026-07-23 18:12
svenah, no, now it worked
#asahi-dev · 2026-07-23 18:12
svenlol, even cancel workflow seems to do nothing
#asahi-dev · 2026-07-22 21:09
svendo you have the FB number yuka?
#asahi-dev · 2026-07-21 06:46
svenalso SPRR/GXF please /s
#asahi-dev · 2026-07-21 06:46
sven*than the
#asahi-dev · 2026-07-21 06:45
sveneventually the ones for cluster power off would be nice but that’s a bit harder to argue that the aic one and we don’t even know exactly which ones we need
#asahi-dev · 2026-07-21 06:39
sven:(
#asahi-dev · 2026-07-20 10:34
sven*we’ll only place one in m1n1
#asahi-dev · 2026-07-20 10:33
svenwe’ll only
#asahi-dev · 2026-07-20 10:25
sven:D
#asahi-dev · 2026-07-20 10:24
sven“Claude, rewrite this DCP driver in rust please” /s
#asahi-dev · 2026-07-19 08:35
svenlol
#asahi-dev · 2026-07-19 08:29
svenyeah, we can’t control anything outside soc/apple anyway and that tree is fairly boring
#asahi-dev · 2026-07-18 15:59
svennice!
#asahi-dev · 2026-07-18 09:20
svenwe can also deal with locked darts, it’s just very annoying
#asahi-dev · 2026-07-17 17:23
svenwe'll see, i have to finalize some tax related stuff before i can get money from that opencollective for hw, etc. anyway
#asahi-dev · 2026-07-17 17:22
svenyeah, there should be some clock divider or something like that somewhere
#asahi-dev · 2026-07-17 17:06
sveni suspects it's just some weirdnesss with the baudrate or something similar
#asahi-dev · 2026-07-17 17:05
sveni really have to get some of those devices with that broken debug-uart and hook them up to an oscilloscope
#asahi-dev · 2026-07-17 16:30
svenlol, i've said a few times that the ADT lies in here but I didn't expect it to be _that_ bad
#asahi-dev · 2026-07-17 06:50
sven:(
#asahi-dev · 2026-07-17 06:48
svenchadmed: since you're getting a lot of experience with that "looks identical but doesn't work" thing, wanna do tbt next? :>
#asahi-dev · 2026-07-16 20:13
sven:>

plus ›