#asahi-dev · 2026-04-13 23:00
JamesCalligeros[m]https://asahilinux.org/docs/project/policies/slop/#asahi-dev · 2026-04-13 23:00
wilfredorlet RTKit stay in default state while CPU goes deep#asahi-dev · 2026-04-13 23:00
chaos_princessis this something an llm told you?#asahi-dev · 2026-04-13 22:59
wilfredorRTKit driver shows apple_rtkit_wake() requires active RTKit firmware, the wake path is mailbox-based, not interrupt-based#asahi-dev · 2026-04-13 22:57
chaos_princesswhat is your source on that one?#asahi-dev · 2026-04-13 22:57
wilfredor*try#asahi-dev · 2026-04-13 22:57
wilfredor0x29200401c is the wake-source control, writing 0xffffffff blocks all wake paths, please ry leaving ONE bit open (0xfffffffe, 0xfffffffb, 0xfffffff7, etc.) to allow SMC wake while keeping deep sleep#asahi-dev · 2026-04-13 22:52
chaos_princessper my previous message, that prevents deep sleep#asahi-dev · 2026-04-13 22:51
wilfredorjust delete this line orr x1, x1, #CYC_OVRD_DISABLE_WFI_RET #asahi-dev · 2026-04-13 22:50
chaos_princessis this something an llm told you?#asahi-dev · 2026-04-13 22:50
chaos_princess... please refer to lines 84-94 of the first script i posted#asahi-dev · 2026-04-13 22:49
wilfredorinstead of interrupt-based, use the actual macOS mechanism (SMC RTKit Mailbox Protocol )#asahi-dev · 2026-04-13 22:49
chaos_princesssuch as?#asahi-dev · 2026-04-13 22:47
wilfredoryour register sequence matches macos, but you're missing the power-gate override register setup and AIC interrupt masking configuration, full power-down (DISABLE_WFI_RET) won't wake interrupt-style, you need retention mode and interrupt routing#asahi-dev · 2026-04-13 22:19
chaos_princesswell, that pile of writes to 0x292004008 and up is supposed to configure wake sources#asahi-dev · 2026-04-13 22:19
chaos_princessunknown#asahi-dev · 2026-04-13 22:18
wilfredorIs there a different wake mechanism (not interrupt-based) that works with DISABLE_WFI_RET?#asahi-dev · 2026-04-13 22:17
chaos_princessjfyi, the register write sequence i use is the same as macos#asahi-dev · 2026-04-13 22:17
chaos_princessthis does not put the core into the deep sleep.#asahi-dev · 2026-04-13 22:17
wilfredorIMHO the flow should be CPU enters WFI → Interrupt arrives → CPU EXITS WFI → Executes wake_handler → wake_handler restores ACC_OVRD registers to normal state → CPU works again#asahi-dev · 2026-04-13 22:17
wilfredorhttps://pastebin.com/raw/PQSzwUAa#asahi-dev · 2026-04-13 22:15
chaos_princesscongratulations, you just put the core into shallow sleep and exited it, we already know how to do that#asahi-dev · 2026-04-13 22:14
wilfredorDISABLE_WFI_RET bit is the blocker, remove it and add a wake handler to restore registers#asahi-dev · 2026-04-13 21:56
wilfredorfair point, let me work through the tests manually and report back with results#asahi-dev · 2026-04-13 21:54
chaos_princessnope. please go somewhere else#asahi-dev · 2026-04-13 21:54
wilfredoryes the test is generated it based on the analysis of your original code and the wake-up logic issues we identified#asahi-dev · 2026-04-13 21:53
wilfredorpython3 ../wake_test.py#asahi-dev · 2026-04-13 21:53
chaos_princessis this llm-ed?#asahi-dev · 2026-04-13 21:52
wilfredorchaos_princess, please run this and report which test fails, that pinpoints exactly what's broken in the wake path https://pastebin.com/raw/R2yxyv91#asahi-dev · 2026-04-13 21:43
chaos_princessi have two scripts, one to set up the trampoline, other to put machine to sleep. should probably merge them#asahi-dev · 2026-04-13 21:42
JamesCalligeros[m]Oh i didn’t notice you put that at rvbar last time i looked at this#asahi-dev · 2026-04-13 21:38
chaos_princesswilfredor: and what kind of wake up logic do you expect to be there? there is code to set NTAP to 1, that should cause the smc to send an interrupt when the power button is pressed among other things#asahi-dev · 2026-04-13 21:37
chaos_princessJamesCalligeros[m]: yes https://pastebin.com/KfmQLUqr#asahi-dev · 2026-04-13 21:37
wilfredorthe offsets differ between T600x and T8103, offsets adapted for T8103, but the core issue is missing wake-up logic, not just MMIO addresse#asahi-dev · 2026-04-13 21:36
JamesCalligeros[m]Did we try going all out and setting up a trampoline at m1n1’s entry point etc#asahi-dev · 2026-04-13 21:36
chaos_princessi also have a second file that puts a print to serial directly at RVBAR, that one does not work either#asahi-dev · 2026-04-13 21:35
chaos_princesson resume from sleep, the cores jump to RVBAR, which will cause the m1n1 initialization code to be re-executed, and proceed to crash. #asahi-dev · 2026-04-13 21:34
wilfredorthe code freezes because there's no wake-up path once it enters deep sleep, there's no way out#asahi-dev · 2026-04-13 21:03
chaos_princessall hardcoded offsets are for m1 pro/max, if you want to run it on m1, you will have to change them#asahi-dev · 2026-04-13 21:03
chaos_princesshttps://pastebin.com/R0Uk4RHD - this puts the cores into deep sleep. At which point it freezes and no longer responds to keyboard, power button, or usb serial.#asahi-dev · 2026-04-13 21:01
wilfredoryeah, that sounds interesting, where is the cluster deep sleep entry handled right now? and on the wake-up side, is the main gap state restore, or are we missing some hardware or firmware sequence to bring the cluster back up?#asahi-dev · 2026-04-13 20:58
fl0_idchaos_princess I meant for wilfredor. I currently don't even have time to finish / test my m3 max device tree, and probably also don't have the skills to restore state from deep sleep...#asahi-dev · 2026-04-13 20:55
chaos_princesswant to try it?#asahi-dev · 2026-04-13 20:53
fl0_idchaos_princess yeah that's what I meant#asahi-dev · 2026-04-13 20:46
chaos_princess(i know how to put it into deep sleep, but not how to make it come out of it)#asahi-dev · 2026-04-13 20:46
chaos_princessit is useful, and we already kinda do it. What would be useful is someone figuring out how to bring a core cluster out of deep sleep.#asahi-dev · 2026-04-13 20:45
fl0_idchaos_princess could turning off and on cores be useful thing? (though not easy probably...)#asahi-dev · 2026-04-13 20:29
wilfredorok#asahi-dev · 2026-04-13 20:28
wilfredorI’d like to pick something useful without overlapping with ongoing work#asahi-dev · 2026-04-13 20:27
chaos_princessjust talk to tryhard[m], they seem to close to done