#asahi-dev · 2026-11-09 20:59
mmediouni[m]Watchtower back in the pre-KTRR days did a dance where it either trapped neon execution to EL3 or trapped interrupts to be somewhat guaranteed to run constantly without much of a perf impact#asahi-dev · 2026-11-09 20:58
svendidn’t know we could that, that would’ve been useful #asahi-dev · 2026-11-09 20:58
snooze6214[m]sent a code block: https://matrix.org/oftc/media/v1/media/download/AYH-sht2rnxT8HGcwNuRER2PvlC9Gz_Seug6nJjpeBLLY_m-w9PlKSYr8wPJ3IKX6-rkFy0DSt6-8JE0ZC6KT8JCeiCjOzsQAG1hdHJpeC5vcmcvWlBZWmJoaGxIeE5uR3JHeWtSd2JzT1hX#asahi-dev · 2026-11-09 20:56
chaos_princesssven: ok, so, we are not using hvc, we are using brk and mdcr_el2.tde#asahi-dev · 2026-11-09 20:56
mmediouni[m]Or use MDCR_EL2.TDE and do a breakpoint instr#asahi-dev · 2026-11-09 20:56
svenneat!#asahi-dev · 2026-11-09 20:56
mmediouni[m]Yes#asahi-dev · 2026-11-09 20:55
svenoh wait.. you mean map a page to EL0 that has not stage 2 backing and then try to read from that one?#asahi-dev · 2026-11-09 20:55
svenI just map a page that has hvcs at each exception#asahi-dev · 2026-11-09 20:54
svenor, well, I do something similar#asahi-dev · 2026-11-09 20:53
svenmmediouni[m]: yeah, that's what I already do in the SPRR/GXF emu but hooking that up and exiting to the hv shell sounds annoying#asahi-dev · 2026-11-09 20:53
mmediouni[m]sven: a trick to go EL0 to EL2 (if not VHE in-host) is a page mapped at stage 1 but not at stage 2#asahi-dev · 2026-11-09 20:52
svenfeel free to open a PR with that plus the CTRR hack#asahi-dev · 2026-11-09 20:51
sventhis was brought to you by staring at strings referenced from nearby functions :D#asahi-dev · 2026-11-09 20:51
sveni dunno why that isn't fatal on m5, it just complains if the exclave memory map is missing there#asahi-dev · 2026-11-09 20:50
snooze6214[m]sven: holy fuck this worked!!!#asahi-dev · 2026-11-09 20:48
svenchaos_princess: that's just a hvc handler, isn't it? I thought hvc from EL0 is UNDEF#asahi-dev · 2026-11-09 20:47
svenbut it's trying to read stuff from the device tree around that mov w4, #0x9d#asahi-dev · 2026-11-09 20:47
chaos_princesshttps://github.com/AsahiLinux/m1n1/blob/main/proxyclient/hv/trace_agx.py#L38#asahi-dev · 2026-11-09 20:47
svenbut I think I found what's wrong anyway. or, well, i have an educated guess because I didn't follow the entire path from failure to that exception#asahi-dev · 2026-11-09 20:46
svenbut i trap all exception to EL1 anyway so something like svc #whatever would work i guess but that's annoying#asahi-dev · 2026-11-09 20:46
svenmaybe, i never looked into gpu stuff#asahi-dev · 2026-11-09 20:46
chaos_princesssven: we had hv calls in m1n1 for gpu stuff, no?#asahi-dev · 2026-11-09 20:45
svenif that doesn't work "bootarg" instead of "bootargstring"#asahi-dev · 2026-11-09 20:45
svensnooze6214[m]: ^--#asahi-dev · 2026-11-09 20:45
sventry self.adt.create_node("/chosen/exclave-misc").bootargstring = self.tba.cmdline in proxyclient/m1n1/hv/__init__.py after e.g. self.adt["product"].exclaves_enabled = 1#asahi-dev · 2026-11-09 20:26
svenyeah, but i think you can only jump to EL1 which makes this annoying#asahi-dev · 2026-11-09 20:26
snooze6214[m]like a hvc call of some sort?#asahi-dev · 2026-11-09 20:25
sveni'd try patching that mov w4, #0x9d in the binary to something that escapes to the hv shell#asahi-dev · 2026-11-09 20:25
svenhrm, there's no way to jump from EL0 directly to EL2, is there?#asahi-dev · 2026-11-09 20:23
snooze6214[m]yeah makes sense :')#asahi-dev · 2026-11-09 20:23
svenlike for this non-sense which can't be figure out any other way probably#asahi-dev · 2026-11-09 20:22
svenin general it's also always a last resort#asahi-dev · 2026-11-09 20:22
snooze6214[m]ah okay, cool. makes sense#asahi-dev · 2026-11-09 20:22
svenfor exclaves that's fairly harmless since these don't contain any hardware drivers I think#asahi-dev · 2026-11-09 20:21
svenonly if you then don't contribute drivers in that area but write documentation instead#asahi-dev · 2026-11-09 20:21
snooze6214[m]also, may i ask when it is okay to disassemble apple binaries? so far i haven't (other than the disassembly in ctx() m1n1 output)#asahi-dev · 2026-11-09 20:19
svenuhhh.... wtf#asahi-dev · 2026-11-09 20:15
sveni'm looking for it in the disassembly, i think it's mov w4, #0x9d#asahi-dev · 2026-11-09 20:11
snooze6214[m]* can try finding 157 in, * some register/addresses pointed by registers. let#asahi-dev · 2026-11-09 20:11
snooze6214[m]* can try finding 157 in#asahi-dev · 2026-11-09 20:10
snooze6214[m]sven: i can try 157 in some register. let me check#asahi-dev · 2026-11-09 20:10
snooze6214[m]* ```... (full message at <https://matrix.org/oftc/media/v1/media/download/Abf-nBEu3rCNhrCdbPkO2AdIt3mQzUjQN10sfFRYXM2As4-nGIUYCCX8z3pkhKY_hOmcijGc_90WCMR8lnTZhVpCeiCgfHVAAG1hdHJpeC5vcmcvWEFOak1BZ1Z3cmxGYWxSUWJmdUdEc2pF>)#asahi-dev · 2026-11-09 20:10
snooze6214[m]* ```... (full message at <https://matrix.org/oftc/media/v1/media/download/AWt6y9mIZjCPFzkjHUbhVHH0H_B7efK79k-lUBmuzp2kuJimFafUbYEQ1hvHpnHEcbZvgslL1l3APhKOzxq1jXNCeiCgefQgAG1hdHJpeC5vcmcvWklvQ3NBWUlDR05MQVd2THlwRUdBb0FV>)#asahi-dev · 2026-11-09 20:09
snooze6214[m]no luck ig :/#asahi-dev · 2026-11-09 20:09
snooze6214[m]0x0#asahi-dev · 2026-11-09 20:09
snooze6214[m]>>> p.hv_translate(0x0000c005b4c4)#asahi-dev · 2026-11-09 20:03
sventhat's how we all start :D#asahi-dev · 2026-11-09 20:02
snooze6214[m]but i have no clue what im doing tbh