#
#asahi-dev · 2026-06-17 19:37
yukaI was just explaining that this behavior of the boot core being special isn't new on M4
#asahi-dev · 2026-06-17 19:37
yukaright
#asahi-dev · 2026-06-17 19:37
jannauwe don't have trouble on m1* - m3* because we can prevent wfi loosing state
#asahi-dev · 2026-06-17 19:36
yuka"do not causes trouble due to CYC_OVRD" <-- what do you mean by this?
#asahi-dev · 2026-06-17 19:35
sven__delay because the cpufeature detection also only happens after early_param stuff and just before the alternative patching afaict
#asahi-dev · 2026-06-17 19:35
svenfor both idle loop and __delay
#asahi-dev · 2026-06-17 19:35
svenboth early_param and alternative patching are early enough afaict
#asahi-dev · 2026-06-17 19:35
yuka*that switch_boot_cpu could work
#asahi-dev · 2026-06-17 19:35
jannauI'm ignoring cases which do not causes trouble due to CYC_OVRD
#asahi-dev · 2026-06-17 19:35
yukajannau: but it's still possible that switch_boot_cpu. the idle loop won't run before the patching.
#asahi-dev · 2026-06-17 19:30
yukaall the way back, the "default" state was that the boot cpu does not lose state, but other cores do (on some older cpus, the first p-core also doesn't lose state, but the first e-core on M4 / A18 Pro does lose state)
#asahi-dev · 2026-06-17 19:29
yukayep
#asahi-dev · 2026-06-17 19:29
jannauif that's the case switch_boot_cpu() might be a bad idea as well
#asahi-dev · 2026-06-17 19:28
yukaand M1 Pro....
#asahi-dev · 2026-06-17 19:28
yukaAlso on M3 if you set WFI_MODE = 0
#asahi-dev · 2026-06-17 19:28
yukaNot only on M4
#asahi-dev · 2026-06-17 19:28
jannauyuka: the boot cpu on m4 never loses state in wfi? Doesn't that suggests that it is still somehow configurable?
#asahi-dev · 2026-06-17 19:09
yukadescribing the findings in wfe and wfit
#asahi-dev · 2026-06-17 19:09
yukaOkay, I will write a response to will now
#asahi-dev · 2026-06-17 19:07
sventhough maybe wfe isn't a subset for wfi i guess. don't really feel like reading the reference manual to figure out the difference right now
#asahi-dev · 2026-06-17 19:07
yukafair
#asahi-dev · 2026-06-17 19:06
svenwhich brings us back to idle={wfi,wfe,nop} like will suggested i guess
#asahi-dev · 2026-06-17 19:06
yukaso we need nohlt but only disabling the default idle state
#asahi-dev · 2026-06-17 19:06
yukaOh, that's not good
#asahi-dev · 2026-06-17 19:05
svenif we use nohlt we can't even idle with psci or anything else. that's not gonna be fun long term
#asahi-dev · 2026-06-17 19:04
yukaBut as maz suggested nohlt could also stop delay from using wfit
#asahi-dev · 2026-06-17 19:03
yukaat least when replacing wfi with wfe directly
#asahi-dev · 2026-06-17 19:02
svenhuh
#asahi-dev · 2026-06-17 19:02
yukaand never wakes up again
#asahi-dev · 2026-06-17 19:02
yukait just gets stuck
#asahi-dev · 2026-06-17 19:02
svenwhy?
#asahi-dev · 2026-06-17 19:02
yukaidle=wfe does not help us
#asahi-dev · 2026-06-17 19:01
svenguess it's time to write that idle=wfe patch and also stop udelay from using wfit then ;)
#asahi-dev · 2026-06-17 19:00
yukahad to give it a value big enough
#asahi-dev · 2026-06-17 19:00
yukareproduced it
#asahi-dev · 2026-06-17 19:00
yukaAha
#asahi-dev · 2026-06-17 18:57
yukaI mean even without setting up timer interrupts, wfit / wfet both return immediately
#asahi-dev · 2026-06-17 18:54
sventry_check_zero does call udelay
#asahi-dev · 2026-06-17 18:54
yukaOr wfit loses state after all, even though I can not reproduce it in m1n1
#asahi-dev · 2026-06-17 18:52
svenhm.. so there must be another wfi somewhere then
#asahi-dev · 2026-06-17 18:51
yukahttps://yuyu.yuka.dev/public/t8132-nohlt-losing-state.txt
#asahi-dev · 2026-06-17 18:51
yukaone particular crash with nohlt which looks like lost state
#asahi-dev · 2026-06-17 18:50
yukanohlt does not seem to be enough for t8132 not to lose state. it's happens less often (I get further in the boot process and see other crashes) but not fixed.
#asahi-dev · 2026-06-17 18:14
hardy94so i understood it quite well
#asahi-dev · 2026-06-17 18:13
svenno need to have this discussion here, we have a policy against using gen ai so if you want to contribute please follow that. if you want to start a separate project that somehow uses claude to port linux or m1n1 or whatever to these machines, sure, go ahead, but please leave us alone
#asahi-dev · 2026-06-17 18:13
chaos_princessdoesn't matter, if you fed disasm into a llm, this is automatically a "just stop"
#asahi-dev · 2026-06-17 18:13
fr4gm3nt3dm3m0r1e5[m]I wish it was legal to make closed so open
#asahi-dev · 2026-06-17 18:12
hardy94i do not modify their binarys
#asahi-dev · 2026-06-17 18:12
chaos_princessalso, "binarys" = copyright-tainted, so just no
#asahi-dev · 2026-06-17 18:11
chaos_princessdo that somewhere else

plus ›