Skip to content

Commit 42a40dc

Browse files
committed
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 <[email protected]> Change-Id: I6d74228b7c733891030bb35138a5264233c84d72
1 parent 4d83ee0 commit 42a40dc

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ AddOscMethod (
5454
used. It should be possible to enumerate them, but this is additional
5555
information.
5656
57-
@param [in] PciInfo Pci device information.
58-
@param [in] MappingTable The mapping table structure.
59-
@param [in, out] PciNode Pci node to amend.
57+
@param [in] PciInfo Pci device information.
58+
@param [in] MappingTable The mapping table structure.
59+
@param [in] Uid Unique Id of the Pci device.
60+
@param [in, out] PciNode Pci node to amend.
6061
6162
@retval EFI_SUCCESS Success.
6263
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -67,6 +68,7 @@ EFIAPI
6768
GeneratePciSlots (
6869
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
6970
IN CONST MAPPING_TABLE *MappingTable,
71+
IN UINT32 Uid,
7072
IN OUT AML_OBJECT_NODE_HANDLE PciNode
7173
);
7274

DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ GeneratePciDeviceInfo (
295295
@param [in] CfgMgrProtocol Pointer to the Configuration Manager
296296
Protocol interface.
297297
@param [in] PciInfo Pci device information.
298+
@param [in] Uid Unique Id of the Pci device.
298299
@param [in, out] PciNode Pci node to amend.
299300
300301
@retval EFI_SUCCESS The function completed successfully.
@@ -308,6 +309,7 @@ GeneratePrt (
308309
IN ACPI_PCI_GENERATOR *Generator,
309310
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
310311
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
312+
IN UINT32 Uid,
311313
IN OUT AML_OBJECT_NODE_HANDLE PciNode
312314
)
313315
{
@@ -416,7 +418,7 @@ GeneratePrt (
416418
PrtNode = NULL;
417419

418420
// Generate the Pci slots once all the device have been added.
419-
Status = GeneratePciSlots (PciInfo, &Generator->DeviceTable, PciNode);
421+
Status = GeneratePciSlots (PciInfo, &Generator->DeviceTable, Uid, PciNode);
420422
if (EFI_ERROR (Status)) {
421423
ASSERT (0);
422424
goto exit_handler;
@@ -687,6 +689,7 @@ GeneratePciDevice (
687689
Generator,
688690
CfgMgrProtocol,
689691
PciInfo,
692+
Uid,
690693
PciNode
691694
);
692695
if (EFI_ERROR (Status)) {

DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
used. It should be possible to enumerate them, but this is additional
4242
information.
4343
44-
@param [in] PciInfo Pci device information.
45-
@param [in] MappingTable The mapping table structure.
46-
@param [in, out] PciNode Pci node to amend.
44+
@param [in] PciInfo Pci device information.
45+
@param [in] MappingTable The mapping table structure.
46+
@param [in] Uid Unique Id of the Pci device.
47+
@param [in, out] PciNode Pci node to amend.
4748
4849
@retval EFI_SUCCESS Success.
4950
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -54,6 +55,7 @@ EFIAPI
5455
GeneratePciSlots (
5556
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
5657
IN CONST MAPPING_TABLE *MappingTable,
58+
IN UINT32 Uid,
5759
IN OUT AML_OBJECT_NODE_HANDLE PciNode
5860
)
5961
{

0 commit comments

Comments
 (0)