#asahi-dev · 2026-06-14 15:55
yukaAh fair I looked at past commits which seemed to add the MIDRs at the same time as adding the errata, but maybe this one is a bit more controversial/complicated than those#asahi-dev · 2026-06-14 15:54
svenyou also want at least two commits i think, one to add the MIDRs and another one for the wfi alternative thing#asahi-dev · 2026-06-14 15:54
yukafor the wfi() macro with the ALTERNATIVE added#asahi-dev · 2026-06-14 15:54
yukaand I get "WARNING: Single statement macros should not use a do {} while (0) loop"#asahi-dev · 2026-06-14 15:54
yukaThen I put it in a do {} while (0) loop#asahi-dev · 2026-06-14 15:54
jannaufor which line?#asahi-dev · 2026-06-14 15:53
yuka"ERROR: Macros with complex values should be enclosed in parentheses"#asahi-dev · 2026-06-14 15:53
svenwhat is it complaining about?#asahi-dev · 2026-06-14 15:36
yukacan't make checkpatch.pl happy :(#asahi-dev · 2026-06-14 15:18
svenbut there’s not much Apple can do if that cyc_ovrd bit is gone at this point #asahi-dev · 2026-06-14 14:28
chaos_princessand that's it#asahi-dev · 2026-06-14 14:28
jannau"If the system is configured such that the WFI or WFIT instruction can be completed, then the architecture requires that the architectural state is not lost."#asahi-dev · 2026-06-14 14:28
chaos_princessthe PE. In those cases, the WFI is permitted to cause a loss of architectural state, as it is assumed that this state will have been saved by software as part of the powerdown sequence before the WFI."#asahi-dev · 2026-06-14 14:28
chaos_princesspowerdown sequence where no interrupts will cause WFI wakeup events, and restoration of power involves resetting of#asahi-dev · 2026-06-14 14:28
chaos_princess"In some implementations, based on the configuration of system specific registers, WFI can be used as part of a#asahi-dev · 2026-06-14 14:27
Sobek[m]Hmm, and from the ARM spec perspective, is WFI required to save state or is the CPU current behaviour compliant ?#asahi-dev · 2026-06-14 14:20
chaos_princessmacos saves registers around wfi#asahi-dev · 2026-06-14 14:12
Sobek[m](Or macOS doesn't rely on WFI / WFI keeping state properly)#asahi-dev · 2026-06-14 14:11
Sobek[m]nickchan: And that chicken bit set up would be different from the one set up for macOS ?#asahi-dev · 2026-06-14 13:18
yukawhere does the #define SYS_IMP_APL_CYC_OVRD ... belong in the kernel?#asahi-dev · 2026-06-14 13:01
yukait's quite annoying indeed when trying to scan mmio ranges#asahi-dev · 2026-06-14 12:56
nickchanBut I think my opinion on this will be biased since I do not luxuries like "automatically booting to m1n1" in most of my m1n1 experiences#asahi-dev · 2026-06-14 12:54
nickchansven: main impact is it's more easy to have unrecoverable errors by sending the wrong things via uartproxy#asahi-dev · 2026-06-14 12:53
svendo we care? I don’t think we use that in Linux #asahi-dev · 2026-06-14 12:53
nickchannot being able to handle or disable serror reporting is a weirdly broken state#asahi-dev · 2026-06-14 12:52
nickchanprobably need a radar for the L2C registers as well#asahi-dev · 2026-06-14 12:51
sventhe aic sysreg will allegedly be fixed with the next beta fwiw#asahi-dev · 2026-06-14 12:43
flokliAlso sent a PR for t6040 m1n1 bits. With maxcpus=1 it's booting linux with a minimal device tree (which I also intend to send), no need to only have this sitting on my machine.#asahi-dev · 2026-06-14 12:30
yukabotched chickens are not at all ruled out, but we need some more detailed information before we can file a bug report#asahi-dev · 2026-06-14 12:29
yukaMy plan (not today) is to try to take one of the commonly occurring crash sites, and see which allocation should be accessed, then add logging to where it's allocated, and check if the page is rw at allocation and at access time.#asahi-dev · 2026-06-14 12:28
nickchanwhich can lead to all sorts of botched behaviors as seen on previous socs#asahi-dev · 2026-06-14 12:28
nickchanthe only explaination i have for that is iboot setup the chicken bits wrong somehow#asahi-dev · 2026-06-14 12:26
yukanickchan: the pattern is: something tries to write somewhere (can be tcp_init, some spinlock, allocator, whatever). the addresses it's trying to access (write to) look like a valid kernel address, but they are seemingly not mapped rw (they lost the 'w' bit? or they are the wrong kernel addresses in the first place, ...).#asahi-dev · 2026-06-14 12:26
nickchan...are added, then for some already known ones i added their other known names#asahi-dev · 2026-06-14 12:25
nickchanapple stopped stuffing secret codenames in ane fw though so only nevis and borneo #asahi-dev · 2026-06-14 12:23
nickchanupdated soc codenames#asahi-dev · 2026-06-14 12:23
nickchanhttps://github.com/AsahiLinux/docs/pull/267#asahi-dev · 2026-06-14 12:22
nickchanso random can still be lose state#asahi-dev · 2026-06-14 12:22
nickchanif wfi loses state hw is not required to initialize to 0 again#asahi-dev · 2026-06-14 12:21
yukaWe also got flokli's M4 Pro to boot with smp with this patch and a lot of luck. It still crashes with seemingly random stacktraces most of the time though.#asahi-dev · 2026-06-14 12:20
yukanot out of tree but not upstream, you know what I mean#asahi-dev · 2026-06-14 12:20
yukasimilar to (out-of-tree) cpuidle-apple minus setting CYC_OVRD_WFI_MODE#asahi-dev · 2026-06-14 12:19
yukaLike the plan is to re-introduce a way to properly sleep later in the boot process. This erratum is mostly in order to stop it from crashing earlier.#asahi-dev · 2026-06-14 12:03
jannautrapping wfi isn't architecturally guaranteed but I can't see how a broken wfi may supported without trapping#asahi-dev · 2026-06-14 12:01
nickchanthere's HCR_EL2.TWI so I suppose so#asahi-dev · 2026-06-14 12:00
chaos_princesswfi in a vm just kicks you out to el2, no?#asahi-dev · 2026-06-14 11:59
nickchanthis also has complications for kvm but it's not like that would work on m4+ right now#asahi-dev · 2026-06-14 11:58
user890104what you're discussing reminds me of an issue I have on iPod nano 7th gen (S5L8740 with 1x Cortex-A5 core) - we use the nohlt kernel arg as a workaround#asahi-dev · 2026-06-14 11:55
yukaWFI experiment on my M1 does exactly the same: With CYC_OVRD_WFI_MODE(0) the boot core (core 0) retains register state, the others don't#asahi-dev · 2026-06-14 11:39
nickchanin which case that workaround would very much work on a7-a11