#
✕ nick:sven
#asahi-dev · 2026-07-09 16:25
svenyup, it's stable now
#asahi-dev · 2026-07-09 16:11
sveni'll just clear it in chickens.c
#asahi-dev · 2026-07-09 16:11
svenyup, on first boot of the secondaries the bit is clear, then if i do stop -> start that bit is still set
#asahi-dev · 2026-07-09 16:09
svenso start secondaries -> stop secondaries -> start again -> set wfe mode and it all explodes
#asahi-dev · 2026-07-09 16:09
sveni think what happens is that if we bring the cores down we set that bit and it's still set when we bring them up the next time
#asahi-dev · 2026-07-09 16:08
sveni.e. they all end up at RVBAR
#asahi-dev · 2026-07-09 16:08
sventhen a call to smp_set_wfe_mode results in that weird thing from above
#asahi-dev · 2026-07-09 16:08
sventhe cores are in https://github.com/AsahiLinux/m1n1/blob/c92cb1ea6457d20d44008a41fe637e875d7b64d5/src/smp.c#L85
#asahi-dev · 2026-07-09 16:08
svenyes!
#asahi-dev · 2026-07-09 16:05
svenwhich is different from deep_wfi
#asahi-dev · 2026-07-09 16:05
sventhat's cpu_sleep
#asahi-dev · 2026-07-09 16:04
svencpuidle-apple.c also just does this: "orr x0, x0, #(3L << 24)\n"
#asahi-dev · 2026-07-09 16:04
svenwe don't touch that bit there
#asahi-dev · 2026-07-09 16:04
svenlook at e.g. deep_wfi in utils.c
#asahi-dev · 2026-07-09 16:04
sveni don't think so
#asahi-dev · 2026-07-09 16:00
svenhuh, the secondaries have CYC_OVRD_DISABLE_WFI_RET set so i guess that's enough to somehow make them sometimes reach RVBAR again?1
#asahi-dev · 2026-07-09 15:51
svenso somehow that wfe makes the cpus reappear at RVBAR
#asahi-dev · 2026-07-09 15:51
svenhuh, that's with getting the stack via MPIDR instead of that global var in start.S
#asahi-dev · 2026-07-09 15:51
svenhttps://f.svpe.de/ba1b0272cf8c60a691de0ef66f19e0f8b8e960bc2b277df33e98d9bbafce6fd7_wtf
#asahi-dev · 2026-07-09 07:09
sveni think this happens when set_smp_wfe_mode runs but uhhhh… why do I start hitting this now?
#asahi-dev · 2026-07-09 06:47
svensame
#asahi-dev · 2026-07-09 06:44
svenfirst $work though
#asahi-dev · 2026-07-09 06:43
svenif they really all end up at rvbar maybe due to the set wfe mode thingy they’re gonna clobber each other’s stack very quickly
#asahi-dev · 2026-07-09 06:43
svenyeh, im also gonna try to make them use different stacks
#asahi-dev · 2026-07-09 06:42
svenFirst line looks like „OKRVBAR“ interleaved from N cores
#asahi-dev · 2026-07-09 06:42
svenit almost looks like the cores end up at RVBAR somehow
#asahi-dev · 2026-07-09 06:28
sven*code
#asahi-dev · 2026-07-09 06:28
svenadding printfs around the core that stops the core ofc makes the jug go away 🙃
#asahi-dev · 2026-07-09 06:27
svenjust dunno why
#asahi-dev · 2026-07-09 06:27
svenyeah, it looks like multiple cores faulting at the same time for some reason
#asahi-dev · 2026-07-09 06:11
svenmaybe it's not usb that's cursed, maybe _I_ am cursed :D
#asahi-dev · 2026-07-09 06:10
svennow i start hitting this cursed thing when stopping them: https://f.svpe.de/cd2006c0ca62676a309c658ede19b6e23d48439d842ee4ebea53cd268fb72335_lol
#asahi-dev · 2026-07-09 06:10
svenremember how i was happy to fix that cursed secondary bringup bug?
#asahi-dev · 2026-07-08 17:22
svenI truly do not care about making anything more complicated right now to save 2MiB or so
#asahi-dev · 2026-07-08 17:21
svenstill not gonna change anything for now
#asahi-dev · 2026-07-08 17:21
sven🤷‍♂️
#asahi-dev · 2026-07-08 15:51
sventhen tell me how I can power off a cpu without acc_ovrd
#asahi-dev · 2026-07-08 15:41
sventhat makes shutting individual CPUs off a bit annoying
#asahi-dev · 2026-07-08 15:40
svenlooks like xnu doesn’t lie and the ovrd register are indeed per cluster
#asahi-dev · 2026-07-08 14:27
svenwhich is still fine for now imho
#asahi-dev · 2026-07-08 14:27
svenright now my raw binary is about 3 MiB with that branch
#asahi-dev · 2026-07-08 14:27
svenyeah, i first want to get the psci-via-efi or whatever thing ready and then we can always optimize before the next m1n1 release
#asahi-dev · 2026-07-08 14:06
svenmaybe we figure this out later
#asahi-dev · 2026-07-08 13:44
sven*of
#asahi-dev · 2026-07-08 13:44
svenso? these machines have GiB or RAM
#asahi-dev · 2026-07-08 11:59
svenother than MMIO it's just m1n1 .data/.rodata/.bss and .text anyway
#asahi-dev · 2026-07-08 11:58
svenyeah, i also plan to restrict the MMIO mappings to what we actually need instead of just mapping everything
#asahi-dev · 2026-07-08 11:53
svenit's all a bit silly because we could also just add the memory map and a pointer to the psci handler in the FDT and just skip all the EFI stuff but oh well
#asahi-dev · 2026-07-08 11:52
svenyeah
#asahi-dev · 2026-07-08 11:51
svenit works because i set runtime_services_supported to "nothing" and at least linux respects that and doesn't try to call into any efi services

plus ›