#asahi-dev · 2026-02-11 19:36
svensame difference#asahi-dev · 2026-02-11 19:35
murdakahWas JTAG not SWD#asahi-dev · 2026-02-11 19:35
murdakahhttps://www.youtube.com/watch?v=cFW0sYSo7ZM#asahi-dev · 2026-02-11 19:31
sventhat was misleading at best, he got a reply to the generic identify command but everything else was locked down#asahi-dev · 2026-02-11 19:31
svenno, he didn't#asahi-dev · 2026-02-11 19:31
murdakahI saw a talk by a guy who got SWD working on his iPhone vir USB-C (obviously) so I wonder whats different, I don't recall it being an old iphone#asahi-dev · 2026-02-11 19:29
svenapple is pretty damn good at securing their SoCs these days#asahi-dev · 2026-02-11 19:29
murdakah*evil#asahi-dev · 2026-02-11 19:29
murdakahsven: bloody hell that is just evel, authentication on SWD, in what world#asahi-dev · 2026-02-11 19:28
sventhere is also authentication these days so even if you have a device that has SWD enabled it needs to talk to apple's servers before it actually unlocks SWD afaik#asahi-dev · 2026-02-11 19:27
murdakahthat is unfortunate#asahi-dev · 2026-02-11 19:27
murdakahAh ok so still disconnects but inside the package#asahi-dev · 2026-02-11 19:26
sventhere are some fuses deep inside the SoC that are blown#asahi-dev · 2026-02-11 19:26
svenlol, no#asahi-dev · 2026-02-11 19:26
murdakahI've frequently seen debug outputs simply be disconnected from the pits by omitting a small surface mounted device, usually a zero ohm resistor (R0)#asahi-dev · 2026-02-11 19:25
sveni don't understand that question#asahi-dev · 2026-02-11 19:25
svencan you rephrase that?#asahi-dev · 2026-02-11 19:24
murdakah*SWD that is#asahi-dev · 2026-02-11 19:24
svenwhat?#asahi-dev · 2026-02-11 19:24
murdakahsven: But its only disabled with the absence of the R0 smd components I assume?#asahi-dev · 2026-02-11 17:48
svenapple gets access to SWD hardware debugging which they unfortunately disable for us :-(#asahi-dev · 2026-02-11 17:47
svenyeah, there's no EL3#asahi-dev · 2026-02-11 17:47
Shizmurdakah: there is no EL3 afaik :)#asahi-dev · 2026-02-11 17:43
sveni really hope apple can dynamically configure which msrs are read-only and will actually fix this with a firmware updaate#asahi-dev · 2026-02-11 17:42
svenyeah, i was thinking about something like that and in the worst case binary patching xnu to play nice. i was just confused when someone said it would prevent virtualization completely which i assume includes hacks like this#asahi-dev · 2026-02-11 17:40
mazwe used to do that in KVM, but that quickly led to some horrors, and we switched to the GIC active state, which is what the Apple EL2 register is replacing.#asahi-dev · 2026-02-11 17:40
mazbut you rely on the guest only checking for the STATUS bit, and not taking IMASK into account.#asahi-dev · 2026-02-11 17:39
mazsven: then you should be able to hack something by setting the IMASK bit in the CNT{P,V}_CTL_EL0 registers every time you have a pending timer interrupt.#asahi-dev · 2026-02-11 17:35
svenmaz: yes, agreed. i was asking in the context of virtualizing xnu under m1n1 where i don't mind corrupting whatever is necessary for EL1 #asahi-dev · 2026-02-11 17:12
chaos_princessand the reason we don't have access to el3 is because it does not exist at all here#asahi-dev · 2026-02-11 17:12
chaos_princessyou can connect an external debugger to the chip, it is just that that feature is disabled on production ones using fuses#asahi-dev · 2026-02-11 17:11
chaos_princessjtag or whatever#asahi-dev · 2026-02-11 17:10
murdakahI think its pretty clear then that we don't have access EL3 at all, just wondering how apple would debug any of this, even though they have the hardware descriptors#asahi-dev · 2026-02-11 17:03
murdakahchaos_princess: somehow i missed your response and just read after posting again haha, thanks#asahi-dev · 2026-02-11 17:02
chaos_princessthe thing that was said above was a shorthand for "el1 code (not data) is treated by el1 as read-only"#asahi-dev · 2026-02-11 17:00
murdakahsven: to rephrase my earlier question, is EL1 an exception level, and EL2 sits above that. Why is it readonly, if we boot from a more privileged level? I know this is an ARM arch question, but still learning the ropes. My reasoning that if memory in EL1 is readonly, how does anything useful get done if you cannot change state? #asahi-dev · 2026-02-11 16:51
mazeither way, this is shit.#asahi-dev · 2026-02-11 16:51
mazsven: without this register, you can't mask the timer registers in a way that is invisible to the guest. so either you corrupt the guest state by masking the timer in the EL1 register, or you end-up with a screaming interrupt that prevents you from making forward progress.#asahi-dev · 2026-02-11 16:41
sveneither way, i don't quite see how it would prevent virtualizing xnu and sptm both inside el1. hopefully someone at apple looks at FB21831949 though and hopefully it's possibly for them to re-configure which MSRs are read-only#asahi-dev · 2026-02-11 16:28
nickchanfor a hypervisor that doesn't switch guest context can get away with that#asahi-dev · 2026-02-11 16:28
sven(in m1n1, not in linux ofc)#asahi-dev · 2026-02-11 16:28
svenwhy does that prevent virtualization entirely and why can't that be hacked around?#asahi-dev · 2026-02-11 16:27
nickchanonly if SYS_IMP_APL_VM_TMR_FIQ_ENA_EL2 is available :-)#asahi-dev · 2026-02-11 16:25
svenjust to put this into context: I'd be faster and more likely to succeed in implementing GL2 virtualization *and* SPTM emulation *and* vmapple+hardware-kexts than finding a SPTM+CTRR bypass#asahi-dev · 2026-02-11 16:25
nickchansptm bypass is unlikely but CTRR bypass is absolutely not happening#asahi-dev · 2026-02-11 16:24
freetolgaalright im back to studying fundamentals then good luck#asahi-dev · 2026-02-11 16:24
nickchanit really depends on the degree of "CTRR Disable" is honored#asahi-dev · 2026-02-11 16:24
svenand really, speculation here only makes sense if you have enough technical background otherwise these ideas aren't very useful#asahi-dev · 2026-02-11 16:23
freetolgathat part i knew before saying this