Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42295 )
Change subject: soc/intel/tigerlake: Update TCSS for SW CM support ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42295/2/src/soc/intel/tigerlake/acp... File src/soc/intel/tigerlake/acpi/tcss_pcierp.asl:
https://review.coreboot.org/c/coreboot/+/42295/2/src/soc/intel/tigerlake/acp... PS2, Line 224: Return ( Package() { : /* acpi_pci_bridge_d3 at ../drivers/pci/pci-acpi.c */ : ToUUID("6211E2C0-58A3-4AF3-90E1-927A4E0C55A4"), : Package () : { : Package (2) { "HotPlugSupportInD3", 1 }, : }, : : /* pci_acpi_set_untrusted at ../drivers/pci/pci-acpi.c */ : ToUUID("EFCC06CC-73AC-4BC3-BFF0-76143807C389"), : Package () { : Package (2) { "ExternalFacingPort", 1 }, /* TBT/CIO port */ : /* : * UID of the TBT RP on platform, range is: 0, 1 ..., : * (NumOfTBTRP - 1). : */ : Package (2) { "UID", TUID }, : }, : ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), : Package () { : Package (2) { "usb4-host-interface", _SB.PCI0.TDM0 }, : Package (2) { "usb4-port-number", TUID }, : } : }) : } ElseIf (TUID == 2) { : Return ( Package () { : /* acpi_pci_bridge_d3 at ../drivers/pci/pci-acpi.c */ : ToUUID("6211E2C0-58A3-4AF3-90E1-927A4E0C55A4"), : Package () : { : Package (2) { "HotPlugSupportInD3", 1 }, : }, : : /* pci_acpi_set_untrusted at ../drivers/pci/pci-acpi.c */ : ToUUID("EFCC06CC-73AC-4BC3-BFF0-76143807C389"), : Package () { : Package (2) { "ExternalFacingPort", 1 }, /* TBT/CIO port */ : /* : * UID of the TBT RP on platform, range is: 0, 1 ..., : * (NumOfTBTRP - 1). : */ : Package (2) { "UID", TUID }, : }, : ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), : Package () { : Package (2) { "usb4-host-interface", _SB.PCI0.TDM1 }, : Package (2) { "usb4-port-number", 0 }, : } : }) : } Else { /* TUID == 3 */ : Return ( Package () { : /* acpi_pci_bridge_d3 at ../drivers/pci/pci-acpi.c */ : ToUUID("6211E2C0-58A3-4AF3-90E1-927A4E0C55A4"), : Package () : { : Package (2) { "HotPlugSupportInD3", 1 }, : }, : : /* pci_acpi_set_untrusted at ../drivers/pci/pci-acpi.c */ : ToUUID("EFCC06CC-73AC-4BC3-BFF0-76143807C389"), : Package () { : Package (2) { "ExternalFacingPort", 1 }, /* TBT/CIO port */ : /* : * UID of the TBT RP on platform, range is: 0, 1 ..., : * (NumOfTBTRP - 1). : */ : Package (2) { "UID", TUID }, : }, : ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), : Package () { : Package (2) { "usb4-host-interface", _SB.PCI0.TDM1 }, : Package (2) { "usb4-port-number", 1 }, : }
It seems arguments won't be got into the package() in method.
For integers it should work but for others you'd probably need to pass a reference to the object with RefOf() and then DeRefOf() from inside the method.
It can get messy quick because IIRC not every Package element works the same way. But for specific cases like this where the argument types can be known it should be possible.
BUT, I have a patch series that moves this entire _DSD to generated code so we can specify these in the devicetree. (Not convenient to merge _DSD across DSDT and SSDT) So for now I'm not too concerned about the duplication.