DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation

Expose the UID value to GeneratePciSlots().
This is needed for some cases for example:
https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-externally-exposed-pcie-root-ports

Name (_DSD, Package () {
  ToUUID("EFCC06CC-73AC-4BC3-BFF0-76143807C389"),
  Package () {
    Package (2) {"ExternalFacingPort", 1},
    Package (2) {"UID", 0},
  }
})

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Jeff Brasen 2022-08-23 22:35:53 -06:00 committed by mergify[bot]
parent b9bb27e1ff
commit 0a4079ad86
3 changed files with 14 additions and 7 deletions

View File

@ -56,6 +56,7 @@ AddOscMethod (
@param [in] PciInfo Pci device information. @param [in] PciInfo Pci device information.
@param [in] MappingTable The mapping table structure. @param [in] MappingTable The mapping table structure.
@param [in] Uid Unique Id of the Pci device.
@param [in, out] PciNode Pci node to amend. @param [in, out] PciNode Pci node to amend.
@retval EFI_SUCCESS Success. @retval EFI_SUCCESS Success.
@ -67,6 +68,7 @@ EFIAPI
GeneratePciSlots ( GeneratePciSlots (
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo, IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
IN CONST MAPPING_TABLE *MappingTable, IN CONST MAPPING_TABLE *MappingTable,
IN UINT32 Uid,
IN OUT AML_OBJECT_NODE_HANDLE PciNode IN OUT AML_OBJECT_NODE_HANDLE PciNode
); );

View File

@ -298,6 +298,7 @@ GeneratePciDeviceInfo (
@param [in] CfgMgrProtocol Pointer to the Configuration Manager @param [in] CfgMgrProtocol Pointer to the Configuration Manager
Protocol interface. Protocol interface.
@param [in] PciInfo Pci device information. @param [in] PciInfo Pci device information.
@param [in] Uid Unique Id of the Pci device.
@param [in, out] PciNode Pci node to amend. @param [in, out] PciNode Pci node to amend.
@retval EFI_SUCCESS The function completed successfully. @retval EFI_SUCCESS The function completed successfully.
@ -311,6 +312,7 @@ GeneratePrt (
IN ACPI_PCI_GENERATOR *Generator, IN ACPI_PCI_GENERATOR *Generator,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo, IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
IN UINT32 Uid,
IN OUT AML_OBJECT_NODE_HANDLE PciNode IN OUT AML_OBJECT_NODE_HANDLE PciNode
) )
{ {
@ -419,7 +421,7 @@ GeneratePrt (
PrtNode = NULL; PrtNode = NULL;
// Generate the Pci slots once all the device have been added. // Generate the Pci slots once all the device have been added.
Status = GeneratePciSlots (PciInfo, &Generator->DeviceTable, PciNode); Status = GeneratePciSlots (PciInfo, &Generator->DeviceTable, Uid, PciNode);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
ASSERT (0); ASSERT (0);
goto exit_handler; goto exit_handler;
@ -814,6 +816,7 @@ GeneratePciDevice (
Generator, Generator,
CfgMgrProtocol, CfgMgrProtocol,
PciInfo, PciInfo,
Uid,
PciNode PciNode
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {

View File

@ -43,6 +43,7 @@
@param [in] PciInfo Pci device information. @param [in] PciInfo Pci device information.
@param [in] MappingTable The mapping table structure. @param [in] MappingTable The mapping table structure.
@param [in] Uid Unique Id of the Pci device.
@param [in, out] PciNode Pci node to amend. @param [in, out] PciNode Pci node to amend.
@retval EFI_SUCCESS Success. @retval EFI_SUCCESS Success.
@ -54,6 +55,7 @@ EFIAPI
GeneratePciSlots ( GeneratePciSlots (
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo, IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
IN CONST MAPPING_TABLE *MappingTable, IN CONST MAPPING_TABLE *MappingTable,
IN UINT32 Uid,
IN OUT AML_OBJECT_NODE_HANDLE PciNode IN OUT AML_OBJECT_NODE_HANDLE PciNode
) )
{ {