#asahi · 2021-04-17 14:07
kettenisit seems the SoC supports pci gen4, but the peripherals are gen3 (wifi) gen2 (xhci) and gen1 (ethernet)#asahi · 2021-04-17 14:07
ketteniswould be merely an optimization to not try the higher link speeds on peripherals that don't support them#asahi · 2021-04-17 14:06
kettenismy current understanding is that max-link-speed isn't strictly necessary#asahi · 2021-04-17 14:05
kettenisWe (or at least u-boot) needs the reset gpios#asahi · 2021-04-17 13:56
kettenis(and I'm talking about the RC that has the onboard devices, not the Thunderbolt stuff)#asahi · 2021-04-17 13:54
kettenisconfig space!#asahi · 2021-04-17 12:29
kettenisso that raises the question where to put properties like reset-gpios and max-link-speed#asahi · 2021-04-17 12:28
kettenisamost all other pcie RCs that Linux supports in DT mode have only a single port#asahi · 2021-04-17 12:27
kettenisapcie is somewhat unique in that is a RC with three integrated ports#asahi · 2021-04-17 12:27
kettenisbeen thinking a bit about the pcie dt-bindings#asahi · 2021-04-17 12:11
kettenisso that might be ready to be merged#asahi · 2021-04-17 12:09
kettenisaddressed sven's comments on the pce pull request#asahi · 2021-04-17 11:02
kettenisjust pushed a rebase of the pcie branch#asahi · 2021-03-27 16:31
kettenisand potentially controversial since folks have different ideas about how it should be interpreted when there is an IOMMU#asahi · 2021-03-27 16:30
kettenismy point is that the clarification of dma-ranges isn't really related to the DART driver#asahi · 2021-03-27 16:15
kettenissven: I would avoid including a dma-ranges dt-binding tweak if you're not going to rely in dma-ranges in your DART driver#asahi · 2021-03-27 14:54
kettenisbut programming a different address works#asahi · 2021-03-27 14:54
kettenisapple seems to uniformly use 0xffff000 as the doorbell address#asahi · 2021-03-27 14:48
kettenisand it isn't translated by the DART#asahi · 2021-03-27 14:48
kettenismaz: the MSI doorbell address is programmed into the per-port host bridge registers#asahi · 2021-03-27 13:05
kettenishow do you test the AES engine?#asahi · 2021-03-27 10:19
ketteniscould be#asahi · 2021-03-27 10:17
kettenisa bit like not mapping the page at virtual address zero in normal user space#asahi · 2021-03-27 10:16
kettenismy guess would be to catch bugs#asahi · 2021-03-27 10:13
kettenisand putting the window between 0xe0000000 and 0xf0000000 works as well#asahi · 2021-03-27 10:12
kettenisstarting at 0 causes no issues#asahi · 2021-03-27 10:12
kettenisso I played around a bit with the boundaries#asahi · 2021-03-27 10:09
kettenisI suppose this means we could shelve the dma window issue for later?#asahi · 2021-03-27 10:07
kettenisI suspect that we do have to avoid the MSI address though#asahi · 2021-03-27 10:07
kettenisthe DART seems to work fine outside the vm-base/vm-size range#asahi · 2021-03-27 10:06
kettenisI thought I tried this at some point; maybe I messed it up#asahi · 2021-03-25 19:22
kettenisand cleared after reading INTERRUPT_ACK#asahi · 2021-03-25 19:22
kettenismarcan: the bit corresponding to the MSI interrupt is set in HW_STATUS before reading INTERRUPT_ACK#asahi · 2021-03-25 18:50
kettenisright#asahi · 2021-03-25 18:49
kettenislet me see if I can somehow dump that#asahi · 2021-03-25 18:48
kettenisif MSI data is 1 it will trigger "msi-vector-offset" + 1#asahi · 2021-03-25 18:47
kettenisso if MSI data is 0 it will trigger the AIC interrupt at "msi-vector-offset"#asahi · 2021-03-25 18:47
kettenisright#asahi · 2021-03-25 18:46
kettenisI suppose splitting the MSIs over the ports has some benefits for device isolation, maybe for VMs#asahi · 2021-03-25 18:45
kettenis#msi-vectors is the number of MSIs#asahi · 2021-03-25 18:45
kettenisyes, "msi-vector-offset" in the ADT is the AIC interrupt vector that MSI 0 maps to#asahi · 2021-03-25 18:38
kettenisbut I'm running the bridge in a config where all 32 MSIs are shared among ports#asahi · 2021-03-25 18:38
kettenis(which means the last 8 are unused)#asahi · 2021-03-25 18:37
kettenisAnd Apple's device tree has properties suggsting that each port gets 8 of them#asahi · 2021-03-25 18:37
kettenisThere is a mechanism to distribute those over the individual root ports#asahi · 2021-03-25 18:36
kettenisit seems there are 32 MSIs#asahi · 2021-03-25 18:36
kettenisregarding the MSI logic in the PCIe host bridge#asahi · 2021-03-25 18:36
kettenisas the OpenBSD xhci(4), bwfm(4) and bge(4) drivers work reliably#asahi · 2021-03-25 18:35
kettenisI'm fairly confident that I'm not missing any MSIs#asahi · 2021-03-25 18:34
ketteniswouldn't surprise me if that's the case and that this is hardwired behaviour