nico_32 has quit [Remote host closed the connection]
nico_32 has joined #asahi-dev
yuyichao_ has joined #asahi-dev
phiologe has joined #asahi-dev
slicey has joined #asahi-dev
PhilippvK has quit [Ping timeout: 480 seconds]
rkt has joined #asahi-dev
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi-dev
leah has joined #asahi-dev
slicey has quit [Quit: zzz]
squags has joined #asahi-dev
gabuscus has quit [Read error: Connection reset by peer]
gabuscus has joined #asahi-dev
___nick___ has joined #asahi-dev
slicey has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
Dcow has joined #asahi-dev
the_lanetly_052__ has joined #asahi-dev
<sven>
huh, looks like it's possible to disable this nvme mode apple calls "linear-sq"
<povik>
that's good news?
<sven>
no idea yet :D
<sven>
we'll probably still need a separate (aka copy/pasted) driver and at that point it doesn't really matter i guess
rkt has left #asahi-dev [#asahi-dev]
<sven>
hah, and macOS even supports this mode afaict
<sven>
nvme-linear-sq-disable as a bootarg should switch to it i guess
<sven>
nvme-linear-sq-disable=1 actually
aleasto has joined #asahi-dev
slicey has quit [Quit: zzz]
<sven>
looks like that also disables the weird NVMMU
<j_ey>
sven: might be nice as a first approach if it removes enough code?
<sven>
yeah, possibly
<sven>
still need to play with it some more but i think this more or less converts it to a regular NVMe (just not over PCIe)
<sven>
ugh. guess it's time to make my nvme tracer support normal nvme as well
<sven>
but in this mode the NVMMU is completely unused and macOS seems to just use the normal cq/sq
<sven>
it also creates a smaller adminqueue for some reason
<kettenis>
interesting
<kettenis>
makes some sense since Intel Macs uses "normal" NVMe
<kettenis>
but on those NVMe was provided by Apples own implementation in the T2 chip
<sven>
yeah, and T2 emulates a slightly-differently-quirked NVMe-over-PCIe for the x86 chip afaik
<kettenis>
I bet we'd need the same quirks for the M1 in this mode
<sven>
so maybe T2 doesn't really emulate another NVMe interface at all but just passes through the ANS interface with "linear sq" disabled
<sven>
macOS also limits the ioqueue to 0x24 instead of 0x40 entries
<kettenis>
my assumption has always been that the underlying hardware was very similar
<kettenis>
just different firmware
<kettenis>
but even that might not be the case
<sven>
yeah
<kettenis>
the risk of using this other mode is that Apple introduces bugs into it or removes it altogether in the future
<kettenis>
because macos doesn't use it
<sven>
i also don't think it makes the linux driver much simpler since the maintainers want us to copy/paste the pci driver anyway
<kettenis>
well, this might change their minds
<sven>
iirc they already didn't like that we had to add platform support
<kettenis>
fair enough
<kettenis>
we probably want the NVMMU anyway
<sven>
yeah
<sven>
and it looks like in this "linear sq" disabled mode it needs the same quirks as the T2 macs.
<sven>
or, well, at least the sq entries seem to be 128 bytes just like they are on the T2
<kettenis>
eh, sven, regarding the mailbox
<kettenis>
the register to start the coprocessor isn't exposed in your binding
<kettenis>
how is that supposed to work?
<sven>
imho that register belongs to whatever node handles the rtkit stuff as well. the thunderbolt co-processors e.g. don't even have that register
<kettenis>
ah, ok
<kettenis>
so that's why you added that 2nd range to the nvme node
<sven>
yup
<sven>
we also need to poke that register again if we need to reset ANS for whatever reason
<sven>
iirc SEP also doesn't have it
<kettenis>
and SMC doesn't need it
<kettenis>
(trying to convert u-boot to the new mailbox binding)
<sven>
hm.. i wonder if i can increase the nvmmu and queue size beyond the 0x40 macOS configures
<kettenis>
doubt that's a good idea
<sven>
probably not. just trying to understand how this HW actually works before I clean up this driver
<kettenis>
pushing things until they break is always fun!
bps has joined #asahi-dev
<marcan>
sven: I never thought T2 emulates NVMe
<marcan>
always assumed it was ANS passed through
<marcan>
but linear SQ being an option makes sense in that context, yeah
<marcan>
it doesn't really make any sense for T2 to emulate another layer on top of ANS, it's already NVMe
<sven>
i just assumed it translated the normal SQ to this linear SQ stuff and passed through most of the rest
<marcan>
I just figured whatever ANS firmware they used for it did things differently
<sven>
ok, looks like 0x40 is the actual max queue size
Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<sven>
it'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
<sven>
ugh, no nevermind. that won't work because the NVMMU entries for that queue will not increase
bps has quit [Ping timeout: 480 seconds]
bps has joined #asahi-dev
gladiac is now known as Guest6367
gladiac has joined #asahi-dev
aleasto has quit [Remote host closed the connection]
Guest6367 has quit [Ping timeout: 480 seconds]
nskl has quit [Remote host closed the connection]
nskl has joined #asahi-dev
bps has quit [Ping timeout: 480 seconds]
slicey has joined #asahi-dev
slicey has quit []
nskl has quit [Quit: WeeChat 3.3]
nsklaus has joined #asahi-dev
nsklaus has quit []
nsklaus has joined #asahi-dev
the_lanetly_052___ has joined #asahi-dev
the_lanetly_052__ has quit [Ping timeout: 480 seconds]