#
✕ nick:kettenis_
#asahi · 2021-04-06 15:23
kettenis_tg3 runs fine without firmware
#asahi · 2021-04-06 15:03
kettenis_robher: what is the policy for documenting devicetree that the Linux kernel wouldn't care about but that we need to pass information from m1n1 to u-boot?
#asahi · 2021-04-06 14:58
kettenis_robher: looks like there is enough ECAM space
#asahi · 2021-04-06 14:56
kettenis_the tunables that mess around with that have "shadow" in their name
#asahi · 2021-04-06 14:56
kettenis_GEN3_RELATED_OFF_RATE_SHADOW_SEL_MASK
#asahi · 2021-04-06 14:55
kettenis_well spotted
#asahi · 2021-04-06 14:37
kettenis_so I think pcie support in m1n1 would be fairly low priority
#asahi · 2021-04-06 14:37
kettenis_but that doesn't need pcie
#asahi · 2021-04-06 14:36
kettenis_I think marcan's plans include nvme support to access some of the firmware blobs
#asahi · 2021-04-06 14:35
kettenis_haven't tested usb ethernet myself, but that must be what maz is using to netboot ;)
#asahi · 2021-04-06 14:31
kettenis_but that is only present on the mini, not on the laptops
#asahi · 2021-04-06 14:31
kettenis_full pcie support would bring support for the type-A ports and Ethernet
#asahi · 2021-04-06 14:30
kettenis_that is for the type-C ports
#asahi · 2021-04-06 14:30
kettenis_sven already wrote the code for dwc3 usb support for m1n1
#asahi · 2021-04-06 14:26
kettenis_right
#asahi · 2021-04-06 14:25
kettenis_out of reset in m1n1 I mean
#asahi · 2021-04-06 14:25
kettenis_maybe it is possible to bring the RC ports out of reset and let u-boot take care of the more complicated stuff
#asahi · 2021-04-06 14:23
kettenis_needs some gpio, pinctrl and mailbox stuff
#asahi · 2021-04-06 14:22
kettenis_there is quite a bit complexity, and I've already implemented that for u-boot
#asahi · 2021-04-06 14:21
kettenis_right
#asahi · 2021-04-06 14:17
kettenis_for u-boot we'd still need to pass the information in the device tree
#asahi · 2021-04-06 14:15
kettenis_as long as m1n1 or u-boot applies these fixups that is
#asahi · 2021-04-06 14:13
kettenis_ok, so maybe we don't need to pass this information through to Linux
#asahi · 2021-04-06 13:52
kettenis_but if m1n1 takes stuff out of PERST, U-boot and/or the OS need to be careful about doing it again
#asahi · 2021-04-06 13:50
kettenis_not sure if Linux ever wants to do a PERST
#asahi · 2021-04-06 13:49
kettenis_but the config space ones I listed on the wiki page that marcan quoted require significant more bringup of the PCIe controller and don't survive a PERST
#asahi · 2021-04-06 13:48
kettenis_those can be applied in m1n1
#asahi · 2021-04-06 13:48
kettenis_arndb: so most of the various pcie-related tunables can be applied by m1n1 and "stick" even if you then disable/enable clock gating or reset the PHY
#asahi · 2021-04-06 13:35
kettenis_it doesn't match up with anything I'm familliar with
#asahi · 2021-04-06 13:33
kettenis_yes, but in my opinion building logic in the OS driver (and duplicating it in various OSes and U-Boot) isn't sane
#asahi · 2021-04-06 13:32
kettenis_sure, but how do you tell which registers are affected?
#asahi · 2021-04-06 13:31
kettenis_right
#asahi · 2021-04-06 13:29
kettenis_these are pci config space tweaks that are (presumably) model-dependent
#asahi · 2021-04-06 13:28
kettenis_marcan: I don't think we can
#asahi · 2021-04-05 19:18
kettenis_documented the PCIe config space tunables at https://github.com/AsahiLinux/docs/wiki/HW:APCIe#tunables
#asahi · 2021-04-05 16:53
kettenis_smells like they're workarounds for silicon bugs that they hope to fix in a future respin
#asahi · 2021-04-05 16:53
kettenis_I'll take a closer look later, but it seems they're knocking out some bits related to link power management
#asahi · 2021-04-05 16:25
kettenis_good, as far as I can determine all the other PCIe tunables stick even if I disable the clocks
#asahi · 2021-04-05 16:23
kettenis_svenpeter: can you actually set the frequency of those clocks?
#asahi · 2021-04-05 15:29
kettenis_some of the modified registers are in standard pcie extended capabilities
#asahi · 2021-04-05 15:11
kettenis_still need to figure out what happens to the "apcie" ones if I gate/ungate the clocks
#asahi · 2021-04-05 15:10
kettenis_the ones that start with "pcie" are the ones that tweak config space and get undone by a PCI Express reset
#asahi · 2021-04-05 15:09
kettenis_so the tunables that start with "apcie" in the ADT can be applied in a fairly straightforward manner
#asahi · 2021-04-05 15:07
kettenis_right
#asahi · 2021-04-05 15:04
kettenis_these are basically PCI config space changes on the bridge devices corresponding to the three ports
#asahi · 2021-04-05 15:04
kettenis_there are some per-port "tunables" that don't survive a PCI Express reset
#asahi · 2021-04-05 14:51
kettenis_marcan: yes, I'm more or less writing the code for m1n1 that is needed to make the pcie "tunables" stick
#asahi · 2021-04-05 13:05
kettenis_(but no code got copied in the process)
#asahi · 2021-04-05 13:05
kettenis_so the knowledge about which bits to poke and check comes from the corellium codebase as well
#asahi · 2021-04-05 13:02
kettenis_in order to apply the PCIe PHY I need to enable some clocks and take it out of reset

plus ›