#asahi-dev · 2026-04-14 21:08
yukaI do not know which script you mean with msr scan. it would be in proxyclient/experiments?#asahi-dev · 2026-04-14 21:05
chaos_princessok#asahi-dev · 2026-04-14 21:05
yukayes#asahi-dev · 2026-04-14 21:04
chaos_princess26.whatever?#asahi-dev · 2026-04-14 21:04
yukaI updated like 5 days ago#asahi-dev · 2026-04-14 21:04
yukalatest#asahi-dev · 2026-04-14 21:04
chaos_princessoh, btw, quick check, what macos are you on?#asahi-dev · 2026-04-14 21:02
chaos_princessi think that is not the only place where iboot configures the boot core and then expects xnu to perform the same config on non-boot ones#asahi-dev · 2026-04-14 21:01
svenyeah, this sounds like it’s configurable #asahi-dev · 2026-04-14 21:00
chaos_princesswhy is it different on boot core then?#asahi-dev · 2026-04-14 21:00
yukaI really don't think this is configurable from what we have seen on M4#asahi-dev · 2026-04-14 21:00
yukalooking at xnu source there is no replacement for CYC_OVRD#asahi-dev · 2026-04-14 20:59
chaos_princessi really think that a msr scan is more promising#asahi-dev · 2026-04-14 20:59
yukaI will try patching all the relevant wfis. I thought it was many more and would be infeasible.#asahi-dev · 2026-04-14 20:47
chaos_princessand we do vhe with kernel running at el2#asahi-dev · 2026-04-14 20:47
chaos_princessthat is for nvhe#asahi-dev · 2026-04-14 20:46
yukaunless I somehow misremember the numbers of the exception levels#asahi-dev · 2026-04-14 20:46
yukaI think the kernel installs the kvm-stub in EL2 and then mostly runs in EL1#asahi-dev · 2026-04-14 20:46
svenand, uh, isn't the kernel running in EL2? how would that trap hack even work there?#asahi-dev · 2026-04-14 20:41
svenhave you found all wfi calls yet? i don't think there are that many. iirc there's also some framework for boot-time patching alternative instructions to work around errata already#asahi-dev · 2026-04-14 20:40
yukaI did not do it yet, but I somehow doubt there is a way to change this behavior#asahi-dev · 2026-04-14 20:39
chaos_princessdid msr scan not find anything?#asahi-dev · 2026-04-14 20:39
yuka2. Somehow patch all WFI calls inside the Linux kernel#asahi-dev · 2026-04-14 20:39
yuka1. Wait for 🍏 to deliver an iBoot update which makes WFI not lose register state#asahi-dev · 2026-04-14 20:39
yukaLike the other possibilities I see are:#asahi-dev · 2026-04-14 20:36
yukacan you elaborate?#asahi-dev · 2026-04-14 20:29
sventhat doesn't sound like a proper solution at all#asahi-dev · 2026-04-14 20:18
yukaBut also not sure how much overhead this would have#asahi-dev · 2026-04-14 20:18
yukaFor M4, I think I could enable WFI trapping and then handle the register save & restore in EL2? Like I would hack this into the Linux EL2 entrypoint. Not sure how difficult it would be to make it coexist with kvm.#asahi-dev · 2026-04-14 19:20
wilfredorI underestand, sorry about that, I have a M1 and a second machine for USB serial, I'll set up the HV, trace myself and capture the T8103 wake masks from macOS sleep, will post results when I have them#asahi-dev · 2026-04-14 19:17
chaos_princessand yes, you were already told to cut it out with farming out stuff to llms#asahi-dev · 2026-04-14 19:17
chaos_princesswilfredor: the reason i asked what HW you have is because then you can collect this data yourself and not order others around#asahi-dev · 2026-04-14 19:16
svenbut against our policy, so please stop this crap#asahi-dev · 2026-04-14 19:16
wilfredorclaude is your friend (not google)#asahi-dev · 2026-04-14 19:15
nicolas17tpw_rules: 💀#asahi-dev · 2026-04-14 19:15
wilfredorsven or chaos_princess, has anyone traced the T8103 PMGR wake event mask registers? On T600x they're at 0x292004008-0x292004020, but i need the T8103 equivalents to complete full system sleep (MBSE path), btw i have an HV trace script ready but wanted to check if this has already been captured, repo with the scripts: https://github.com/wilfredor/m1-deepsleep#asahi-dev · 2026-04-14 19:12
tpw_rulesdon't worry, i'm sure claude will figure it out!!#asahi-dev · 2026-04-14 17:57
svenalso, why would uart be powered down by a wfi sequence? that just makes no sense#asahi-dev · 2026-04-14 17:48
chaos_princessdid you just write to some register in pmgr that survives a reboot and concluded that this is a successful sleep entry/exit?#asahi-dev · 2026-04-14 17:47
svenwrites to powered down devices (what you call clock-gated) cause an SError and don't hang indefinitely#asahi-dev · 2026-04-14 17:47
chaos_princess"writes to gated MMIO stall the bus on Apple Silicon" - no, they SError#asahi-dev · 2026-04-14 17:43
wilfredoron Fedora 43 Asahi Remix, kernel 6.18.15, Apple M1 16GB RAM#asahi-dev · 2026-04-14 17:39
wilfredor ▎ is garbage after reset). Repo if useful: https://github.com/wilfredor/m1-deepsleep it was tested manually #asahi-dev · 2026-04-14 17:39
wilfredor ▎ after MBSE — writes to gated MMIO stall the bus on Apple Silicon, which matches the silent freeze. I adapted the scripts for T8103 with a trampoline that writes to #asahi-dev · 2026-04-14 17:39
wilfredor ▎ mini-PMGR scratch (always-on domain) before touching UART, so after a failed wake you can reboot and check if the core actually reached RVBAR. Also fixed the ret (LR#asahi-dev · 2026-04-14 17:39
wilfredorchaos_princess, I went through your sleep scripts and traced the wake path in m1n1 (smp.c, pmgr.c, cpu_regs.h). I think the trampoline at RVBAR hangs because UART is clock-gated #asahi-dev · 2026-04-14 15:16
tryhard[m]ok i managed to build#asahi-dev · 2026-04-14 14:56
tryhard[m]when all of them were pretty much enabled#asahi-dev · 2026-04-14 14:55
tryhard[m]that's what's being left after disabling btf... (full message at <https://matrix.org/oftc/media/v1/media/download/AUe0HLlEZRKFXBpHPHaXnck2WPmMQ2tNC99i65rxtpsLkzBdPpExuwwWKdRWOF3uZmtzjf3u6ubUnXEw-opFnitCed1JaDVAAG1hdHJpeC5vcmcvQ09ETXFnQ1BvTk9NZUxsZnB3cWREVVN6>)