Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40722 )
Change subject: [WIP] Add Multiple Segment support ......................................................................
Patch Set 3:
just my $0.02 but given the complexity of AML code we have, wouldn't it make sense to generate with acpigen?
We should definitely look into that. But I wouldn't start with a dynamic version before we got the static one right.
I'm not sure if we have to report these resource again. Maybe we don't need the `extrahostbridge.asl`?
i was referring to Intel RC code for customer where i could find the usage of "extrahostbridge.asl" for additional segment,
And the authors of that RC code do they have more experience with multiple PCI segment groups than we have? I don't think anybody gets such things right on the first try.
I have looked further into this and disovered the ACPI "Module" device. It groups multiple devices together and can specify shared resources for them. Coincidentally, after learning about this, it turned out that the ACPI spec uses it in the example code for _SEG ;)
Please have a look at ACPI spec 6.3, `6.5.6.1 Example`. I think this is how we should do it. Basically:
Device (ND0) { Name(_HID, "ACPI0004") /* Module Device */
Method(_CRS, ...)
Device (PCI0) { ... }
Device (PCI1) { ... } }