#
#asahi-dev · 2026-08-18 20:22
sven+what
#asahi-dev · 2026-08-18 20:21
svenand dma-ranges did you use?
#asahi-dev · 2026-08-18 20:19
svenaren't you stuck with using the iommu api then?
#asahi-dev · 2026-08-18 20:18
jannaumaybe if the driver creates a domain and doesn't use the default domain?
#asahi-dev · 2026-08-18 20:18
svenreserved regions? though that would be a big hack if that worked :D
#asahi-dev · 2026-08-18 20:17
svenhm, there's no way to limit the iova aperture somehow when dma-iommu is used outside of the iommu driver, is there?
#asahi-dev · 2026-08-18 20:16
jannauI think it is not fully correct because 0x00x_xxxx_xxxx would be valid IOVA as well with that mask
#asahi-dev · 2026-08-18 20:13
svenit's to encode that weird 0x1000... + 36bit iova space
#asahi-dev · 2026-08-18 20:13
svennvm
#asahi-dev · 2026-08-18 20:13
svenoh
#asahi-dev · 2026-08-18 20:11
sventhat 1ULL<<40 | DMA_BIT_MASK(36) looks odd though
#asahi-dev · 2026-08-18 20:11
sveni've long given up on the idea that we can support M(n+1) with just device tree updates anyway
#asahi-dev · 2026-08-18 20:11
jannauso we would need to specify the dma_mask has hardware data in the device table
#asahi-dev · 2026-08-18 20:09
jannauit works but requires `dma_set_mask_and_coherent(&pdev->dev, (1ULL << 40) | DMA_BIT_MASK(36));`
#asahi-dev · 2026-08-18 20:06
svenpity :(
#asahi-dev · 2026-08-18 20:05
jannauit does not work
#asahi-dev · 2026-08-18 19:59
svenyes, but i would enjoy this very much because it strengthens the nhi as child of acio argument
#asahi-dev · 2026-08-18 19:59
jannaulet me check. it would be a little annoying since it's a solution that only works for tbt
#asahi-dev · 2026-08-18 19:57
svenlet me check if we can just use dma-ranges here since we already have that parent node anyway
#asahi-dev · 2026-08-18 19:47
jannaunot sure how everyone feels about inscreasing #iommu-cells
#asahi-dev · 2026-08-18 19:47
jannauagreed, it feels like it should belong to the node which uses the dart
#asahi-dev · 2026-08-18 19:44
svenI really don’t want to upstream that property because it feels wrong on the dart node
#asahi-dev · 2026-08-18 19:43
jannauso "apple,dma-range = <0x100 0x0 0x1 0x0>;" seems to work
#asahi-dev · 2026-08-18 19:43
sven🙃
#asahi-dev · 2026-08-18 19:42
jannauiova are as expected but it looks like acio has only a 36-bit address space (which still starts at 0x100_0000_0000
#asahi-dev · 2026-08-18 19:30
sveni dunno if the iova code respects that
#asahi-dev · 2026-08-18 19:30
svenyou might be able to hack this with dma-ranges in the parent node as well :D
#asahi-dev · 2026-08-18 19:30
svenit probably faults once the first entry is added to that ring
#asahi-dev · 2026-08-18 19:30
svenring_iowrite64desc(ring, ring->descriptors_dma, 0); is probably the iova
#asahi-dev · 2026-08-18 19:29
svenyou can add prints to tb_ring_start
#asahi-dev · 2026-08-18 19:27
svenoh
#asahi-dev · 2026-08-18 19:25
jannauno, I suspect linux uses 0xeffff8000 and acio somehow offsets it by vm-base (0x100_0000_0000) anyway
#asahi-dev · 2026-08-18 19:22
svenbut that should still be in that range, shouldn't it?
#asahi-dev · 2026-08-18 19:22
svenhm, true, it at least used to allocate top-down
#asahi-dev · 2026-08-18 19:22
jannauwith "apple,dma-range = <0x100 0x0 0x2ff 0x0>;"
#asahi-dev · 2026-08-18 19:22
jannauiirc it allocates top down so I would expect iovas of the form 0x3fe_xxxx_xxxx
#asahi-dev · 2026-08-18 19:20
sveni suspected that the tbt code was never tested with iovas >32bit
#asahi-dev · 2026-08-18 19:19
jannaunot sure linux' dma iommu code does the right thing
#asahi-dev · 2026-08-18 19:18
jannau0x10effff8000 and 0x10effffc000
#asahi-dev · 2026-08-18 19:17
svenwhat's the iova that fails?
#asahi-dev · 2026-08-18 19:16
jannaustill fails with that (and set_dma_mask_and_coherent(DMA_BIT_MASK(42)))
#asahi-dev · 2026-08-18 19:09
sven:/
#asahi-dev · 2026-08-18 18:57
jannauno, it probably needs "iommu: apple-dart: Support specifying the DMA aperture in the DT"
#asahi-dev · 2026-08-18 18:54
svendoes the iova it faults on look like something linux would've allocated?
#asahi-dev · 2026-08-18 18:52
svenugh, some t602x thing then
#asahi-dev · 2026-08-18 18:52
jannaut6001 still works
#asahi-dev · 2026-08-18 18:45
svenhmmmm
#asahi-dev · 2026-08-18 18:45
chaos_princessno, that is i think m4 pro/max and m3 ultra
#asahi-dev · 2026-08-18 18:44
svendoes that already have tbt5?
#asahi-dev · 2026-08-18 18:44
svencould also be a t602x thing, sure

plus ›