#asahi-re · 2022-04-07 18:31
svenoh, you could also intercept the i2c reads from that tps6598x chip under the HV and pretend that you connected a thunderbolt cable#asahi-re · 2022-04-07 18:30
svenI wonder if there's something cheap, I just used my tb dock that I had anyway#asahi-re · 2022-04-07 18:30
rqou_ok i really need to go out and buy a thunderbolt widget and take a look#asahi-re · 2022-04-07 18:30
sveni'd expect the thunderbolt ones to support at least 64#asahi-re · 2022-04-07 18:29
sveninteresting#asahi-re · 2022-04-07 18:29
rqou_the register interface seems to be built for up to 256 streams, but the first 16 seem to still be special with more features#asahi-re · 2022-04-07 18:29
rqou_of the t8110 darts i've looked at, they all support 16 streams, 42-bit physaddrs, and 36-bit iova according to the parameter registers#asahi-re · 2022-04-07 18:28
sventhe t8103 limitation feels like legacy from the old iphones when they had 4kb DARTs#asahi-re · 2022-04-07 18:28
rqou_the prores block itself is limited to 42 bit iova space#asahi-re · 2022-04-07 18:28
svenwould be interesting#asahi-re · 2022-04-07 18:27
rqou_i can test it with the prores block later#asahi-re · 2022-04-07 18:27
rqou_the hardware config register says 36 bits#asahi-re · 2022-04-07 18:27
svenokay, then it might still be limited to 32bit#asahi-re · 2022-04-07 18:27
rqou_that's just from static analysis of macos drivers#asahi-re · 2022-04-07 18:27
rqou_fwiw i haven't _tested_ the full extent of the iova space#asahi-re · 2022-04-07 18:26
rqou_i should buy a thunderbolt widget just so i can do what you suggested (read register 0 once macos has set everything up)#asahi-re · 2022-04-07 18:26
svenon t8103 everything above 32bit got truncated even though technically the pagetables supported more#asahi-re · 2022-04-07 18:26
svenokay, nice#asahi-re · 2022-04-07 18:25
rqou_no, 36 bits on everything except the apciec ones, which i haven't managed to check#asahi-re · 2022-04-07 18:24
svenis t8110 still limited to 32bit iovas?#asahi-re · 2022-04-07 18:24
svenmaybe they just got rid of the bypass mode completely#asahi-re · 2022-04-07 18:23
rqou_fwiw t8110 doesn't seem to have any equivalent setting, so either i haven't found it or it cannot do that#asahi-re · 2022-04-07 18:22
rqou_afaict it only does 32bit, but i've only been testing in m1n1 with DART enabled#asahi-re · 2022-04-07 18:22
svenif it's the latter you're probably right#asahi-re · 2022-04-07 18:22
svenmaybe jpeg has something similar or maybe it really only does 32bit addressing#asahi-re · 2022-04-07 18:22
svenwhat i meant was that to program a 64bit address into dwc3 you write the halves to two separate 32 bit registers#asahi-re · 2022-04-07 18:22
rqou_at bit [23:16]#asahi-re · 2022-04-07 18:21
rqou_it's in the register that m1n1 seems to be calling TCR#asahi-re · 2022-04-07 18:21
sventhe pcie ones e.g. don't#asahi-re · 2022-04-07 18:21
rqou_that's probably what the "bypass_addr_39_32" does then#asahi-re · 2022-04-07 18:21
sventhe DART also needs to support bypass mode#asahi-re · 2022-04-07 18:21
svenunless there's a second register for the upper half of the address or something like that#asahi-re · 2022-04-07 18:20
svenyeah#asahi-re · 2022-04-07 18:20
rqou_but that won't work for devices like jpeg that only seem to itself be able to pass 32-bit physaddrs?#asahi-re · 2022-04-07 18:20
rqou_huh#asahi-re · 2022-04-07 18:20
svenif you e.g. enable bypass for dwc3 you can just pass the phys addrs that are above that limit to the HW#asahi-re · 2022-04-07 18:20
rqou_oh ok#asahi-re · 2022-04-07 18:19
svenbut that limitation only applies in translated mode on t8103 at least#asahi-re · 2022-04-07 18:19
svenyes#asahi-re · 2022-04-07 18:19
rqou_isn't the iova space smaller than the physical address space?#asahi-re · 2022-04-07 18:18
svenI guess you can also give them an offset then? dunno#asahi-re · 2022-04-07 18:18
svenif you set that bypass enable bit in TCR it just passes through all DMA transactions#asahi-re · 2022-04-07 18:18
rqou_but i don't quite understand how bypass mode works (and i'm not sure t8110 has it)#asahi-re · 2022-04-07 18:17
rqou_there's also bypass_addr_39_32 (and bypass_addr_41_32 for t6000) in the TCR#asahi-re · 2022-04-07 18:17
svennever looked at the KDK#asahi-re · 2022-04-07 18:17
rqou_the typedef in the KDK for "dart_blk_sid_config_v8_t" has a bunch of disable bits, e.g. "disable_ttbr_invalid_err" "disable_ste_invalid_error" etc.#asahi-re · 2022-04-07 18:16
svenhttp://f.svpe.de/70fb5357bea78c2e50f0017f563907ebe775cd731861d37751346a1eb8ad61c9_aes.py looks like I didn't find the ready bit in that aes engine :/#asahi-re · 2022-04-07 18:16
svenI figured out most of DART by poking registers and observing what happens, we didn't have the HV back then :D#asahi-re · 2022-04-07 18:16
sveni wasn't aware there are any error disable bits#asahi-re · 2022-04-07 18:15
rqou_also, from the symbols, t6000 doesn't have the error disable bits that t8020 has in the TCR (none of which are in m1n1)