#asahi-dev · 2026-06-17 17:53
mazsven: yeah, we talked about it f2f yesterday.#asahi-dev · 2026-06-17 17:53
sveni think will suggested to introduce idle={wfi,wfe,nop} which should also work nicely#asahi-dev · 2026-06-17 17:53
mazyuka: do you boot at EL1 or EL2?#asahi-dev · 2026-06-17 17:52
yukamaz: I will bring that up next, if I can confirm that this is the remaining problem#asahi-dev · 2026-06-17 17:52
maz(when nohlt is present, of course)#asahi-dev · 2026-06-17 17:52
yukabut with wfit#asahi-dev · 2026-06-17 17:52
yukaOh let me just run the wfi experiment#asahi-dev · 2026-06-17 17:52
mazI'm happy to review a patch nuking wfit in __delay.#asahi-dev · 2026-06-17 17:52
svenlike, that wfit just by pure chance decides not to drop any state :D#asahi-dev · 2026-06-17 17:52
yukayeah probably#asahi-dev · 2026-06-17 17:52
svenmaybe just luck lol?#asahi-dev · 2026-06-17 17:51
yukaexactly#asahi-dev · 2026-06-17 17:51
svenat least i didn't find any mechanism that would prevent that#asahi-dev · 2026-06-17 17:51
sveni don't think so#asahi-dev · 2026-06-17 17:51
yukaexactly, and I haven't found out yet if nohlt would prevent the wfit in the delay function from being used#asahi-dev · 2026-06-17 17:51
sveni think the only two wfis that matter are the idle loop and that __delay function when wfit is available#asahi-dev · 2026-06-17 17:51
yukaI wonder if it is because I have so few drivers enabled that none of them is using delay() :D#asahi-dev · 2026-06-17 17:51
svennice!#asahi-dev · 2026-06-17 17:51
yukasmp#asahi-dev · 2026-06-17 17:50
svensmp or single core?#asahi-dev · 2026-06-17 17:50
yukaSo nohlt at least partially does the thing I wanted to add with the erratum#asahi-dev · 2026-06-17 17:50
svenyuka: \o/#asahi-dev · 2026-06-17 17:50
svenjmax[m]: i haven't been able to build a simple reproduction case yet unfortunately :D same soc fwiw#asahi-dev · 2026-06-17 17:50
yukaand unmodified 7.1 kernel#asahi-dev · 2026-06-17 17:50
yukainteresting! t8140 boots to a shell with 26.6 beta 2 iboot and nohlt in the cmdline#asahi-dev · 2026-06-17 17:46
jmax[m]Yeah I think the best first step would be to create the absolutely smallest repro (a super localized diff, for example a single byte change in a single instruction, which may affect it), since it seems to be super sensitive to any kind of change to code structure or data access patterns. But yeah I'd imagine things going into weird states as cores race to enable the MMU and their caches.#asahi-dev · 2026-06-17 17:46
jmax[m]Maybe it's one of these messy things related to multiple layers of caches? Like a core speculating and bringing the data into its own _cluster's_ L2 then another core in the same cluster reading the stale value?#asahi-dev · 2026-06-17 17:46
jmax[m]I remember you running into this a long while ago. Was it happening on the same SoC you're hitting it on now or is it still the same SoC as before?#asahi-dev · 2026-06-17 16:32
svenincreasing the stack size also makes it disappear#asahi-dev · 2026-06-17 16:32
sveni don't know what it's related to, putting barriers at the right/wrong places makes it disappear. putting udelay or printf somewhere also makes it disappear#asahi-dev · 2026-06-17 16:31
sveneach core already has their own stack which is why i'm not sure this can even happen. it would have to be core 0 deciding to speculatively fetch core 1's stack for some weird reason at just the wrong time#asahi-dev · 2026-06-17 16:30
jmax[m]Is the sensitivity (crashing vs not) mostly related to code layout/memory addresses? Or is it related to latencies? (I.e. if you only change a loop counter in some delay function, does the issue go away)?#asahi-dev · 2026-06-17 16:30
jmax[m]Thinking if it's only related to code layout/vars/stack use and not timing, you could just change the MMU mappings for all regions to be Device to disable speculation and see if the issue goes away (as an experiment)#asahi-dev · 2026-06-17 16:30
jmax[m]A shot in the dark, Can we use percpu stacks and globals? Or is that already the case but we have instances where cores share pointers to date in their own stacks? Or do we not even do that and we suspect cores are snooping each other's caches through speculation?#asahi-dev · 2026-06-17 16:22
svendunno if that makes sense or if there's any reason for the first core to speculatively read that value #asahi-dev · 2026-06-17 16:22
svencaches, core 1 tries to read the value back but now gets the stale cachline value X?#asahi-dev · 2026-06-17 16:22
svenhrm, so i guess the stack is still mapped cachable by the other cores and they might speculatively read it for some reason? maybe? so core 1 writes stale value X to stack, core 0 decides to speculate and read it so that we now have a cacheline with value X, core 1 writes value Y to stack (and directly to DRAM bypassing all caches), core 1 enables#asahi-dev · 2026-06-17 15:56
sveni just don't see how that old value could somehow end up in cacheline#asahi-dev · 2026-06-17 15:56
svenit's just very fishy that this happens on the return just after we enable caches+mmu#asahi-dev · 2026-06-17 15:55
svenit's very fragile, even a few printfs make it disappear :D#asahi-dev · 2026-06-17 15:54
chaos_princessspam every single cache flush thingy around it?#asahi-dev · 2026-06-17 15:47
svenis there any way that old value somehow made it into some cache that's now enabled and we read the stale value instead of the correct that should've been propagated to DRAM? i don't quite see how that could happen though#asahi-dev · 2026-06-17 15:46
svenhrm... thinking about that one again. we know that the core loads a value from the stack for LR that should've been overwritten and we're in the middle of mmu enabling code#asahi-dev · 2026-06-17 15:35
svenjust this time with gcc instead of clang :(#asahi-dev · 2026-06-17 15:35
svenbah, running into that instruction abort with FAR: 0x2000000 issue again now *sigh*#asahi-dev · 2026-06-17 09:38
arunavahi, i got a spare mac m1, a linux machine, and plenty of free time (holidays ye :), i've prev ctfs and programming exp in c/py etc. anything good first issue for me to poke into (can be anything)..? thanks.#asahi-dev · 2026-06-17 09:13
sofusbased on tunatables i think im right#asahi-dev · 2026-06-17 09:12
sofusany clue what codenames corespond to what devices?#asahi-dev · 2026-06-17 08:44
chaos_princessi don't expect it to be used outside of dvb/atsc/similar.#asahi-dev · 2026-06-17 08:43
chadmeditll get added to dvb at the very least