00:03:20 argh, more internal server error failures from code.illumos.org .. 00:03:45 it's another round of AI hammering I think 00:08:00 automated irritation. 00:21:39 i guess i can also put up what I have for the pci segment bits... but I do worry there's maybe something I'm missing... 00:22:58 specifically surrounding pci_boot.c 00:33:23 I think a handful the oxide people know at least a decent amount about that, and that v. the hotplug code that does the same thing. 00:33:54 I know a small amount about porting it, but not enough to rely on 00:34:26 and full disclosure, I tried for an extended period of time to replace it instead, and failed 01:15:35 hrm yeah.. i suspect we can't talk to devices in the second segment... even if the device tree knows about them... 01:16:44 https://wiki.osdev.org/PCI_Express shows tthe MCFG table, and we appear to only look at the first structure in it 01:18:07 (and store the values in 'ecfg' in the root nexus) 01:18:56 The bigger problem right now is the pci_regspec_t. 01:19:14 since it doesn't contain the segment# ? 01:19:20 How we handle the mcfg table is definitely also a problem, but that's going to end up being thornier. 01:19:39 Yes, and because the iommu isn't usefully in the tree in a way that you can usually id things beneath it without it. 01:20:41 But I've been punting on it for a while since our AMD platforms aren't multi-segment. 01:21:06 apparently these new(er) HPE servers are 01:21:32 (I have access through Friday, so if there is anything useful to gather, I can btw) 01:21:34 How are you intended to discover the segment? Is it an ACPI method on the root port? 01:21:42 Or something else. 01:24:14 all I have right now (which I strongly suspected was incomplete at best) was evaluating the ACPI _SEG method on root complexes (in acpidev_pci_update_status()) and setting a property with the value if it returned one and then using that in immu_devi_set() to match a device to the immu_t for it (basically go up the tree for the dev's dip to find the segment on the root complex, or 0 if none) 01:25:00 since I don't have physical access to these systems, I'm also not sure what exactly all is in them... 01:25:49 it does appear though that the 2nd CPU socket goes with (for lack of a better term) the 2nd PCI riser and I suspect is where the 2nd PCI segment is 01:25:55 OK. We may be able to do something like that and inherit it. 01:26:30 But I think that'll make a mess of a bunch of other stuff so we'll need to think through that. I think trying to avoid that and having overlapping b/d/f values will lead to more chaos. 01:27:18 at least the DRAT data suggests that the bus #s in each segment are duplicated... 01:27:30 I would expect them to be. 01:27:42 Otherwise there's not much point in it! 01:27:54 Segments are a fiction that don't really go on the wire, so it's all internal baseball. 01:29:14 yeah.. from what little i've gathered so far suggests having multiple configuration spaces is maybe the thornier issue, since it looks like we tend to assume there's only one in a lot of places 01:29:41 but I was just trying to do as much as I could while I had access to the machine 01:30:03 (I might be able to get access to it again in the future, not sure) 01:30:10 I don't think that bit is too bad, we just have to figure out how we extend things into the segment and how that works for regmap stuff. 01:30:45 It just can't really be in the pci_regspec_t which means probaly figuring out a new property and propagating it. 01:30:54 One you have that, the actual config space mapping is easy. 01:32:59 if you want to take a look at what I have, I can throw it up in a branch -- I didn't want to put it out for review yet because I figured there were probably more things that need to happen 01:33:18 basically it was enough to make the iommu stuff at least happy enough to boot... 01:33:44 Specifically just handling the ecfg stuff? 01:35:07 i didn't mess with that.. (since I just found some info online -- don't have a copy of the actual specs) 01:35:29 and from that started looking at how we use MCFG and found that... 01:36:46 it's been a journey :) 01:38:12 I'm not really in a place where I think I can provide useful review or next steps, since I'm a bit swamped, but let me know what's helpful. 01:38:17 since i've never really waded into this part of the code base.. so it was 'system hands when it boots' (turns out interrupts aren't getting delivered) 'oh, it's using apic ids > 255, need iommu', turn iommu on, then all sorts of hijinks ensue (multiple iommus tripping bugs, multiple pci segments)