#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:07
chaos_princessdeep_wfi also ends up at rvbar?#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:05
chaos_princesshttps://github.com/AsahiLinux/m1n1/blob/c92cb1ea6457d20d44008a41fe637e875d7b64d5/src/utils.c#L277 ?#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:02
chaos_princessthats the bit that makes them lose pc after wfi#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 15:37
yukaoh, true#asahi-dev · 2026-07-09 15:31
chaos_princessi am not sure if this is a correct way, but try putting a tracer on nub-spmi0#asahi-dev · 2026-07-09 15:27
yukaI don't know if it actually makes sense from a stability / power draw reduction point of view, but it's a good use case to think about when adding the pwren stuff#asahi-dev · 2026-07-09 15:25
yukaSo modeling it well is difficult#asahi-dev · 2026-07-09 15:25
yukathis needs to coordinate the sd card reader, pcie and smc/gpio drivers#asahi-dev · 2026-07-09 15:25
yukaThe pcie reader is enabled on boot, probed, then shut down until an sd card is inserted#asahi-dev · 2026-07-09 15:24
yukaYes#asahi-dev · 2026-07-09 15:24
yukamarcan mentioned it as an example of what a good device tree /driver architecture should be able to do#asahi-dev · 2026-07-09 15:24
chaos_princessyou want to power down the pcie link when the sdcard is ejected?#asahi-dev · 2026-07-09 15:23
yukapcie power management#asahi-dev · 2026-07-09 15:23
chaos_princessbtw, why are you looking for it?#asahi-dev · 2026-07-09 15:21
yukado we know how to read it?#asahi-dev · 2026-07-09 15:21
yukais smc-pmu something entirely different than the other smc gpios?#asahi-dev · 2026-07-09 15:20
yukacould not find the sd card detection pin with smc_watcher.py#asahi-dev · 2026-07-09 15:04
fl0_id_afkchaos_princess nice#asahi-dev · 2026-07-09 15:02
chaos_princessm3max mics work, the admac diff is p.write32(0x2a8980028, 0x200000); p.write32(0x2a898002c, 0x200000)#asahi-dev · 2026-07-09 08:51
JamesCalligeros[m]Is it even possible cleanly? Either the uart references the mbox phandle, is a node of the mbox, or is its own secret third thing with the same registers as the mbox (will this even probe or complain that the region is already in use by the mbox)#asahi-dev · 2026-07-09 08:49
yukaI don't really care if we do dockchannel-uart over mailbox or not, but ideally the device tree should describe the hardware without making assumptions about the implementation, which is really difficult in this case#asahi-dev · 2026-07-09 07:14
NickChan[m]make sure bit 0 in CYC_OVRD is cleared#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:55
NickChan[m]could happen if irq/fiq is not disabled in CYC_OVRD#asahi-dev · 2026-07-09 06:54
NickChan[m]I have seen cores ending up at rvbar in m1n1 multiple times before it looks exactly like that#asahi-dev · 2026-07-09 06:47
svensame #asahi-dev · 2026-07-09 06:47
jannauyuka: I'm not convinced that we want dockchannel-uart over mailbox#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:43
yuka*cores#asahi-dev · 2026-07-09 06:42
yukaCan you make the exception handler quiet on all cotes except one?#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