#
…

2021-03-29

00:10zkrx has quit [Ping timeout: 246 seconds]
00:14Bublik_ has quit [Quit: Bublik_]
00:14Bublik has joined #asahi
00:26zkrx has joined #asahi
00:45furkan has quit [Ping timeout: 240 seconds]
01:41furkan has joined #asahi
02:01inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
02:10PhilippvK has joined #asahi
02:12inglor has joined #asahi
02:14phiologe has quit [Ping timeout: 268 seconds]
03:16marvin24 has quit [Ping timeout: 245 seconds]
03:17marvin24 has joined #asahi
03:36odmir has quit [Remote host closed the connection]
04:30jeffmiw has joined #asahi
04:34jeffmiw has quit [Ping timeout: 260 seconds]
05:02krispy has joined #asahi
05:02krispy has quit [Client Quit]
05:27korzq has quit [Quit: Ping timeout (120 seconds)]
05:27korzq has joined #asahi
05:27Calchan has quit [Quit: ZNC - http://znc.in]
05:33korzq has quit [Ping timeout: 240 seconds]
05:34VinDuv has joined #asahi
05:40Calchan has joined #asahi
05:40korzq has joined #asahi
06:16macc24 has joined #asahi
06:23VinDuv has quit [Quit: Leaving.]
07:12raster has joined #asahi
07:15ephe_meral has joined #asahi
07:27Fanfwe has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
07:27Fanfwe has joined #asahi
07:36PeterEaston has quit [Ping timeout: 240 seconds]
07:38PeterEaston has joined #asahi
07:55Guest89357 is now known as jordan_
08:04tsujp has joined #asahi
08:05tsujpIs there word on how package management etc with Asahi is going to work?
08:05tsujpCustom distro or eventually "based" on something?
08:14mazmarcan: for these two VHE-specific issues, let's keep the discussion separate for now. It is likely that they would directly go into the arm64 tree anyway.
08:15mazmarcan: feel free to keep one of the early patches around for context.
08:26marcanmaz: since I have a weirdo merge base branch to make this all work anyway, I'll keep them there and won't submit them
08:26marcanthey are not a dependency for arnd's merge anyway
08:27marcanthe only hard dependency is the FIQ series, and the samsung stuff only if people care about transiently non-validating devicetrees depending on merge order
08:27marcantsujp: the "official" distro will be Arch linux ARM + add-on repo and installer
08:28marcanbut the goal of the project is to have the installer set up a useful boot environment for any distro to work, and to upstream things so other distros will work too
08:28marcanwe're just basing our "bleeding edge/early adopter" style distro on ALARM
08:44tsujpCheers marcan
08:46svenhah, I was just wondering why the tps6598x code failed with "failed to register partner" and tracked it down to some struct being too long. was about to fix it when I found https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3cac9104bea41099cf622091f0c0538bcb19050d :-)
09:00Guest44411 has quit [Quit: Idle for 30+ days]
09:00Adam[m]21 has quit [Quit: Idle for 30+ days]
09:47kettenis1maz: any success yet with getting PCIe to work in Linux?
10:11mazkettenis1: got probing working, need to test MSI (because the xhci driver really want interrupts... seems overrated to me... ;-)
10:11mazkettenis1: and of course, I need to integrate the DART stuff to do anything useful.
10:24furkan has quit [Ping timeout: 240 seconds]
10:58kettenis1maz: I'd be interested to hear howyou think the MSI support should be reflected in the device tree
11:03richbridger has quit [Remote host closed the connection]
11:07mazkettenis1: so far, I'm running with this (directly derived from your u-boot version): https://paste.debian.net/1191492/
11:08mazas you can see, this is as minimal as it gets (base interrupt, number of interrupts).
11:08winocmWait, there’s u-boot?
11:08mazbut everything else can be derived from the context.
11:09mazwinocm: yet, kettenis1 has done an awesome job at an initial port, with working PCI (which allows me to netboot the sucker).
11:09Necrosporus has quit [Ping timeout: 240 seconds]
11:10mazs/yet/yes/
11:17kettenis1we need to have (somewhat) stable devicetree bindings before I can upstream that though
11:18kettenis1what I'm currently using is mostly a straight copy from corellium
11:19kettenis1with some adjustments to follow the binding in marcan's linux upstream patch series
11:30furkan has joined #asahi
11:45krispy has joined #asahi
11:45krispy has quit [Client Quit]
11:50tsujp has quit [Read error: Connection reset by peer]
11:50tsujp has joined #asahi
12:06arndmaz, kettenis1: based on my understanding of how MSI works on this chip, I think modeling the AIC as the MSI target is both the easiest and the closest to what the hardware actually does
12:13choozy has joined #asahi
12:15jeffmiw has joined #asahi
12:17mazarnd: if the MSI doorbell was translated, I'd agree with you. but that's not how the HW seems to behave.
12:17mazit really looks like the doorbell is upstream of the IOMMU.
12:18bisko has joined #asahi
12:19jeffmiw has quit [Ping timeout: 240 seconds]
12:20arndmaz: it would be really nice to just use the generic pci controller though. What code does the mapping of the msi doorbell? If that's in the msi-controller driver, it shouldn't really matter whether that goes through the iommu or is passed through
12:22arndIn ADT, the "msi-parent-controller" property does point at the AIC, but of course that doesn't have to mean anything ;-)
12:24arndmaz: the part I don't understand so far is whether the assignment of specific MSI ranges in ADT is enforced by the hardware, or if that's just done to split up the available numbers evenly
12:25arndi.e. if every pci host bridge has the same 32 MSIs at doorbell address 0x00f0ffff00000000, but they are routed to different AIC interrupts, then modeling them as separate irqchips as you say is probably better
12:25Necrosporus has joined #asahi
12:26arndbut if any device can trigger any of the available global MSIs, it makes sense to conceptually have them handled by the aic driver
12:37_rjeffman has quit [Remote host closed the connection]
12:38mazarnd: it looks like the 32 MSIs are global.
12:38mazarnd: as for using the generic PCI MSI controller, that's almost what I have (just a shim to allocate the various IRQ bits).
12:39mazbut the non-translated doorbell is what gives me a strong indication that this all lives in the RC, and not in the AIC.
12:40rjeffman has joined #asahi
12:44arndmaz: are you sure it's non-translated rather than a hardwired passthrough in the dart?
12:45arndit's always the upper page, after then end of the vm-base/vm-size window in the dart
12:45arndhmm, the interrupt numbers disagree between corellium and adt
12:47arndin corellium's dt, it's always 32 MSIs starting at AIC interrupt 704, while in ADT, they are at AIC interrupt 704-735, 738-769 and 818-849, respectively
12:51arndnevermind, I misread the corellium patches, it's always three distinct ranges
12:55mazcorellium splits the MSI space for each controller in 3, though I'm not sure that's actually enforced by the HW.
12:56arndin ADT, this is only done for one of the PCI controllers (apice), where each bridge gets eight MSIs, while the other two have a single bridge with 32 MSIs
12:56arndI would also guess this is not enforced by the hardware
12:57mazthe first one is odd, because they leave 8 MSIs on the table...
12:58kettenis1there are 32 MSIs for each PCIe bridge
12:58kettenis1Each PCIe bridge has multiple (3?) ports
12:59kettenis1there are registers in the PCIe bridge block that can be used to distribute the MSIs over the ports
13:00kettenis1Apple (and Corellium) give each port 8 MSIs and leave 8 MSIs on the table
13:00kettenis1For OpenBSD my aplpcie(4) driver simply shares the 32 MSIs among all 3 ports
13:01kettenis1so yes, the splitting is enforced by the hardware, but the way the splitting is done is programmable
13:01mazthat's what I do too. I don't see a need for extra slicing.
13:02arndkettenis1: the first PCIe port is hardwired to three on-board devices, right? Can any of those actually use more than eight MSIs?
13:02kettenis1There are three PCIe bridges
13:02kettenis1One is used for the onboard stuff and two are used for Thunderbolt
13:03kettenis1The one that is used for onboard stuff has 3 ports
13:03arndsorry, I meant the first host bridge has three ports that are each wired to one on-board device
13:03kettenis1WiFi+BT is on one of the ports, Ethernet is on its own port and XHCI is on itw own port as well
13:04arndbut what is the maximum number of MSIs that any of these three would want to use?
13:05kettenis1I beleive all three devices support MSI-X
13:06kettenis1I don't know if Linux makes use of multiple vectors for these devices though
13:06arndthis is xhci: xhci->msix_count = min(num_online_cpus() + 1, HCS_MAX_INTRS(xhci->hcs_params1))
13:06arndso we'd prefer to have nine MSIs if supported by that xhci implementation
13:08kettenis1oh, wifi doesn't support msi-x
13:08arndwhat are the device/vendor IDs on the wifi and ethernet chips?
13:08Namidairo has quit [Ping timeout: 260 seconds]
13:08klaus has joined #asahi
13:09kettenis10x0000: Vendor ID: 14e4, Product ID: 4425
13:09kettenis1That is WiFi, which is Broadcom BCM4378
13:09kettenis10x0000: Vendor ID: 1b73, Product ID: 1100
13:10kettenis1That is XHCI, which is Fresco Logic FL1100
13:10kettenis10x0000: Vendor ID: 14e4, Product ID: 1682
13:10kettenis1That is ethernet, which is Broadcom BCM57762
13:11kettenis1I thing the Linux name for the Ethernet driver is tigon3
13:11arndthanks
13:11kettenis1think even
13:12kettenis1anyway, I think the OS needs to program the registers that control how you split up the MSIs
13:12kettenis1so I think the generic driver won't be sufficient
13:13mazkettenis1: how are things configured in u-boot at the moment?
13:14kettenis1U-Boot doesn't touch the MSI-related registers
13:14arndtg3 apparently supports up to four queues and one management interrupt in MSI-X mode, so at most five interrupts according to the current driver source
13:15mazkettenis1: are these registerse "documented" anywhere?
13:15arndon my x86 machine, I see that none of the XHCI actually enables MSI-X, it's just one interrupt per instance
13:15arndbut the driver can clearly do it
13:16mazarnd: I think XHCI prefers MSI over MSI-X, for bizare reasons. I remember hacking it to test things on Chello.
13:16kettenis10x00b0: Capability 0x11: Extended Message Signalled Interrupts (MSI-X)
13:16kettenis1 Enabled: no; table size 8 (BAR 2:0)
13:17arndah: /* Some Fresco Logic host controllers advertise MSI, but fail to generate interrupts. Don't even try to enable MSI. */
13:17kettenis1so it looks as if XHCI only has 8 MSI-X vectors
13:17kettenis1This one has working MSI
13:17mazkettenis1: ah, that's directly in the port BARs?
13:17kettenis1And isn't quirked in the linux driver
13:18arndright, the quirk is for 0x1b73:0x1000, not for 0x1b73:0x1100
13:18kettenis1maz: it means the MSI-X table is at offset 0 in the 3rd BAR
13:19kettenis1(this is output from the openbsd pcidump tool)
13:19Namidairo has joined #asahi
13:19mazkettenis1: but is that how you configure that MSI split?
13:22kettenis1maz: this is what the XHCI controller hardware reports
13:46kettenis1That is where I initialize the MSI config registers of the bridge
13:50tsujp has quit [Quit: Iridium IRC Client]
14:51odmir has joined #asahi
14:55izzyisles[m] has joined #asahi
14:57choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
15:25odmir has quit [Remote host closed the connection]
15:28marcanarnd: it can't be passed through, because they use the same address for all controllers, yet they allocate different MSI ranges
15:29marcanso the hardware is most likely an address compare in the PCIe root port that then sends discrete edge-triggered IRQ signals out to AIC
15:33sven[ 0.147318] tps6598x 0-0038: probe start
15:33sven[ 0.892476] tps6598x 0-0038: probe done
15:33sventhat's... slow
15:34svenbut at least it works, heh
15:36kettenis1marcan: the address can be configured on a per-port basis
15:36marcankettenis1: but apple always sets them to the same address
15:36marcanand yet the MSIs do not overlap
15:37marcanwhich implies the decoding is done at the ports, not by AIC
15:37kettenis1but the register for that is in the per-port register block so the comparison logic almost certainly lives there too
15:37tsujp has joined #asahi
15:37marcanso clearly AIC isn't doing the MSI handling here, it just takes a pile of discrete IRQ lines (or some other out of band signaling mechanism) from the ports
15:39marcanIIRC from last time I had to model this kind of nonsense (MSIs on PS4...), the sane way to do this is with another irqchip driver
15:39marcanit would be something very simple that binds to the port registers too, and chains IRQs to AIC
15:44winocm has quit [Ping timeout: 245 seconds]
15:44winocm has joined #asahi
15:47ephe_meral has quit [Ping timeout: 260 seconds]
15:47ephe_meral has joined #asahi
15:56odmir has joined #asahi
15:57maor26 has joined #asahi
16:17choozy has joined #asahi
16:24odmir has quit [Ping timeout: 240 seconds]
16:25bdju has quit [Read error: Connection reset by peer]
16:27bdju has joined #asahi
16:29svenugh.. this usb yak is getting bigger and bigger. looks like the tps6598x gets its interrupt from some gpio block
16:30bdju has quit [Read error: Connection reset by peer]
16:32bdju has joined #asahi
16:37PeterEaston is now known as TheJollyRoger
16:51odmir has joined #asahi
17:00odmir has quit [Ping timeout: 240 seconds]
17:04odmir has joined #asahi
17:14VinDuv has joined #asahi
17:23ephe_meral has quit [Ping timeout: 268 seconds]
17:34tsujp has quit [Quit: Iridium IRC Client]
18:09odmir has quit [Remote host closed the connection]
18:10odmir has joined #asahi
18:15odmir has quit [Ping timeout: 268 seconds]
18:19milek7 has quit [Quit: No Ping reply in 180 seconds.]
18:21milek7 has joined #asahi
18:41odmir has joined #asahi
18:55wicast has joined #asahi
18:57wicast has quit [Read error: Connection reset by peer]
18:58wicast has joined #asahi
18:58wicast has quit [Client Quit]
19:03odmir has quit [Ping timeout: 240 seconds]
19:16milek7 has quit [Quit: No Ping reply in 180 seconds.]
19:18milek7 has joined #asahi
19:23milek7 has quit [Client Quit]
19:24milek7 has joined #asahi
19:31odmir has joined #asahi
19:45_rjeffman has joined #asahi
19:46rjeffman has quit [Remote host closed the connection]
19:55odmir has quit [Ping timeout: 260 seconds]
20:22odmir has joined #asahi
20:47odmir has quit [Ping timeout: 240 seconds]
20:57richbridger has joined #asahi
20:59VinDuv has quit [Quit: Leaving.]
21:00odmir has joined #asahi
21:00DarkShadow44 has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
21:01DarkShadow44 has joined #asahi
21:01niv has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
21:02DarkShadow44 has quit [Client Quit]
21:03niv has joined #asahi
21:04DarkShadow44 has joined #asahi
21:04niv has quit [Client Quit]
21:04odmir has quit [Ping timeout: 260 seconds]
21:05DarkShadow44 has quit [Client Quit]
21:10_rjeffman has quit [Remote host closed the connection]
21:10niv has joined #asahi
21:12niv has quit [Client Quit]
21:12niv has joined #asahi
21:15n1v has joined #asahi
21:16n1v has quit [Client Quit]
21:16n1v has joined #asahi
21:16odmir has joined #asahi
21:17niv has quit [Ping timeout: 250 seconds]
21:18n1v has quit [Client Quit]
21:19niv has joined #asahi
21:19niv has quit [Client Quit]
21:21niv has joined #asahi
21:23niv has quit [Client Quit]
21:25niv has joined #asahi
21:25niv has quit [Client Quit]
21:26niv has joined #asahi
21:26niv has quit [Client Quit]
21:28karlyeurl has joined #asahi
21:29niv has joined #asahi
21:30DarkShadow44 has joined #asahi
21:31niv has quit [Client Quit]
21:31DarkShadow44 has quit [Client Quit]
21:32karlyeurl has quit [Read error: Connection reset by peer]
21:34niv has joined #asahi
21:34DarkShadow44 has joined #asahi
21:35DarkShadow44 has quit [Client Quit]
21:35n1v has joined #asahi
21:36DarkShadow44 has joined #asahi
21:36niv has quit [Remote host closed the connection]
21:36n1v has quit [Client Quit]
21:37DarkShadow44 has quit [Client Quit]
21:37DarkShadow44 has joined #asahi
21:38niv has joined #asahi
21:39odmir has quit [Ping timeout: 240 seconds]
21:39DarkShadow44 has quit [Read error: Connection reset by peer]
21:40niv has quit [Client Quit]
21:40niv has joined #asahi
21:40DarkShadow44 has joined #asahi
21:42jeffmiw has joined #asahi
21:46jeffmiw has quit [Ping timeout: 240 seconds]
21:47karlyeurl has joined #asahi
22:00kettenis1 has quit [Ping timeout: 246 seconds]
22:05kettenis1 has joined #asahi
22:54maor26 has quit [Ping timeout: 260 seconds]
22:59choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:16luca020400 has quit [Ping timeout: 258 seconds]
23:23KindOne has joined #asahi
23:33klaus has quit [Quit: Textual IRC Client: www.textualapp.com]
23:40luca020400 has joined #asahi
23:47artemist has quit [Ping timeout: 250 seconds]
23:48neunon has quit [Quit: ZNC 1.8.2 - https://znc.in]
23:51neunon has joined #asahi
23:53PendulumSwinger has joined #asahi
…