#
✕ nick:sven
#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: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 08:07
svenkettenis: yeah, I just don’t remember who it was but it seems quite reasonable and simple to implement so far
#asahi-dev · 2026-06-16 20:24
svenso if we go this way we’ll have to change device trees and then old kernel won’t be able to boot with smp anymore
#asahi-dev · 2026-06-16 20:23
svenand the annoying part is that using it will be a breaking change again. psci-cpuidle requires the cpu enable method to be, well, psci and not spin-table
#asahi-dev · 2026-06-16 20:22
svenit’s not specified anywhere, it was just sometime suggested years ago
#asahi-dev · 2026-06-16 20:22
svenuh, this requires changes to the Linux kernel itself because I made the entire thing upn
#asahi-dev · 2026-06-16 20:19
svenI mean… I wrote that I just hacked that together
#asahi-dev · 2026-06-16 19:21
svenyes, that was fixed now
#asahi-dev · 2026-06-16 19:21
svenwhat do you mean with „it“?
#asahi-dev · 2026-06-16 19:21
svenhm?
#asahi-dev · 2026-06-16 19:11
sven🥳
#asahi-dev · 2026-06-16 18:58
svennot sure how we would pass that to u-boot, but that can be bikeshedded later
#asahi-dev · 2026-06-16 18:57
svenu-boot just has to be taught to pass along yet another opaque config table and the right memory mappings to ensure m1n1 is mapped
#asahi-dev · 2026-06-16 18:49
sven[ 0.000000] psci: PSCI-via-EFI conduit
#asahi-dev · 2026-06-16 18:49
sven[ 0.000000] efi: RTPROP=0x81508c040
#asahi-dev · 2026-06-16 18:49
sven[ 0.000000] EFI: PSCI = (____ptrval____)
#asahi-dev · 2026-06-16 18:49
sven[ 0.000000] efi: EFI v2.0 by m1n1
#asahi-dev · 2026-06-16 18:49
sventried to prototype psci-via-efi and ended up with a very hacky thing. it doesn't seem to call my m1n1 code yet, but everything should be in place:
#asahi-dev · 2026-06-16 14:15
sven:-)
#asahi-dev · 2026-06-16 13:51
sven🎉
#asahi-dev · 2026-06-15 17:11
svenand then it ended up at the entry point again?!
#asahi-dev · 2026-06-15 17:09
sveniirc chaos_princess managed to put all cores to sleep but never got them to wake up again :(
#asahi-dev · 2026-06-15 17:09
svenwe know that the deep sleep code in utils.c or whatever works for the seconaries
#asahi-dev · 2026-06-15 17:08
svenhrm.. though we'd ideally want all cores to be in deep sleep for this to make sense
#asahi-dev · 2026-06-15 17:07
svennickchan: nice!
#asahi-dev · 2026-06-15 15:25
svenwe don't guarantee that different versions of proxyclient vs m1n1 work anyway so the only error that could happen is a change to the structure on the m1n1 side without a change to the .py file
#asahi-dev · 2026-06-15 15:24
svensure, unless you want to build something more fancy :D
#asahi-dev · 2026-06-15 15:22
svencould probably just add a proxyclient call that returns the cpu features
#asahi-dev · 2026-06-15 15:18
sven*arise
#asahi-dev · 2026-06-15 15:18
sventhe first step is to get a PoC running that actually ends up at the entry after a deep sleep wfi. we can then just fix any issues that arive
#asahi-dev · 2026-06-15 15:05
svensure, that's all fixable once we actually get a PoC with that path working
#asahi-dev · 2026-06-15 13:23
svensounds like another good argument against psci-via-efi-or-whatever
#asahi-dev · 2026-06-15 13:21
svendo we need callbacks or whatever to other drivers for deep sleep? because that would be very annoying with just psci as well
#asahi-dev · 2026-06-15 13:20
svenno need to convince me ;)
#asahi-dev · 2026-06-15 13:17
sveni remember the argument being that they don't want to open the floodgates for N custom cpuidle drivers if they would accept one for apple silicon
#asahi-dev · 2026-06-15 13:06
svenhm, i don't even remember where "must use pci" came from. maybe during early upstreaming on list? or maybe even on irc
#asahi-dev · 2026-06-15 12:44
svenah crap, nested virt ofc exists
#asahi-dev · 2026-06-15 11:38
sven:(
#asahi-dev · 2026-06-15 09:09
svenso i guess wfi keeps state in el1 then?
#asahi-dev · 2026-06-15 08:51
sven^--
#asahi-dev · 2026-06-15 08:51
svennah, also doesn't matter much at this point
#asahi-dev · 2026-06-15 07:37
svenit's obvious enough at this point, not gonna comment anymore

plus ›