#
…

2026-08-18

01:02ansg191_ has joined #asahi-dev
01:02ansg191 has quit [Read error: Connection reset by peer]
01:02ansg191_ is now known as ansg191
01:05hdbngr has joined #asahi-dev
01:14hdbngr has quit [Ping timeout: 480 seconds]
01:18hdbngr has joined #asahi-dev
01:26hdbngr has quit [Ping timeout: 480 seconds]
01:27___nick___ has quit []
01:29___nick___ has joined #asahi-dev
01:30___nick___ has quit []
01:32___nick___ has joined #asahi-dev
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
02:18aurora has joined #asahi-dev
02:20aurora has quit [Remote host closed the connection]
02:20aurora has joined #asahi-dev
02:21aurora has quit [Remote host closed the connection]
02:21aurora has joined #asahi-dev
02:29hdbngr has joined #asahi-dev
02:37hdbngr has quit [Ping timeout: 480 seconds]
02:41tobhe has joined #asahi-dev
02:47tobhe_ has quit [Ping timeout: 480 seconds]
03:15nora_ has joined #asahi-dev
03:17nora has quit [Ping timeout: 480 seconds]
03:29andymandias has quit [Remote host closed the connection]
03:29andymandias has joined #asahi-dev
04:19Yushi has quit [Remote host closed the connection]
04:20Yushi has joined #asahi-dev
04:40Yushi has quit [Remote host closed the connection]
04:41Yushi has joined #asahi-dev
04:52Yushi has quit [Remote host closed the connection]
04:52Yushi has joined #asahi-dev
05:00hdbngr has joined #asahi-dev
05:05nela has quit [Ping timeout: 480 seconds]
05:08hdbngr has quit [Ping timeout: 480 seconds]
05:10nela has joined #asahi-dev
05:13hdbngr has joined #asahi-dev
05:20Yushi has quit [Remote host closed the connection]
05:21Yushi has joined #asahi-dev
05:22hdbngr has quit [Ping timeout: 480 seconds]
06:00nela has quit [Quit: Ping timeout (120 seconds)]
06:01nela has joined #asahi-dev
06:05Ardu0us_ has quit [Quit: %Reality broken: (I)gnore, (R)etry, (A)bort%]
06:07Ardu0us has joined #asahi-dev
06:27hdbngr has joined #asahi-dev
06:40hdbngr has quit [Ping timeout: 480 seconds]
07:14hdbngr has joined #asahi-dev
07:23hdbngr has quit [Ping timeout: 480 seconds]
07:27aurora has quit [Ping timeout: 480 seconds]
07:39bgb has quit [Remote host closed the connection]
07:55hdbngr has joined #asahi-dev
08:03hdbngr has quit [Ping timeout: 480 seconds]
08:05rosalyntg_ has quit [Ping timeout: 480 seconds]
08:05bgb has joined #asahi-dev
08:05rosalyntg has joined #asahi-dev
08:13hdbngr has joined #asahi-dev
08:32aurora has joined #asahi-dev
08:32aurora has quit [Remote host closed the connection]
08:33aurora has joined #asahi-dev
08:33aurora has quit [Remote host closed the connection]
08:35aurora has joined #asahi-dev
08:36hdbngr has quit [Ping timeout: 480 seconds]
08:41aurora has quit [Remote host closed the connection]
08:41aurora has joined #asahi-dev
08:45aurora has quit [Remote host closed the connection]
08:46aurora has joined #asahi-dev
08:55hdbngr has joined #asahi-dev
08:55aurora has quit [Remote host closed the connection]
08:56aurora has joined #asahi-dev
08:57aurora has quit [Remote host closed the connection]
08:58aurora has joined #asahi-dev
09:03heartburn has quit [Ping timeout: 480 seconds]
09:04hdbngr has quit [Ping timeout: 480 seconds]
09:14pb17 has quit [Ping timeout: 480 seconds]
09:15hdbngr has joined #asahi-dev
09:16pb17 has joined #asahi-dev
09:27hdbngr has quit [Ping timeout: 480 seconds]
09:31lethalbit|wut has quit [Quit: kill -9 -1]
09:31lethalbit has joined #asahi-dev
09:43hdbngr has joined #asahi-dev
09:47heartburn has joined #asahi-dev
09:51nnym has quit [Ping timeout: 480 seconds]
09:52hdbngr has quit [Ping timeout: 480 seconds]
10:00nnym has joined #asahi-dev
10:08nnym has quit [Ping timeout: 480 seconds]
10:15nnym has joined #asahi-dev
10:23nnym has quit [Remote host closed the connection]
10:34hdbngr has joined #asahi-dev
10:44nnym has joined #asahi-dev
10:53hdbngr has quit [Ping timeout: 480 seconds]
11:12hdbngr has joined #asahi-dev
11:25hdbngr has quit [Ping timeout: 480 seconds]
11:50hdbngr has joined #asahi-dev
11:59hdbngr has quit [Ping timeout: 480 seconds]
12:12lord_breadcrumb has joined #asahi-dev
12:12lord_breadcrumb has quit []
12:18hdbngr has joined #asahi-dev
12:26hdbngr has quit [Ping timeout: 480 seconds]
12:36hdbngr has joined #asahi-dev
13:01chaos_princess has quit [Quit: chaos_princess]
13:02chaos_princess has joined #asahi-dev
13:03hdbngr has quit [Ping timeout: 480 seconds]
13:06DD65 has quit [Remote host closed the connection]
13:07DD65 has joined #asahi-dev
13:18hdbngr has joined #asahi-dev
13:27pb17 has quit [Ping timeout: 480 seconds]
13:28hdbngr has quit [Ping timeout: 480 seconds]
13:30pb17 has joined #asahi-dev
13:43__nick__ has joined #asahi-dev
13:46___nick___ has quit [Ping timeout: 480 seconds]
13:49hdbngr has joined #asahi-dev
13:57hdbngr has quit [Ping timeout: 480 seconds]
14:02hdbngr has joined #asahi-dev
14:10hdbngr has quit [Ping timeout: 480 seconds]
14:19hdbngr has joined #asahi-dev
14:28hdbngr has quit [Ping timeout: 480 seconds]
14:40r0ni has quit [Ping timeout: 480 seconds]
14:56svenokay, i think i got the cable vse nonsense down now
14:56svengonna implement that on the linux side and then push it later today
14:58* svenstill hates thunderbolt
15:04fl0_idsven can you share what was the elusive vse magic?
15:04svenit'll just be in the code i push later
15:05fl0_idthx, sure
15:05svenit's dumb type-c VDO -> apple bits mapping
15:07hdbngr has joined #asahi-dev
15:15gi0 has joined #asahi-dev
15:15gi0 has quit []
15:18hdbngr has quit [Ping timeout: 480 seconds]
15:20hdbngr has joined #asahi-dev
15:30Pokemod97736208471281833001 has joined #asahi-dev
15:30turboretor16 has joined #asahi-dev
15:30Rafay has quit [Read error: Network is unreachable]
15:30Rafay has joined #asahi-dev
15:30Pokemod9773620847128183300 has quit [Read error: Connection reset by peer]
15:30steev has quit [Read error: Network is unreachable]
15:30turboretor1 has quit [Read error: Connection reset by peer]
15:30turboretor16 is now known as turboretor1
15:32steev has joined #asahi-dev
15:35nukelet046 has joined #asahi-dev
15:36nukelet04 has quit [Ping timeout: 480 seconds]
15:36hdbngr has quit [Ping timeout: 480 seconds]
15:47hdbngr has joined #asahi-dev
15:52svenhttps://github.com/AsahiLinux/linux/commits/tbt-reset-wip/ new version, now with all M2 dts changes as well. only lightly tested on base M1
15:55svenhope i didn't regress anything there but that should match what xnu does
15:55hdbngr has quit [Ping timeout: 480 seconds]
15:58hdbngr has joined #asahi-dev
15:58lonjil has quit [Quit: Quit.]
16:05svenliv[m]: as promised, the ping once the m2 dt changes are ready
16:06svencompletely untested, happy to take patches of it breaks ;)
16:07hdbngr has quit [Ping timeout: 480 seconds]
16:10lonjil has joined #asahi-dev
16:21hdbngr has joined #asahi-dev
16:30hdbngr has quit [Ping timeout: 480 seconds]
16:43Guest15714 has quit [Quit: Bridge terminating on SIGTERM]
16:43rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
17:13hdbngr has joined #asahi-dev
17:14junefish has quit [Remote host closed the connection]
17:14pb17 has quit [Ping timeout: 480 seconds]
17:16junefish has joined #asahi-dev
17:19pb17 has joined #asahi-dev
17:31hdbngr has quit [Ping timeout: 480 seconds]
17:31hdbngr has joined #asahi-dev
17:34jannausven: m2 pro: "thunderbolt-apple-acio f01ac0000.cio: M3 RTKit failed to boot: -62" after the obvious incomplete fix for the aliases: https://paste.centos.org/view/68e73df7
17:34svenhmmm… then I have the address for the reset controller wrong probably
17:36svenprobably lost the missing aliases during the last rebase :(
17:37svenpaste.debian.net doesn't seem to load here
17:38jannauthey overlap. usb4_?_acio aliases are missing but there there is complete set of usb4-?-* aliases with "-"
17:39svenright, eventually i only need the "-" ones because the dts check complains otherwise. it doesn't like the _
17:39svenhrm, now it loaded but "Your requested paste entry '59485152' could not be found "
17:40svenyes, that works
17:40jannauoh, so we need to fix m1n1
17:40sventhat's why i have the duplicate set of aliases so that the current and the to-be-fixed one works
17:40svenwell, the "not exactly duplicate set"
17:41svenapple_rtkit_poweroff+0x2c/0xb0 <-- probably not the best idea to try to send a message when rtkit never came up :D
17:42hdbngr has quit [Ping timeout: 480 seconds]
17:42svencan you trace pmgr on macos? i tried to statically reverse engineer that reset-controller address but somehow got it wrong then
17:43svenit's unfortunately no longer hardcoded in that kext since m2
17:44R0K0 has joined #asahi-dev
17:45ninelore has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
17:47hdbngr has joined #asahi-dev
17:50jannausure, do you have a good guess where it is or do I better trace pmgr completely?
17:51svenare you sure that alias patch is required? because I don't think they should be neccessary unless I'm confused
17:51svengimme a moment, let me find the kext again
17:51ninelore has joined #asahi-dev
17:52sveni don't think m1n1 would even look for usb4_N_acio. it still has that old ..._{rc,nhi} I think
17:54jannaum1n1 logged "Unable to find alias usb4_1_acio" and the linux driver failed to load with missing tunables. I haven't looked further
17:55hdbngr has quit [Ping timeout: 480 seconds]
18:01jannaukinda my fault. My m1n1 still has your "
18:01hardy94 has joined #asahi-dev
18:01jannau"kboot: Change name of acio alias" as local change
18:01hdbngr has joined #asahi-dev
18:01jannauwhich was required for the old version
18:10jannauI think your magic pmgr offset is correct
18:10svenhrm, and rtkit still fails to boot? that's odd
18:10jannauMMIO: W.4 0x28e08a02c (error-handler[2], offset 0xa02c) = 0x2, then poll until it reads 0, and then M3 ctrl = 0x2 (START=1)
18:11svendid i get the mailbox addr wrong then?
18:11hdbngr has quit [Ping timeout: 480 seconds]
18:11sveni did move them below the parent with ranges but that worked on m1, maybe something went wrong there
18:12jannauyes, looks like it
18:12jannauit's 0x701108000
18:14svener, wait, the mailbox didn't even move below the parent node.
18:14svenreg = <0x7 0x01108000 0x0 0x4000>
18:18delroth has quit [Remote host closed the connection]
18:21delroth has joined #asahi-dev
18:23hdbngr has joined #asahi-dev
18:26R0K1 has joined #asahi-dev
18:26R0K0 has quit [Read error: Connection reset by peer]
18:26R0K1 is now known as R0K0
18:32hdbngr has quit [Ping timeout: 480 seconds]
18:33jannauthe mailbox is correct and acio boots. was probably caused by the tunables mixup
18:39jannaudoesn't work though, I get a dart translatrion error for stream 1 and it fails to allocate host router due to a timeout
18:42svenhrm... how did i break that now.
18:43sventhat sounds like the control ring doesn't work though because it get an unmapped iova somehow
18:43jannaudevicetree looks good, I assumed it was a t602x thing but should test if t600x regressed
18:44svencould also be a t602x thing, sure
18:44svendoes that already have tbt5?
18:45chaos_princessno, that is i think m4 pro/max and m3 ultra
18:52jannaut6001 still works
18:52svenugh, some t602x thing then
18:54svendoes the iova it faults on look like something linux would've allocated?
18:57jannauno, it probably needs "iommu: apple-dart: Support specifying the DMA aperture in the DT"
19:16jannaustill fails with that (and set_dma_mask_and_coherent(DMA_BIT_MASK(42)))
19:17svenwhat's the iova that fails?
19:18jannau0x10effff8000 and 0x10effffc000
19:19jannaunot sure linux' dma iommu code does the right thing
19:20sveni suspected that the tbt code was never tested with iovas >32bit
19:22jannauiirc it allocates top down so I would expect iovas of the form 0x3fe_xxxx_xxxx
19:22jannauwith "apple,dma-range = <0x100 0x0 0x2ff 0x0>;"
19:22svenhm, true, it at least used to allocate top-down
19:22svenbut that should still be in that range, shouldn't it?
19:24hdbngr has joined #asahi-dev
19:25jannauno, I suspect linux uses 0xeffff8000 and acio somehow offsets it by vm-base (0x100_0000_0000) anyway
19:29svenyou can add prints to tb_ring_start
19:30svenring_iowrite64desc(ring, ring->descriptors_dma, 0); is probably the iova
19:30svenit probably faults once the first entry is added to that ring
19:30svenyou might be able to hack this with dma-ranges in the parent node as well :D
19:30sveni dunno if the iova code respects that
19:34hdbngr has quit [Ping timeout: 480 seconds]
19:42jannauiova are as expected but it looks like acio has only a 36-bit address space (which still starts at 0x100_0000_0000
19:42nnym has quit [Ping timeout: 480 seconds]
19:43jannauso "apple,dma-range = <0x100 0x0 0x1 0x0>;" seems to work
19:44svenI really don’t want to upstream that property because it feels wrong on the dart node
19:45WindowPain6 has joined #asahi-dev
19:47jannauagreed, it feels like it should belong to the node which uses the dart
19:47jannaunot sure how everyone feels about inscreasing #iommu-cells
19:51WindowPain has quit [Ping timeout: 480 seconds]
19:51WindowPain6 is now known as WindowPain
19:55___nick___ has joined #asahi-dev
19:57svenlet me check if we can just use dma-ranges here since we already have that parent node anyway
19:59jannaulet me check. it would be a little annoying since it's a solution that only works for tbt
19:59__nick__ has quit [Ping timeout: 480 seconds]
19:59svenyes, but i would enjoy this very much because it strengthens the nhi as child of acio argument
20:02hdbngr has joined #asahi-dev
20:03nnym has joined #asahi-dev
20:05jannauit does not work
20:06svenpity :(
20:08___nick___ has quit [Ping timeout: 480 seconds]
20:09jannauit works but requires `dma_set_mask_and_coherent(&pdev->dev, (1ULL << 40) | DMA_BIT_MASK(36));`
20:11jannauso we would need to specify the dma_mask has hardware data in the device table
20:11hdbngr has quit [Ping timeout: 480 seconds]
20:11sveni've long given up on the idea that we can support M(n+1) with just device tree updates anyway
20:11sventhat 1ULL<<40 | DMA_BIT_MASK(36) looks odd though
20:13svenit's to encode that weird 0x1000... + 36bit iova space
20:16nnym has quit [Remote host closed the connection]
20:16nnym has joined #asahi-dev
20:16jannauI think it is not fully correct because 0x00x_xxxx_xxxx would be valid IOVA as well with that mask
20:17svenhm, there's no way to limit the iova aperture somehow when dma-iommu is used outside of the iommu driver, is there?
20:18svenreserved regions? though that would be a big hack if that worked :D
20:18jannaumaybe if the driver creates a domain and doesn't use the default domain?
20:19svenaren't you stuck with using the iommu api then?
20:21svenand dma-ranges did you use?
20:23jannauit works with and without "dma-ranges" in the parent node. I used 'dma-range = <0x100 0x0 0x1 0x0>;'
20:25hdbngr has joined #asahi-dev
20:27R0K0 has quit [Remote host closed the connection]
20:34hdbngr has quit [Ping timeout: 480 seconds]
20:35___nick___ has joined #asahi-dev
20:36svenhmmm... :/
20:40jannau"dma-range" instead of "dma-ranges" is not going to work and my values were wrong as well
20:42sveni think we'd have to bump back the *-cells to 2
20:42svenand from reading the code it will only enforce the upper limit. maybe.
20:43svenoh well.. maybe v1 will just be base M1/M2 then
20:45jannau#address-cells can stay at 1, size as well if 4GB are enough
20:46jannaucan't use more anyway at the moment since the defailt dma_mask is 32-bit
20:47svenah true, i never increase it in the driver
20:49hdbngr has joined #asahi-dev
20:52sveni wonder if some iommu_dma_set_aperture would be accepted upstream
20:53svenugh, though i think probe would be too late to set that up
20:54Acelogic_ has joined #asahi-dev
20:57hdbngr has quit [Ping timeout: 480 seconds]
20:57jannau'dma-ranges = <0x100 0x0 0x100 0x0 0xffff0000>;' in the parent node works but #address-cells needs to be increased to 2
20:57svenoh, nice!
20:58sventhen i must've missed some code somewhere because to me it looked like especially the lower bound would just be thrown away
21:00Acelogic has quit [Ping timeout: 480 seconds]
21:02jannauI guess it works in the same way as my funky dma_mask by allocation top-down
21:05nnym has quit [Ping timeout: 480 seconds]
21:19nnym has joined #asahi-dev
21:20bgb has quit [Remote host closed the connection]
21:20bgb has joined #asahi-dev
21:26hdbngr has joined #asahi-dev
21:28bgb has quit [Remote host closed the connection]
21:29bgb has joined #asahi-dev
21:31rany has quit [Remote host closed the connection]
21:32rany has joined #asahi-dev
21:32jannauDocumentation/devicetree/bindings/iommu/iommu.txt has an example with #iommu-cells = <4> to specify a DMA window which would map to the iommu aperture
21:35hdbngr has quit [Ping timeout: 480 seconds]
21:36pb17 has quit [Ping timeout: 480 seconds]
21:36svenoh nice
21:38nnym has quit [Ping timeout: 480 seconds]
21:39pb17 has joined #asahi-dev
21:39jannauthere is no device tree with #iommu-cells > 2 though
21:40nnym has joined #asahi-dev
21:59hdbngr has joined #asahi-dev
22:07hdbngr has quit [Ping timeout: 480 seconds]
22:42elvishjerricco has quit [Quit: The Lounge - https://thelounge.chat]
22:44elvishjerricco has joined #asahi-dev
23:13rany has quit [Remote host closed the connection]
23:13rany has joined #asahi-dev
23:27r0ni has joined #asahi-dev
23:52hdbngr has joined #asahi-dev
23:57___nick___ has quit [Ping timeout: 480 seconds]
…