#
✕ nick:sven
#asahi-dev · 2026-08-15 18:15
svenso 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
#asahi-dev · 2026-08-15 17:05
svenvery strange
#asahi-dev · 2026-08-15 17:01
svenweird
#asahi-dev · 2026-08-15 17:01
svenusually it’s stuff like coprocessor firmware etc
#asahi-dev · 2026-08-15 17:00
svendoesn’t matter for the PR but I’m curious what’s in there
#asahi-dev · 2026-08-15 17:00
svenright, have you looked at those contents? it’s weird they just lock down a random region
#asahi-dev · 2026-08-15 16:55
svendo you know what’s in that memory region?
#asahi-dev · 2026-08-15 16:55
svenknowing Apple the solution for that radar will be „let’s also lock down that region on the boot core“ :D
#asahi-dev · 2026-08-15 16:55
svenI’d add the workaround
#asahi-dev · 2026-08-15 14:30
svener, wait, you mean mcc carveouts and not fdt carveouts i guess?
#asahi-dev · 2026-08-15 14:30
svenand doesn't linux reserve the carveouts in its own memory map and never hands out that memory to anyhting?
#asahi-dev · 2026-08-15 14:30
svennothing, it just has to be enabled
#asahi-dev · 2026-08-15 10:07
svenah well, that sounds like the issue then
#asahi-dev · 2026-08-15 10:07
sveni also wonder if we even need to do tlb maintenance when adding mappings to dart
#asahi-dev · 2026-08-15 09:53
svenhm.. weird that the speeds are so different then
#asahi-dev · 2026-08-15 09:51
svenlet's see if i can reproduce that usb3 no longer works after a tbt connection was made
#asahi-dev · 2026-08-15 09:51
svenso now devices don't wedge the port forever anymore
#asahi-dev · 2026-08-15 09:51
sventhe new thunderbolt WARN was surprisingly easy to fix i think \o/
#asahi-dev · 2026-08-15 09:40
svensounds like one path re-uses buffers while the other constantly maps/unmaps them
#asahi-dev · 2026-08-15 09:40
sveni bet it's very different
#asahi-dev · 2026-08-15 09:40
svenif 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
#asahi-dev · 2026-08-15 09:40
sventhis is usb4net, right?
#asahi-dev · 2026-08-15 09:39
svenit essentially batches unmaps and then does them all at once after some timeout or when the queue is filled
#asahi-dev · 2026-08-15 09:39
svenyeah, -FQ only affects unmap
#asahi-dev · 2026-08-15 09:37
sventhere must be some difference the way dma buffers are handled in the RX and TX path
#asahi-dev · 2026-08-15 09:36
svenokay, so it's iommu crap
#asahi-dev · 2026-08-15 09:33
svencan 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
#asahi-dev · 2026-08-15 09:32
svencould be weird interaction between usb4net and dart
#asahi-dev · 2026-08-15 09:21
sveni don't think we can control that, can we?
#asahi-dev · 2026-08-15 09:20
svencan you see what it's doing in that softirq context?
#asahi-dev · 2026-08-15 09:10
svenoh, true
#asahi-dev · 2026-08-15 09:08
svenmy current local copy is probably slightly more efficient in the irq path but that shouldn't explain >2x difference in RX vs TX
#asahi-dev · 2026-08-15 09:07
svenyeah, possibly
#asahi-dev · 2026-08-15 09:03
svenoh well, was worth a quick try
#asahi-dev · 2026-08-15 09:03
sven:(
#asahi-dev · 2026-08-15 08:57
svenhates thunderbolt
#asahi-dev · 2026-08-15 08:57
svenlol, fixed the thunderbolt domain leak and i get immediately greeted with a WARN now :D
#asahi-dev · 2026-08-15 08:50
svenwhich with VHE gets aliased to the same in EL2
#asahi-dev · 2026-08-15 08:49
svenyuka: i bet they're both the same register, some CTRR control just _EL1 and _EL2
#asahi-dev · 2026-08-14 21:44
svenand if the RX direction constantly churns iommu mappings and invalidates DART all the time that might just be very expensive
#asahi-dev · 2026-08-14 21:44
svenmy suspicion is that usb4net was just not written with an iommu in mind
#asahi-dev · 2026-08-14 21:43
svenjannau: if you can try to set the DART to bypass
#asahi-dev · 2026-08-14 19:43
svenfound the leak, it‘s that commit. just dunno how to fix it yet :/
#asahi-dev · 2026-08-14 19:22
svenhmmmm
#asahi-dev · 2026-08-14 19:13
svenI wonder how well this code was tested and optimized when running with an iommu enabled
#asahi-dev · 2026-08-14 19:13
svencan you put the dart in bypass mode?
#asahi-dev · 2026-08-14 19:05
svenmust avoid being nerdsniped into figuring out why that one direction is slower
#asahi-dev · 2026-08-14 19:04
svenwhoa
#asahi-dev · 2026-08-14 18:19
svenand leaking a domain isn't fatal on intel unlike on apple
#asahi-dev · 2026-08-14 18:19
sventhat was introduced after the previous tbt branch that worked and it already had a bunch of subtle fixes

plus ›