#
✕ nick:sven
#asahi-dev · 2021-11-23 15:30
sveninto ans, yes
#asahi-dev · 2021-11-23 15:24
svenand that obviously requires a fancy protocol! "The Controller in turn sends the command to the Mac Pro or Mac mini using a secured and proprietary protocol."
#asahi-dev · 2021-11-22 07:34
svendid you see the agx iommu node (on which agx depends) that's really just a stub that just calls into the main driver?
#asahi-dev · 2021-11-22 07:32
svenoh, i'd like to punish them for some more creative ideas in their ADT while we're at it
#asahi-dev · 2021-11-22 07:16
sven:/
#asahi-dev · 2021-11-22 07:03
sveni mean the entire TB stuff :D
#asahi-dev · 2021-11-22 07:03
svensure, it's just going to be a mess one way or another
#asahi-dev · 2021-11-22 07:02
svenoh, ATC will already be a reset provider anyway :P
#asahi-dev · 2021-11-22 07:02
svenbecause otherwise this is going to be mess inside the kernel :/
#asahi-dev · 2021-11-22 07:02
sveni still kinda hope we can get away with initializing just enough for TB to at least enable the DARTs inside m1n1 without triggering that weird watchdog i ran into last time i tried
#asahi-dev · 2021-11-22 07:01
svenhuh
#asahi-dev · 2021-11-22 07:00
sventhe thunderbolt darts are going to be annoying like that. they need some TB init before you can access them without serrors :/
#asahi-dev · 2021-11-21 11:30
svenAnd there nvme is attached over pcie so you “just” need a few quirks to the normal driver to make it work in that mode
#asahi-dev · 2021-11-21 11:29
svenI guess it’s for the t2 where the whole nvmmu doesn’t make much sense
#asahi-dev · 2021-11-20 12:56
svenugh, no nevermind. that won't work because the NVMMU entries for that queue will not increase
#asahi-dev · 2021-11-20 12:54
svenit's possibly to decrease the size of admin queue though. might make sense to see if a smaller admin queue and a bigger io queue results in better performance once everything else works
#asahi-dev · 2021-11-20 12:52
svenok, looks like 0x40 is the actual max queue size
#asahi-dev · 2021-11-20 12:43
sveni just assumed it translated the normal SQ to this linear SQ stuff and passed through most of the rest
#asahi-dev · 2021-11-20 12:11
svenprobably not. just trying to understand how this HW actually works before I clean up this driver
#asahi-dev · 2021-11-20 12:08
svenhm.. i wonder if i can increase the nvmmu and queue size beyond the 0x40 macOS configures
#asahi-dev · 2021-11-20 12:02
sveniirc SEP also doesn't have it
#asahi-dev · 2021-11-20 12:02
svenwe also need to poke that register again if we need to reset ANS for whatever reason
#asahi-dev · 2021-11-20 12:02
svenyup
#asahi-dev · 2021-11-20 11:58
svenimho that register belongs to whatever node handles the rtkit stuff as well. the thunderbolt co-processors e.g. don't even have that register
#asahi-dev · 2021-11-20 11:38
svenor, well, at least the sq entries seem to be 128 bytes just like they are on the T2
#asahi-dev · 2021-11-20 11:38
svenand it looks like in this "linear sq" disabled mode it needs the same quirks as the T2 macs.
#asahi-dev · 2021-11-20 11:36
svenyeah
#asahi-dev · 2021-11-20 11:32
sveniirc they already didn't like that we had to add platform support
#asahi-dev · 2021-11-20 11:30
sveni also don't think it makes the linux driver much simpler since the maintainers want us to copy/paste the pci driver anyway
#asahi-dev · 2021-11-20 11:26
svenyeah
#asahi-dev · 2021-11-20 11:25
svenmacOS also limits the ioqueue to 0x24 instead of 0x40 entries
#asahi-dev · 2021-11-20 11:18
svenso maybe T2 doesn't really emulate another NVMe interface at all but just passes through the ANS interface with "linear sq" disabled
#asahi-dev · 2021-11-20 11:16
svenyeah, and T2 emulates a slightly-differently-quirked NVMe-over-PCIe for the x86 chip afaik
#asahi-dev · 2021-11-20 11:11
svenit also creates a smaller adminqueue for some reason
#asahi-dev · 2021-11-20 11:10
svenbut in this mode the NVMMU is completely unused and macOS seems to just use the normal cq/sq
#asahi-dev · 2021-11-20 11:10
svenugh. guess it's time to make my nvme tracer support normal nvme as well
#asahi-dev · 2021-11-20 10:58
svenstill need to play with it some more but i think this more or less converts it to a regular NVMe (just not over PCIe)
#asahi-dev · 2021-11-20 10:57
svenyeah, possibly
#asahi-dev · 2021-11-20 10:56
svenlooks like that also disables the weird NVMMU
#asahi-dev · 2021-11-20 10:51
svennvme-linear-sq-disable=1 actually
#asahi-dev · 2021-11-20 10:50
svennvme-linear-sq-disable as a bootarg should switch to it i guess
#asahi-dev · 2021-11-20 10:50
svenhah, and macOS even supports this mode afaict
#asahi-dev · 2021-11-20 10:48
svenwe'll probably still need a separate (aka copy/pasted) driver and at that point it doesn't really matter i guess
#asahi-dev · 2021-11-20 10:48
svenno idea yet :D
#asahi-dev · 2021-11-20 10:46
svenhuh, looks like it's possible to disable this nvme mode apple calls "linear-sq"
#asahi-dev · 2021-11-15 16:11
svenbut that was more than just PMGR
#asahi-dev · 2021-11-15 16:10
sventhat happened when i half-enabled the thunderbolt coprocessors
#asahi-dev · 2021-11-14 12:02
sven:D
#asahi-dev · 2021-11-13 12:56
svenhrm, nope.
#asahi-dev · 2021-11-13 12:53
svenhuh, or maybe it's already there on the M1. i think if you write 'rest' to 'MBSE' it'll reset.

plus ›