#asahi-dev · 2021-10-22 08:14
svenand i think arm's smmu also only decides the actual pagesize after the first device is attached, but i'd have to read that code again to confirm that#asahi-dev · 2021-10-22 08:14
svenapple had a previous iphone SoC where there were some DARTs that could only do 4k pages and other that could only to 16k pages on the same bus#asahi-dev · 2021-10-22 08:12
svenand that's required because before attaching the first device to an empty domain i might have no idea what the actual i/o pagesize(s) will be. and that's really caused by the original design decision that a single bus can only have a single iommu type. #asahi-dev · 2021-10-22 08:12
sveni think he dislikes that i have to attach a device to a domain and then maybe detach it directly afterwards which, to be fair, is awkward.#asahi-dev · 2021-10-21 15:03
svenit'll trigger an error interrupt and the fault address with be 0x10 bytes into the page#asahi-dev · 2021-10-21 15:02
svenbut if you want a simple test: just setup the range to only the first 0x10 bytes of a page and then trigger a DMA request with more than 0x10 bytes#asahi-dev · 2021-10-21 15:01
svenstill have to test the pcie ones#asahi-dev · 2021-10-21 15:01
svenit works on the usb ones and on the audio/aes/whatever (dart-sio)#asahi-dev · 2021-10-21 15:00
svenkettenis: not sure yet#asahi-dev · 2021-10-21 13:22
svenmight make sense if it's much faster#asahi-dev · 2021-10-21 13:21
svenmaybe, it would allow us to skip swiotlb entirely if this can be hooked up in a sane way to the iommu subsystem#asahi-dev · 2021-10-21 13:20
sveni also finally got around to figure out how this DART subpage protection works: there's still some weirdness but afaict you clear BIT(1) in the PTE to enable it and then bits 63,52 are the start and 51,40 the end offset>>2 inside the page that's allowed. any access outside that range will just be blocked#asahi-dev · 2021-10-21 13:18
svendcp, ans and smc definitely are#asahi-dev · 2021-10-21 13:18
sveni think most of them are just arm64 cores#asahi-dev · 2021-10-20 12:27
svenjust create a new machine learning subsystem!#asahi-dev · 2021-10-19 12:33
svenit's in the mailbox core#asahi-dev · 2021-10-19 12:33
sventhere's already locking, you just don't see it#asahi-dev · 2021-10-19 12:32
svenriiiiight :D#asahi-dev · 2021-10-19 12:31
svenwhile apple just prefers to have more than a single mailbox :D#asahi-dev · 2021-10-19 12:31
svenit's not a big deal. jassi probably just didn't keep in mind that this thing has mbox-cells = <0> because most other mailboxes have more than a single channel#asahi-dev · 2021-10-19 12:30
svenyeah#asahi-dev · 2021-10-19 12:26
sventhe way to specify "this mailbox doesn't have any channels" is #mbox-cells = <0>; :-)#asahi-dev · 2021-10-19 12:21
svenbut then it looks like this hardware might support more than one channel which it doesn't#asahi-dev · 2021-10-19 11:56
sveni'll need v4 for the mailbox anyway because robher's schema validator got even better and caught a unnecessary "minItems: 4" in there#asahi-dev · 2021-10-19 11:55
svenbut you can just hack mboxes = <&whatever 0>; for now in the device tree #asahi-dev · 2021-10-19 11:54
svenbecause we have #mbox-cells = <0>#asahi-dev · 2021-10-19 11:54
sveni'll have to keep it#asahi-dev · 2021-10-19 08:29
svenalyssa: and remember that you need the dma barriers in the rtkit core now#asahi-dev · 2021-10-19 08:28
svenalyssa: you can hack it by just doing mbox = <&whatever 0> in the dt#asahi-dev · 2021-10-19 08:20
sventhe mailbox core only supports #mbox-cells = <1>#asahi-dev · 2021-10-19 08:20
svenalyssa: oh... turns out we do need that of_xlate jassi wanted me to get rid of after all#asahi-dev · 2021-10-18 21:43
svenhrm, could also just be missing additional patches to the wifi driver#asahi-dev · 2021-10-13 09:19
svenit sounds like this was just a terrible situation with no good solution. and i guess that hack was just the least bad solution in the end#asahi-dev · 2021-10-13 07:11
svenyeah. that's why I assume that X must've messed up pretty badly#asahi-dev · 2021-10-13 07:09
svenpretty sure it's in the kernel#asahi-dev · 2021-10-13 06:41
svenbut seriously, enabling a workaround depending on the process name kinda sounds like X messed up in truly horrible ways#asahi-dev · 2021-10-13 06:40
svennah, not everyone. only every process that starts with X! :-P#asahi-dev · 2021-10-13 06:06
svenbut that's quite a hack. X must've screwed up pretty badly :D#asahi-dev · 2021-10-13 06:06
svenor just set req->value > 1 if your binary starts with X i guess#asahi-dev · 2021-10-12 06:29
svenlol#asahi-dev · 2021-10-12 06:28
sveni was too lazy to do that :D#asahi-dev · 2021-10-12 06:27
svenmine requires me to manually specify the vtable once (for which i use the hv), but yeah#asahi-dev · 2021-10-12 06:26
sveneven finding those dumb %s.debug=0xff arguments isn't fun because there's like two or three layers of vtables involved #asahi-dev · 2021-10-12 06:25
svenhaving that hypervisor also helps a lot. reverse engineering kexts is terribly annoying#asahi-dev · 2021-10-09 11:32
svensome of the existing mappings for DCP are also in the ADT i think. it's just called segment-ranges there#asahi-dev · 2021-10-08 18:09
svennice!#asahi-dev · 2021-10-08 18:05
svenhrm, no. that one still seems to be broken#asahi-dev · 2021-10-08 18:02
svenlet's see if the aes engine also works after that poke :D#asahi-dev · 2021-10-08 18:02
sven\o/