#
…

2026-05-06

00:04voidah has joined #asahi-dev
00:10nela has quit [Ping timeout: 480 seconds]
00:21nela has joined #asahi-dev
00:39voidah has quit [Ping timeout: 480 seconds]
00:48voidah has joined #asahi-dev
00:56voidah has quit [Ping timeout: 480 seconds]
01:09pb17 has quit [Ping timeout: 480 seconds]
01:12pb17 has joined #asahi-dev
01:16NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
01:22NSA_RECON_BOT has joined #asahi-dev
01:30kakeli has joined #asahi-dev
01:31kakeli has left #asahi-dev [#asahi-dev]
01:31gargantua has joined #asahi-dev
01:54voidah has joined #asahi-dev
02:04voidah has quit [Ping timeout: 480 seconds]
02:15tobhe_ has joined #asahi-dev
02:22tobhe has quit [Ping timeout: 480 seconds]
02:34damas has joined #asahi-dev
02:40raquentin has joined #asahi-dev
02:49damas has quit [Ping timeout: 480 seconds]
03:02hexdump02 has joined #asahi-dev
03:02tjemke72 has joined #asahi-dev
03:04hexdump01 has quit [Ping timeout: 480 seconds]
03:08tjemke7 has quit [Ping timeout: 480 seconds]
03:08tjemke72 is now known as tjemke7
03:15NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
03:23NSA_RECON_BOT has joined #asahi-dev
03:31NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
03:39NSA_RECON_BOT has joined #asahi-dev
03:45nukelet13 has quit []
03:47nukelet13 has joined #asahi-dev
03:47dataviruset has joined #asahi-dev
03:50NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
03:52damas has joined #asahi-dev
03:53nora_ has joined #asahi-dev
03:55nora has quit [Ping timeout: 480 seconds]
03:56NSA_RECON_BOT has joined #asahi-dev
04:00damas has quit [Ping timeout: 480 seconds]
04:07NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
04:11gargantua has quit [Ping timeout: 480 seconds]
04:16NSA_RECON_BOT has joined #asahi-dev
04:17raquentin has quit [Remote host closed the connection]
04:25NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
04:29eluks has quit [Remote host closed the connection]
04:30eluks has joined #asahi-dev
04:32NSA_RECON_BOT has joined #asahi-dev
05:17damas has joined #asahi-dev
05:25damas has quit [Ping timeout: 480 seconds]
05:25voidah has joined #asahi-dev
05:42NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
05:42voidah has quit [Ping timeout: 480 seconds]
05:50NSA_RECON_BOT has joined #asahi-dev
05:55dataviruset has quit [Remote host closed the connection]
05:57NSA_RECON_BOT has quit [Remote host closed the connection]
05:57NSA_RECON_BOT has joined #asahi-dev
06:20integralpilot has joined #asahi-dev
06:24integralpilot has quit []
06:24NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
06:27voidah has joined #asahi-dev
06:32NSA_RECON_BOT has joined #asahi-dev
06:34pb17 has quit [Ping timeout: 480 seconds]
06:35voidah has quit [Ping timeout: 480 seconds]
06:36pb17 has joined #asahi-dev
06:38damas has joined #asahi-dev
06:42NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
06:47damas has quit [Ping timeout: 480 seconds]
06:50NSA_RECON_BOT has joined #asahi-dev
06:51Z750 has quit [Quit: bye]
06:52Z750 has joined #asahi-dev
07:07kaazoo has quit [Ping timeout: 480 seconds]
07:07r0ni has quit [Ping timeout: 480 seconds]
07:17dataviruset has joined #asahi-dev
07:28damas has joined #asahi-dev
07:36voidah has joined #asahi-dev
07:36damas has quit [Ping timeout: 480 seconds]
07:45voidah has quit [Ping timeout: 480 seconds]
08:00NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
08:07NSA_RECON_BOT has joined #asahi-dev
08:07dataviruset has quit [Ping timeout: 480 seconds]
08:53damas has joined #asahi-dev
09:01damas has quit [Ping timeout: 480 seconds]
10:57NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
11:02ncopa has quit [Quit: Alpine Linux, the security-oriented, lightweight Linux distribution]
11:03NSA_RECON_BOT has joined #asahi-dev
11:05ncopa has joined #asahi-dev
11:08floklimmh, anyone got some m1n1 booted so far on t6040? maybe it's another instance of iboot being broken or something.
11:10voidah has joined #asahi-dev
11:20voidah has quit [Ping timeout: 480 seconds]
11:28NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
11:32NSA_RECON_BOT has joined #asahi-dev
11:35arrynflokli: whats your issue with it exactly? yesterday I tried booting with 26.4.1 on M5 pro and I can't get it to work either. I even tried my own payload that is only vbar and an endless loop and it just keeps rebooting after the chime and then lava lands me in recovery after a few times
11:36flokliarryn: 26.4.1, I hear the boot chime, then it shows the support.apple.com/macsetup slideshow
11:37arrynyeah seems different from my issue
11:39flokliI will try with another rebased m1n1 tree plus https://github.com/AsahiLinux/m1n1/pull/568 on top. But probably not before tomorrow, lots of travels today
11:43NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
11:44jannauflokli: how quickly does it arrive at the macsetup? if it is within a few seconds it sounds more like there is an issue with the boot object
11:44jannauI can try later
11:48floklijannau: yeah, a few seconds. it's a bit hard to time, as I'm using some 'portable screen' that receives power and signal from the mac mini and that whole chain take a bit to wake up
12:08ChickenKitten has joined #asahi-dev
12:25yukaSmall question: On M4 and A18 Pro, m1n1 can currently never recover since the exception handler itself throws another SError while clearing SYS_IMP_APL_L2C_ERR_STS.
12:25yukaI usually just comment out the respective lines, but I would like to fix this more properly.
12:25yukaThe question is: Based on which cpu feature I should decide whether to clear SYS_IMP_APL_L2C_ERR_STS? cyc_ovrd? or introduce a new one
12:44voidah has joined #asahi-dev
12:51jannauI don't think we need another feature for this but should come up with a different name
13:00NSA_RECON_BOT has joined #asahi-dev
13:02jannauI got annoyed by kmutil configure-boot: https://github.com/AsahiLinux/m1n1/pull/573
13:04jannauflokli: m4 pro mac mini works here (using 26.5 RC), you might need to disable usb_init(), that was throwing exceptions
13:06floklijannau: ty, will check and report back
13:09NSA_RECON_BOT has quit [Ping timeout: 480 seconds]
13:12NSA_RECON_BOT has joined #asahi-dev
13:15NSA_RECON_BOT was kicked from #asahi-dev by ChanServ ["fix your connection and use less annoying name"]
13:16picnoir has joined #asahi-dev
13:33voidah has quit [Read error: Connection reset by peer]
13:33voidah has joined #asahi-dev
13:39yukajannau: what about "chickens_locked"?
13:39yukainstead of cyc_ovrd
13:42jannau"impl_locked"?
13:45mripard has quit [Read error: Connection reset by peer]
13:49hardy94 has joined #asahi-dev
13:50yukalocked or unlocked, I negating this or not implies the default (false)
13:51yuka* I guess negating [...]
13:52voidah has quit [Remote host closed the connection]
13:52voidah has joined #asahi-dev
13:52yukawe could try to detect it for unknown cpus, not sure if this is too hacky
14:00voidah has quit [Read error: Connection reset by peer]
14:02voidah has joined #asahi-dev
14:13rany has quit [Remote host closed the connection]
14:15rany has joined #asahi-dev
14:18voidah has quit [Remote host closed the connection]
14:19voidah has joined #asahi-dev
14:39dataviruset has joined #asahi-dev
14:46dataviruset has quit [Quit: dataviruset]
14:48voidah has quit [Read error: Connection reset by peer]
14:48voidah has joined #asahi-dev
14:52voidah has quit [Remote host closed the connection]
14:52voidah has joined #asahi-dev
14:56voidah has quit [Remote host closed the connection]
14:56voidah has joined #asahi-dev
15:06voidah has quit [Remote host closed the connection]
15:06voidah has joined #asahi-dev
15:14voidah has quit [Read error: Connection reset by peer]
15:14voidah has joined #asahi-dev
15:22madmatt06 has quit [Ping timeout: 480 seconds]
16:01damas has joined #asahi-dev
16:09damas has quit [Ping timeout: 480 seconds]
16:24beastd has quit [Ping timeout: 480 seconds]
16:25beastd has joined #asahi-dev
16:37c10l has joined #asahi-dev
16:40c10l has quit []
16:49c10l has joined #asahi-dev
16:57r0ni has joined #asahi-dev
16:58c10l has quit [Read error: Connection reset by peer]
16:58c10l has joined #asahi-dev
17:04hardy94 has quit [Remote host closed the connection]
17:05pb17 has quit [Ping timeout: 480 seconds]
17:21pb17 has joined #asahi-dev
17:31jannauyuka: on which device did you test https://github.com/AsahiLinux/m1n1/pull/536 ?
17:35jannauI don't think the HV change can ever be correct when RVBAR is locked. guest entry will differ by definition from rvbar
17:37yukaI didn't test hv, since neither of the devices I'm working have working hv
17:37yuka* I'm working with
17:38yukathis is very well possible, but then it will at least error out on the proxyclient side instead of producing SErrors
17:40yukait also shouldn't fail in any case where it previously worked, right?
17:41jannauno, HV fails on m3 where it was previously working
17:42yukabut does m3 even have locked RVBAR?
17:42yukaor is it brokeb becuase of the FIELD_GET you just fixed?
17:42yuka* broken because
17:42yukaI can't type...
17:43yukabut feel free to revert the proxyclient hv part then since it serves no purpose
17:44jannauit's still broken with that fixed and just reverting the HV part is not enough either
17:44yukado you have a concrete example of what value you are seeing?
17:44yukaI don't have access to an m3
17:45yukaI will gladly send a PR to revise the logic once I know what part of it is broken
17:49yukamaybe the & 1 is not a valid indicator for it being actually locked?
17:50jannaucpu0: 0x10010002cb8001, cpu4: 0x110010002cb8001
17:51jannauit's not, I can clear BIT(0)
17:52yukado you _need_ to clear that bit?
17:54yukabut would skip clearing it if the rest was correct, since we wouldn't know if clearing it would result in an serror
17:55yukaI guess we can also use cpu_features->cyc_ovrd here
17:55jannauthe entire register is writable, only on the the boot CPU it SErrors
17:56yukaoh? how did you handle that in the past?
17:56yukaonly setting _secondary_ cpu rvbars
17:56yukais the & 1 set only on the boot cpu?
17:57jannauthere is a check for BIT(0) on the boot CPU
17:57yukaI don't follow
17:57jannauin smp_start_secondaries
17:59yukaright, and boot cpu never runs smp_start_cpu
17:59yukabecause it continues earlier
17:59jannauso the "locked" bit was always cleared for the secondary by writing _vectors_start
18:00yukabut my question is whether that's important or we can stop doing that
18:01yukaIf we can't, we need to rely on cpu_features since there is no other way to distinguish an m3 secondary cpu (which says it's locked, but we can actually write/clear) from an m4 secondary cpu (which will serror on attempting to write/clear)
18:02yukaif we can just leave the locked bit, I would just do that in all cases where the rest (addr part) of the rvbar is already the intended value
18:02yukaand not check the locked bit at all
18:02yukasince it's not accurate for what we want to do anyways
18:02jannauWhat exactly? we currently need BIT(0) cleared for HV because HV needs to set RVBAR to guest entry
18:03yukaSo BIT(0) actually changes the behavior?
18:04yukais this something related to whether other exception levels can set rvbar?
18:04jannauI suspect it's not only M2 but M1 and M2 as well, we just haven't noticed before because we cleared the bit before the secondaries were running
18:04jannauI suspect it locks rvbar only when the CPU is running
18:04jannauit == BIT(0)
18:06yukathis is not accurate on M4, I think
18:06yukabut I can test it
18:07jannauI suspect it is just not writable at all on M4
18:08jannaucompletely unrelated to its value
18:08yukaExactly
18:08yukaso we need to take cpu_features into account
18:08yukaeither way
18:10yukaI can actually write it
18:10yukapossibly this changed with mac os 26?
18:10yukawhen they fixed the other smp stuff?
18:10yukawhy was the old code not working then...
18:11yukait doesn't SError but it also doesn't apply the new value
18:11yuka> > > read64(0x210050000) = 0x10010002114001
18:11yuka> > > write64(0x210050000, 0x10010002114000)
18:11yuka> > > read64(0x210050000) = 0x10010002114001
18:16jannauas suspected, BIT(0) is set on boot on all cores but clearing it is possible as long as the core is not running
18:16yukaon M4, P-Cores and E-Cores behave differently
18:16yukaP-Cores SError on write, E-Cores silently ignore the write
18:16jannautested on M1
18:17jannauall P-cores or just the boot CPU?
18:18yukaall P-Cores
18:22jannauI think I'll close my PR and revert the commits from #536
18:22yukaI think I now know the wrong assumptions and I will come up with something
18:22yukathat's ok
18:22yukathen I will start from a clean slate
18:22jannauand let's start fresh with what we learned
18:22yuka#536 was fundamentally based on wrong assumptions:
18:23yuka1. the lock bit means we can not write the rvbar (-> wrong, we can clear it, depending on whether this core is already running and what platform we are on)
18:24yuka2. the purpose of setting the cpu_impl_reg[0] is setting rvbar to the correct value (-> also wrong, the purpose is also to clear the lock bit so that the rvbar can be set again later once the core is started)
18:27yuka#536 is the wrong PR
18:27yuka(number)
18:27yuka536 vs 563
18:28yukaI was going to ask: can you merge the smp.c bits from #563 after reverting #536? Then we have less rebase/merge pains later
18:28yukaAnd I think the switch boot core function is quite useful to have
18:28yukaI always applied this on my local checkout
18:34jannaushall I revert "smp: add CPU_START_OFF for T8132" as well?
18:35yukaimo there's nothing wrong with that one
18:39yukaFor chainload.py, is there any case where we are actually setting rvbar to something different?
18:40yukaI don't think we have something like cpu_features->cyc_ovrd in the proxyclient side
18:40jannauyes, the t8132 CPU start offset is not wrong. I was wondering whether keeping it causes troubles
18:40yukais _not_ wrong?
18:41yukaIf anything it might cause people to run into the SError
18:41yukaI guess it could be reverted until we have fixed that
18:42yukaAlthough I would assume anyone working on that right now can also just comment out the smp_start_secondaries call in linux.py / chainload.py
18:47jannaufor chainload.py you could skip setting rvbar if `rvbar == u.base`. it should not not differ unless someone plays with the entry point or changes how m1n1.macho is linked. In both cases it's fine if said person keeps the broken pieces
18:47yukaThis means basically removing the entire "Setting secondary CPU RVBARs...", right?
18:48yukaAh no, replacing it with a check and erroring out
18:48yukawill do
18:49jannauno, I would put the code under `if rvbar != u.base:`
18:49yuka"the code", so you would still do the write?
18:51jannauthe code is `for cpu in u.adt["cpus"]` and I guess the print before
18:53yukaso just make the assumption that the current rvbar should be the currently running m1n1's base
18:54jannauit is. see `new_base = u.base` at the beginning of the file
18:54yukaFor chainload.py, I would say this is ok since here the purpose is not to clear the lock bit
18:55yukathis is done by smp.c
18:59jannauI think that is by definition true (unless some modified it). I think you want to compare against `rvbar` and please keep the `cpu.state == "running"` skip
19:02yukaI'm not so sure about the secondary cpu rvbars
19:02yukawhatever started m1n1 might have skipped setting the secondary rvbars
19:03yukathe cpu.state == running also felt like a footgun in case the boot cpu rvbar _was_ changed it would silently be skipped
19:04yukaI think its purpose was not SErroring on attempting to set the boot cpu rvbar, which is now served by the new check
19:06nst has quit [Quit: WeeChat 4.7.2]
19:11nst has joined #asahi-dev
19:24fugi5 has quit [Quit: bye]
19:24fugi5 has joined #asahi-dev
19:25yukajannau: you forgot to check in t6031-dieX.dtsi on asahi-wip?
19:31ansg191_ has joined #asahi-dev
19:35ansg191 has quit [Remote host closed the connection]
19:35ansg191_ is now known as ansg191
19:47chewyeclaire[m]This is completely out of my depth at this point, but if there is anything of use to you guys here based on this it should be in here + small patches to linux I can post (like removing wfi from cpu_do_idle, dart, aic v3 if you guys haven't figured them out already).
19:47chewyeclaire[m]I am now in the falling edge part of the dunning kruger effect in my attempts to learn linux on AS and get it running on j700, please be patient I am new but I *think* I have made some progress on smp. It still crashes about 1s after all secondary.
19:52jannauyuka: fixed
19:52yukathanks
19:53yukachewyeclaire: you need nothing close to this complicated to get smp running
19:59yukaon the m1n1 side latest main + comment out some things: https://yuyu.yuka.dev/public/m1n1-comment-out-things-for-neo-smp.diff
19:59yukathis should be all you need for smp
20:02yukaThis is the entire thing I've been working on: trying to produce upstreamable patches to make this work out of the box (modulo the cpu_do_idle hack)
20:03yukaturns out upstreamable is 9000% harder :)
20:05damas has joined #asahi-dev
20:07chewyeclaire[m]that was much simpler... thank you :^)
20:12yukachewyeclaire: do you see both p-cores in /proc/cpuinfo?
20:12yukagrep for 0x61
20:12chewyeclaire[m]Ah I think my image didn't bridge if you're on irc, sec
20:12yukait did
20:12yukabut it's unclear if this was the complete output
20:13yukaAh it has both p-cores
20:13damas has quit [Ping timeout: 480 seconds]
20:13yukaone as core 0, one as core 5
20:13yukaI'm currently fighting my M4 Mac Mini not finding its secondary P-Cores
20:14yukawhich was never a problem before
20:18yukaAh lol it's my own fault
20:18yuka> Number of cores (10) exceeds configured maximum of 6 - clipping
20:19yukanonsensical kernel config
20:53buran has joined #asahi-dev
21:18StanfordAppliedCyber[m] has joined #asahi-dev
21:31damas has joined #asahi-dev
21:40damas has quit [Ping timeout: 480 seconds]
22:12voidah has quit [Ping timeout: 480 seconds]
22:20voidah has joined #asahi-dev
22:36fl0_idyuka undercoring
22:43c10l has quit [Quit: Ping timeout (120 seconds)]
22:44c10l has joined #asahi-dev
23:34voidah has quit [Ping timeout: 480 seconds]
23:37chadmed has quit [Read error: Connection reset by peer]
23:37chadmed has joined #asahi-dev
23:42voidah has joined #asahi-dev
…