#
✕ nick:yuka
#asahi-dev · 2026-06-14 10:34
yukaYes I already noticed that in the adts
#asahi-dev · 2026-06-14 10:18
yukaI'm strongly guessing M4* and M5* are all affected. Is there some other place I could find the MIDR part numbers?
#asahi-dev · 2026-06-14 10:13
yukaDoes anyone have an M4 Max and M5* to pull the MIDR part no from and run the WFI experiment?
#asahi-dev · 2026-06-14 10:00
yukaNope, wfe does not work, not even for booting a tiny kernel. It simply gets stuck and never wakes up again once the secondaries are initialized.
#asahi-dev · 2026-06-14 09:45
yukajust not because of losing state
#asahi-dev · 2026-06-14 09:45
yukaAnd btw, this still does not fully make M4 boot reliably, it still crashes
#asahi-dev · 2026-06-14 09:45
yukaI mean, I can try it. It led to problems in the past.
#asahi-dev · 2026-06-14 09:43
yukahttps://cyberchaos.dev/yuka/linux/-/commit/481caf9cb9c1a114056cb1833958713dbd5bf86d
#asahi-dev · 2026-06-14 06:44
yukaThere is some other race condition on M4 which causes the secondaries to crash with odd (seemingly random) stack traces
#asahi-dev · 2026-06-14 06:44
yukaThis CYC_OVRD setting makes the M3 cores intentionally lose state on WFI, and this way I was able to confirm that replacing wfi and wfit with nops works!
#asahi-dev · 2026-06-14 06:43
yukaI now have a clean environment to test patches for WFI losing state in, by running it on M3 and setting CYC_OVRD_WFI_MODE(0) or CYC_OVRD_WFI_MODE(3)
#asahi-dev · 2026-06-14 06:41
yukaThere is something other than WFI losing state causing linux crashes with smp enabled on M4+
#asahi-dev · 2026-06-13 18:27
yukaI just had to use the timer correctly
#asahi-dev · 2026-06-13 16:42
yukaShould WFI also wake up on SEV? I couldn't find information on that
#asahi-dev · 2026-06-13 16:41
yukaI found that unmasking the CNTP timer interrupts before wfi makes it immediately wake up again and not lose any state
#asahi-dev · 2026-06-13 16:41
yukaI can put a core into wfi no problem, the question is how to wake it up again
#asahi-dev · 2026-06-13 16:40
yukaso essentially writing an experiments/wfi.py
#asahi-dev · 2026-06-13 16:40
yukaI'm looking for a way to reliably reproduce the wfi losing state, without needing to boot a linux
#asahi-dev · 2026-06-13 15:29
yukam1n1 saves that + x0
#asahi-dev · 2026-06-13 15:29
yukaAh
#asahi-dev · 2026-06-13 15:27
yukathe save happens before we read cyc_ovrd
#asahi-dev · 2026-06-13 15:27
yukaI don't think so
#asahi-dev · 2026-06-13 15:26
yukabut x0 and x18 don't need preserving?
#asahi-dev · 2026-06-13 15:25
yukaWhy does the wfi save/restore code save exactly registers x0, x18-x30 and not x1-x17?
#asahi-dev · 2026-06-13 12:04
yukadoes not work. invalid command and the state remains unchanged
#asahi-dev · 2026-06-13 12:01
yukamode = DBMa
#asahi-dev · 2026-06-13 12:01
yukathen I read 0x03 again
#asahi-dev · 2026-06-13 12:01
yukathen I do the LOCK (with any code) and DBMa commands
#asahi-dev · 2026-06-13 12:01
yukamode = APP
#asahi-dev · 2026-06-13 12:01
yukathat's what I did
#asahi-dev · 2026-06-13 11:40
yukafun, how is it working with a 4 byte data1 then in linux
#asahi-dev · 2026-06-13 11:37
yukathen it doesn't give invalid cmd?
#asahi-dev · 2026-06-13 11:37
yukahow do you know how many bytes it wants?
#asahi-dev · 2026-06-13 11:37
yuka7?
#asahi-dev · 2026-06-13 11:34
yukaah oki
#asahi-dev · 2026-06-13 11:34
yukabut you mean last time you tried?
#asahi-dev · 2026-06-13 11:34
yukaI didn't see you try that today?
#asahi-dev · 2026-06-13 11:33
yuka> with the raw device
#asahi-dev · 2026-06-13 11:15
yukaok
#asahi-dev · 2026-06-13 10:02
yukaHmm, I write 'J514' to DATA1, then I read it back, it matches what I wrote. Then I execute the command and now it's only '514'
#asahi-dev · 2026-06-13 09:56
yukaso far I only know that the SSPS command works correctly with it, which only has a 1 byte param
#asahi-dev · 2026-06-13 09:55
yukaand then the LOCK param never gets written correctly
#asahi-dev · 2026-06-13 09:55
yukapossibly writing more than 1 byte to a reg is broken in my m1n1 spmi code
#asahi-dev · 2026-06-13 09:52
yukait does successfully go to DBMa mode, seemingly regardless of the key I specify
#asahi-dev · 2026-06-13 09:51
yukaI mean, how do I know that it works?
#asahi-dev · 2026-06-13 09:48
yukaI suspect something is still wrong with my key
#asahi-dev · 2026-06-13 09:48
yukajannau: DISC and DVEn work from linux
#asahi-dev · 2026-06-13 09:28
yukaHmm, I get invalid command for DISC too
#asahi-dev · 2026-06-13 09:19
yukaok, this matches what I read from tuxvdmtool
#asahi-dev · 2026-06-13 09:13
yukaat least inside m1n1, I get responses of cmd_status = 0x444d4321 which is just TPS_CMD_INVALID with different endianness

plus ›