#
…

2026-08-15

00:01Mary has quit [Quit: .]
00:01Mary has joined #asahi-dev
00:01chadmedand once again as per usual the solution is "do what macos does"
00:02chadmedmaking the cursor plane linear-only fixes all three surfaces on t600x and t8112
00:05maettu102 has quit [Quit: brb]
00:05maettu102 has joined #asahi-dev
00:09pb17 has joined #asahi-dev
00:12rosalyntg has quit [Read error: Connection reset by peer]
00:13rosalyntg has joined #asahi-dev
00:53AlohaHenry has joined #asahi-dev
01:28___nick___ has quit []
01:30___nick___ has joined #asahi-dev
01:31___nick___ has quit []
01:34___nick___ has joined #asahi-dev
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
02:01pthariensflame has joined #asahi-dev
02:14pthariensflame has quit [Remote host closed the connection]
02:21chadmedim not sure what to do about the shared gpio. i dont think upstream will want the shared-gpio-proxy behaviour to change to only requiring a vote when trying to deassert the "default value"
02:22chadmedsince that was the original behaviour and it got changed before being merged
02:27chadmed has quit [Quit: Konversation terminated!]
02:33chadmed has joined #asahi-dev
02:42DarkShadow4444 has quit []
02:42bgb has quit [Remote host closed the connection]
02:42DarkShadow44 has joined #asahi-dev
02:44tobhe_ has joined #asahi-dev
02:47bgb has joined #asahi-dev
02:51tobhe has quit [Ping timeout: 480 seconds]
03:17nela has quit [Ping timeout: 480 seconds]
03:17nora has joined #asahi-dev
03:19nora_ has quit [Ping timeout: 480 seconds]
03:22nela has joined #asahi-dev
03:35marvin24 has quit [Ping timeout: 480 seconds]
04:08bgb has quit [Remote host closed the connection]
04:09yukahttps://github.com/AsahiLinux/m1n1/pull/657#issuecomment-5300454583 <-- I suppose I could send a feedback assistant requesting s3_0_c11_c0_12 and s3_0_c11_c0_16 to be zeroed on the secondary cores?
04:09yukathat should bring the secondary cores in line with the boot cores, and fix the boot issues
04:10lion328 has quit [Remote host closed the connection]
04:11bgb has joined #asahi-dev
04:13lion328 has joined #asahi-dev
04:18iretq is now known as Guest15676
04:18Guest15676 has quit [Read error: Connection reset by peer]
04:18marv7000 has quit [Write error: connection closed]
04:18iretq has joined #asahi-dev
04:19marv7000 has joined #asahi-dev
04:19yukawait, that should be s3_0_c11_c1_4 and s3_0_c11_c2_0
04:21yukaquoting one of sven's messages from april: "much of the s3_0_c11_c smells like CTRR stuff to me"
05:21bgb has quit [Remote host closed the connection]
05:24yukawebusb m1n1 proxyclient when
05:24yukafor quickly dumping some memory area using a phone
05:27bgb has joined #asahi-dev
05:32user890104 has quit []
05:42JamesCalligeros[m]Sounds cursed :p
06:08bgb has quit [Remote host closed the connection]
06:09bgb has joined #asahi-dev
06:24user890104 has joined #asahi-dev
07:00weirdtreething has quit [Remote host closed the connection]
07:00weirdtreething has joined #asahi-dev
07:53Guest15641 has quit [Quit: Bridge terminating on SIGTERM]
07:53rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
08:03rhysmdnz has joined #asahi-dev
08:04Guest15688 has joined #asahi-dev
08:26picnoir has quit [Ping timeout: 480 seconds]
08:34oddline has joined #asahi-dev
08:34picnoir has joined #asahi-dev
08:34elisaadohmmmm that actually sounds useful af
08:49svenyuka: i bet they're both the same register, some CTRR control just _EL1 and _EL2
08:50svenwhich with VHE gets aliased to the same in EL2
08:57svenlol, fixed the thunderbolt domain leak and i get immediately greeted with a WARN now :D
08:57* svenhates thunderbolt
09:03jannausven: when forcing usb4_dart to identity tbt breaks with "thunderbolt-apple-nhi 501f00000.nhi: error -ENODEV: Failed to init software connection manager"
09:03svenoh well, was worth a quick try
09:06jannauI'd expect that the intel laptop uses an iommu as well so it could only be an issue how well iommu and driver handle the usage pattern
09:07svenyeah, possibly
09:08svenmy current local copy is probably slightly more efficient in the irq path but that shouldn't explain >2x difference in RX vs TX
09:10chaos_princessif irq is the bottleneck, wouldn't using 9000mtu affect it (it didn't)
09:10svenoh, true
09:17jannausmells like irq though. on the receiving side a single core is at ~90% in soft irq state. for some reason the first (efficiency) core
09:17chaos_princesscan we turn off the e-cores and still have linux boot?
09:20svencan you see what it's doing in that softirq context?
09:21jannauwhy are all AIC interrupts served on core 0 (t8103)
09:21sveni don't think we can control that, can we?
09:22jannauwe can on t8103
09:26jannaunot sure that perf samples correctly (I see less samples than I would expect) but https://paste.centos.org/view/cc49f0f1
09:28pb17 has quit [Ping timeout: 480 seconds]
09:31pb17 has joined #asahi-dev
09:32svencould be weird interaction between usb4net and dart
09:32jannauincreased throughput from 7.2 to 8.8 Gbits/sec by forcing the irq to performance core and switching cpufreq gov to performance
09:33svencan you try echo DMA-FQ > /sys/kernel/iommu_groups/$GROUP/type for the iommu group (should be in dmesg during acio bringup i think)? i'm not sure that's actually gonna do anything with the current driver though
09:36jannaufurther increase to 10.5 Gbits/sec
09:36svenokay, so it's iommu crap
09:37sventhere must be some difference the way dma buffers are handled in the RX and TX path
09:38jannauthe perf profile shifted towards dart_map_pages https://paste.centos.org/view/9576827b
09:39svenyeah, -FQ only affects unmap
09:39svenit essentially batches unmaps and then does them all at once after some timeout or when the queue is filled
09:40sventhis is usb4net, right?
09:40svenif i were to be nerdsniped into fixing this i'd look into how it does dma buffer alloc/free in the RX vs. the TX path :D
09:40sveni bet it's very different
09:40svensounds like one path re-uses buffers while the other constantly maps/unmaps them
09:46DarkShadow44 has quit [Read error: Connection reset by peer]
09:47linuxgemini has quit [Quit: Ping timeout (120 seconds)]
09:47linuxgemini has joined #asahi-dev
09:47DarkShadow44 has joined #asahi-dev
09:51sventhe new thunderbolt WARN was surprisingly easy to fix i think \o/
09:51svenso now devices don't wedge the port forever anymore
09:51svenlet's see if i can reproduce that usb3 no longer works after a tbt connection was made
09:53jannauit allocs a fixed number of buffers for rx and tx
09:53svenhm.. weird that the speeds are so different then
10:07sveni also wonder if we even need to do tlb maintenance when adding mappings to dart
10:07jannauerr, I missed that it unmaps and reallocates buffers in tbnet_poll (the receive path)
10:07svenah well, that sounds like the issue then
10:15hardy94 has joined #asahi-dev
10:32jannau~20 us per map or unmap page (~1 gigabyte per second and 4k payload per package) feels at least a order of magnitude too slow
10:34Yushi has quit [Remote host closed the connection]
10:35Yushi has joined #asahi-dev
10:45jannaulooks like a factor 10 error is mine. tracing counts 220k thunderbolt_net:tbnet_rx_ip_frame events per second and not 25k I calculated with
10:50hdbngr has joined #asahi-dev
11:00hdbngr has quit [Ping timeout: 480 seconds]
12:41hdbngr has joined #asahi-dev
13:08hdbngr has quit [Remote host closed the connection]
13:09hdbngr has joined #asahi-dev
13:19matt598 has joined #asahi-dev
13:20hdbngr has quit [Ping timeout: 480 seconds]
13:47matt598 has left #asahi-dev [Konversation terminated!]
13:54AlohaHenry has left #asahi-dev [#asahi-dev]
13:55AlohaHenry has joined #asahi-dev
13:56yukat8132 mcc is very similar to t6030
13:56yukasame tz_regs
13:57yukasame cache-ways
13:58yukajust a different reg_offset, and the mcc_count can't be estimated using the remaining regs since there are trailing regs which are not mccs
14:00yukat8140 & t6040 are different from this: both have a moved CACHE_ENABLE/CACHE_STATUS (0x2800/0x2804 instead of 0x1c00/0x1c04) and are already enabled on startup
14:04yukathey start out with 0x2800 = 0x8000000c, 0x2804 = 0xc000c00, and if I write 0 or some other <0xc value 'X' to the last nibble of the enable reg, it is echoed back as 0xX000X00 in the status reg. So I guess that means CACHE_WAYS = 12.
14:05AlohaHenry has quit [Quit: AlohaHenry]
14:05yukaI guess we still need mcc_unmap_carveouts() then even if these are enabled at boot?
14:05AlohaHenry has joined #asahi-dev
14:07AlohaHenry has quit []
14:08AlohaHenry has joined #asahi-dev
14:08yukado we also want an mcc_disable_cache and ensure the cache is disabled at some point?
14:22yukado the carveouts even matter once linux takes over?
14:24yukaand if so, what about mcc even matters to linux other than it being enabled?
14:26hdbngr has joined #asahi-dev
14:30svennothing, it just has to be enabled
14:30svenand doesn't linux reserve the carveouts in its own memory map and never hands out that memory to anyhting?
14:30svener, wait, you mean mcc carveouts and not fdt carveouts i guess?
14:36yukamcc carveouts
14:38yukathe ones read from "plane_base+i*tz->stride+tz->{start,end}", and then unmapped
14:38yukathey are only unmapped inside of m1n1, and not once the kernel re-inits the mmu?
14:39yukabut I guess this is not a problem since the kernel does not blanket map everything?
14:41yukaAh, they are covered by the carveout-memory-map, so they are reserved to the kernel
14:42yukabut m1n1 does not care about the carveout-memory-map in mmu_add_default_mappings, which is why it needs special handling for the mcc carveouts
14:43pb17 has quit [Ping timeout: 480 seconds]
14:45pb17 has joined #asahi-dev
14:56yukaI can not decipher the tz_regs for t8140/t6041
14:56yukathey are structured very differently
15:12hdbngr has quit [Ping timeout: 480 seconds]
15:12AlohaHenry has quit [Ping timeout: 480 seconds]
15:18rany has quit [Remote host closed the connection]
15:19rany has joined #asahi-dev
15:41rany has quit [Ping timeout: 480 seconds]
15:42rany has joined #asahi-dev
16:14sskras is now known as [||
16:17chaos_princesshow does one figure out which memory carveouts are for dcp?
16:23hardy1994 has joined #asahi-dev
16:23hardy94 has quit [Read error: Connection reset by peer]
16:23hardy1994 is now known as hardy94
16:31hardy94 has quit [Read error: Connection reset by peer]
16:32[|| is now known as sskras
16:44Guest15688 has quit [Quit: Bridge terminating on SIGTERM]
16:44rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
16:47rhysmdnz has joined #asahi-dev
16:48Guest15714 has joined #asahi-dev
16:49rany has quit [Remote host closed the connection]
16:51rany has joined #asahi-dev
16:55yukasven: do you think we should add a reserved-memory workaround for the ctrr(?) ro issue or write a feedback assistant or both?
16:55svenI’d add the workaround
16:55svenknowing Apple the solution for that radar will be „let’s also lock down that region on the boot core“ :D
16:55yukaok, let me update the branch
16:55svendo you know what’s in that memory region?
16:59yukaAs I wrote in my PR: It is unclear if this region serves a special purpose
16:59yukaI can dump the contents ofc
17:00svenright, have you looked at those contents? it’s weird they just lock down a random region
17:00svendoesn’t matter for the PR but I’m curious what’s in there
17:01svenusually it’s stuff like coprocessor firmware etc
17:01yukait was some pointers
17:01svenweird
17:01yukadidn't immediately look like code to me
17:04yukait's empty besides this:
17:04yuka"7f 20 03 d5 7f 20 03 d5 7f 20 03 d5 7f 20 03 d5"
17:05yukano pointers, I must have looked at the wrong area last time
17:05svenvery strange
17:10___nick___ has quit [Ping timeout: 480 seconds]
17:21nano has quit [Quit: User left the chat]
17:21nano has joined #asahi-dev
17:34roxfan2looks like 4 int32 or floats
17:56pb17 has quit [Ping timeout: 480 seconds]
18:00pb17 has joined #asahi-dev
18:08yukaMy conclusion from looking into cpufreq on t8132 is: whatever is done in cpufreq_init() does not work as-is there. The APSC_DIS and APSC_BUSY do not behave as previously and I also couldn't find any new bit like that. Regarding the other cluster features, even if we figure out what xnu does there exactly, we're not allowed to modify them on the boot cluster. But disregarding all that, simply setting the pstate works as before and does increase the...
18:08yuka... frequency so I guess that's something.
18:08yukat8140/t6040 the same
18:09yuka*not allowed or don't know how
18:11yukaAlso I wonder if xnu somehow accounts for the thing where the first core of each cluster does not enter deep sleep, and thus inhibits any other core in the cluster from boosting to a higher frequency
18:11yukaAs in, only the first core of each cluster can boost high
18:15svenso we still don't really know how deep sleep works, but it's more than just that CYC_OVRD sysreg, see the m1n1 code for deep_sleep. and xnu is still allowed to modified the other stuff so it wouldn't surprise if you can somehow still force them to sleep
18:16sven*modify
18:16svenonce we actually get that working on m1-m3 we can try filing a radar again and see what happens
18:17svenboth chaos and me tried and while we can get the cores to go into deep sleep / poweroff we can't wake from the state again if we put all cores into it
18:18yukaSorry with deep sleep I meant the wfi mode which loses state
18:18svenand for boosting you need more, don't you?
18:18yukaI don't think so?
18:19yukaThe thing we do using the 'debug' sysreg in cpuidle-apple
18:19sveni thought for boosting to the highest state the other cores had to be actually powered off. but i could be wrong, never looked into that in details
18:19yukacorresponds to wfi losing state and also the last core which is not in 'deep wfi' can boost high
18:20svenah, i thought that wasn't enough
18:20yukaIf the core needed to be powered off, then the cpu pstate experiments in m1n1 could never measure the higher frequencies
18:21yukabecause that does smp_start_secondaries and then the other cores sleep while a measurement is being done on one core of the cluster
18:21yuka'sleep' = deep wfi again
18:22svenhuh, i was somehow convinced that we couldn't boost to the highest pstate yet
18:22svenbut good to know
18:22yukaMaybe there is an even higher one?
18:23yukaBut this makes the difference of reaching >4GHz on my machines
18:23yukaIf we can agree on more precise terms of the possible states of a core and a cluster, and write them down somewhere that would be useful for these discussions
18:23sventhat sounds like what i thought required actual power off
18:23svenyup, agreed
18:24sven"/* Not available until CPU deep sleep is implemented */"
18:24svenmaybe another confusion of terminology and that was from before the cpuidle driver
18:25yukaMaybe this is where I got the term from, and matched it to the 'wfi which loses state' / what the cpuidle-apple driver does because that's what is actually needed
18:26sven<yuka> If we can agree on more precise terms of the possible states of a core and a cluster, and write them down somewhere that would be useful for these discussions <-- let's maybe do just that :D
18:26chaos_princessshould be normal arm64 wfi/non-retention wfi/that full cluster shutdown that we can't exit from
18:27svenis there a different between "wfi that jumps back to RVBAR" and "wfi that results in full cluster shutdown"?
18:27sven*difference
18:28chaos_princessno? normal non-retention wfi keeps pc
18:28chaos_princessyou can put just one core in the shutdown wfi, but the config regs are iirc cluster-global
18:28yukathere are at least 3 behaviors of wfi
18:29Pokemod9773620847128183300 has joined #asahi-dev
18:29yukanormal arm64
18:29yukaAnd there are two bits in some of the sysregs
18:29svenchaos_princess: i'm talking about the difference between deep=true/false here https://github.com/AsahiLinux/m1n1/blob/88a98213d55f2cbd69844762c3171b39c0cd0bf9/src/utils.c#L249
18:30chaos_princessdeep=true - cluster, deep=false - non-retention
18:30svendeep = false -> ends up at RVBAR as well
18:31sventhat's why i'm asking if there's a difference or if deep = false is just "enter shutdown wfi but don't set the cluster shutdown reg", i.e. some weird inbetween state
18:31mmediouni[m]What makes sure that the HIDx register values persist across deep sleep?
18:31mmediouni[m]That and the register masks lockdown
18:31chaos_princesswhatever "reconfig engine" is
18:31chaos_princesssven: i _think_ it is a weird inbetween
18:32yukaCYC_OVRD_WFI_MODE=3 give the remaining core in the cluster the ability to boost but retains pc and sp
18:32svenyeah, and that's where my question came "is there a different between "wfi that jumps back to RVBAR" and "wfi that results in full cluster shutdown"?" came from because i'm not sure
18:32mmediouni[m]Oh so recfg is locked down too
18:33chaos_princessi guess it would be worth it to test setting all cores in cluster in one or the other and measuring system power
18:33yukaI think setting CYC_OVRD_DISABLE_WFI_RET drops you to RVBAR after the next wfi
18:33chaos_princessyes, but xnu does more things when enabling that mode
18:34rany has quit [Ping timeout: 480 seconds]
18:35yukabut now we use this as anchor to define proper names for it. And I think non-retention wfi should be the one which drops to RVBAR and *not* the WFI_MODE one which cpuidle-apple uses which retains pc (that should rather be "deep wfi"?)
18:36svensemi-retention wfi? :P
18:36yukaroulette-wfi
18:37yukawhatever
18:37rany has joined #asahi-dev
18:39yukaAha, this corresponds to STATE_PWRDOWN
18:39yukathat's confusing?
18:40sveni don't really care about naming, but deep wfi has always been very confusing to me
18:40yukadoes the semi-retention wfi actually power down the core (or cluster, if done on all cores)
18:40chaos_princessit uses less power
18:41svencould be something like clock gating vs. power gating but who knows
18:41chaos_princessit is the thing we are using for sleep on m1-3
18:43mmediouni[m]yuka: doesn't seem like it
18:45rany has quit [Ping timeout: 480 seconds]
18:45yukachaos_princess: but last time I tested, even just skipping smp_start_secondaries barely resulted in any power saving
18:47rany has joined #asahi-dev
18:47yukathe cores/clusters can hardly use less energy than when they're not turned on in the first place?
18:48chaos_princessare you sure they are off?
18:48yukapmgr regs say so
18:49yukabut I can't be fully sure how this works internally
18:52snek has quit [Remote host closed the connection]
18:52snek has joined #asahi-dev
19:04rany has quit [Ping timeout: 480 seconds]
19:04rany has joined #asahi-dev
19:12rosalyntg has quit [Read error: Connection reset by peer]
19:12rosalyntg has joined #asahi-dev
19:19rany has quit [Ping timeout: 480 seconds]
19:28rany has joined #asahi-dev
19:29mripard has quit [Ping timeout: 480 seconds]
19:40mripard has joined #asahi-dev
19:46pb17 has quit [Ping timeout: 480 seconds]
20:06pb17 has joined #asahi-dev
20:08bgb has quit [Remote host closed the connection]
20:08bgb has joined #asahi-dev
20:27lacamar has joined #asahi-dev
20:39lacamar has quit [Quit: ZNC 1.10.2 - https://znc.in]
20:40___nick___ has joined #asahi-dev
20:42bgb has quit [Remote host closed the connection]
20:43bgb has joined #asahi-dev
20:50lacamar has joined #asahi-dev
21:01Yushi_ has joined #asahi-dev
21:02Yushi has quit [Remote host closed the connection]
21:02Yushi_ is now known as Yushi
21:25user890104 has quit [Ping timeout: 480 seconds]
21:27user890104 has joined #asahi-dev
22:44revadam has joined #asahi-dev
22:44revadam has quit []
22:48pb17 has quit [Ping timeout: 480 seconds]
22:49pb17 has joined #asahi-dev
23:41alessaba has quit [Ping timeout: 480 seconds]
23:41alessaba has joined #asahi-dev
…