* [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation
@ 2022-08-24 4:35 Jeff Brasen
2022-08-24 21:12 ` PierreGondois
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jeff Brasen @ 2022-08-24 4:35 UTC (permalink / raw)
To: devel; +Cc: sami.mujawar, pierre.gondois, Alexei.Fedorov, nd, Jeff Brasen
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>
---
DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h | 8 +++++---
.../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 5 ++++-
.../Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c | 8 +++++---
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
index 85e283a994..4171dabc33 100644
--- a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
+++ b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
@@ -54,9 +54,10 @@ AddOscMethod (
used. It should be possible to enumerate them, but this is additional
information.
- @param [in] PciInfo Pci device information.
- @param [in] MappingTable The mapping table structure.
- @param [in, out] PciNode Pci node to amend.
+ @param [in] PciInfo Pci device information.
+ @param [in] MappingTable The mapping table structure.
+ @param [in] Uid Unique Id of the Pci device.
+ @param [in, out] PciNode Pci node to amend.
@retval EFI_SUCCESS Success.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -67,6 +68,7 @@ EFIAPI
GeneratePciSlots (
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
IN CONST MAPPING_TABLE *MappingTable,
+ IN UINT32 Uid,
IN OUT AML_OBJECT_NODE_HANDLE PciNode
);
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
index ceffe2838c..24e074ea90 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
@@ -295,6 +295,7 @@ GeneratePciDeviceInfo (
@param [in] CfgMgrProtocol Pointer to the Configuration Manager
Protocol interface.
@param [in] PciInfo Pci device information.
+ @param [in] Uid Unique Id of the Pci device.
@param [in, out] PciNode Pci node to amend.
@retval EFI_SUCCESS The function completed successfully.
@@ -308,6 +309,7 @@ GeneratePrt (
IN ACPI_PCI_GENERATOR *Generator,
IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
+ IN UINT32 Uid,
IN OUT AML_OBJECT_NODE_HANDLE PciNode
)
{
@@ -416,7 +418,7 @@ GeneratePrt (
PrtNode = NULL;
// 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)) {
ASSERT (0);
goto exit_handler;
@@ -687,6 +689,7 @@ GeneratePciDevice (
Generator,
CfgMgrProtocol,
PciInfo,
+ Uid,
PciNode
);
if (EFI_ERROR (Status)) {
diff --git a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
index e5ab3a3ca8..b35fb6a7dd 100644
--- a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
+++ b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
@@ -41,9 +41,10 @@
used. It should be possible to enumerate them, but this is additional
information.
- @param [in] PciInfo Pci device information.
- @param [in] MappingTable The mapping table structure.
- @param [in, out] PciNode Pci node to amend.
+ @param [in] PciInfo Pci device information.
+ @param [in] MappingTable The mapping table structure.
+ @param [in] Uid Unique Id of the Pci device.
+ @param [in, out] PciNode Pci node to amend.
@retval EFI_SUCCESS Success.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -54,6 +55,7 @@ EFIAPI
GeneratePciSlots (
IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
IN CONST MAPPING_TABLE *MappingTable,
+ IN UINT32 Uid,
IN OUT AML_OBJECT_NODE_HANDLE PciNode
)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation
2022-08-24 4:35 [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation Jeff Brasen
@ 2022-08-24 21:12 ` PierreGondois
2022-09-01 14:00 ` [edk2-devel] " Sami Mujawar
2022-09-01 14:01 ` Sami Mujawar
2 siblings, 0 replies; 4+ messages in thread
From: PierreGondois @ 2022-08-24 21:12 UTC (permalink / raw)
To: Jeff Brasen, devel; +Cc: sami.mujawar, Alexei.Fedorov, nd
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
On 8/24/22 06:35, Jeff Brasen wrote:
> 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>
> ---
> DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h | 8 +++++---
> .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 5 ++++-
> .../Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c | 8 +++++---
> 3 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
> index 85e283a994..4171dabc33 100644
> --- a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
> +++ b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
> @@ -54,9 +54,10 @@ AddOscMethod (
> used. It should be possible to enumerate them, but this is additional
> information.
>
> - @param [in] PciInfo Pci device information.
> - @param [in] MappingTable The mapping table structure.
> - @param [in, out] PciNode Pci node to amend.
> + @param [in] PciInfo Pci device information.
> + @param [in] MappingTable The mapping table structure.
> + @param [in] Uid Unique Id of the Pci device.
> + @param [in, out] PciNode Pci node to amend.
>
> @retval EFI_SUCCESS Success.
> @retval EFI_INVALID_PARAMETER Invalid parameter.
> @@ -67,6 +68,7 @@ EFIAPI
> GeneratePciSlots (
> IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
> IN CONST MAPPING_TABLE *MappingTable,
> + IN UINT32 Uid,
> IN OUT AML_OBJECT_NODE_HANDLE PciNode
> );
>
> diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
> index ceffe2838c..24e074ea90 100644
> --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
> +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
> @@ -295,6 +295,7 @@ GeneratePciDeviceInfo (
> @param [in] CfgMgrProtocol Pointer to the Configuration Manager
> Protocol interface.
> @param [in] PciInfo Pci device information.
> + @param [in] Uid Unique Id of the Pci device.
> @param [in, out] PciNode Pci node to amend.
>
> @retval EFI_SUCCESS The function completed successfully.
> @@ -308,6 +309,7 @@ GeneratePrt (
> IN ACPI_PCI_GENERATOR *Generator,
> IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
> IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
> + IN UINT32 Uid,
> IN OUT AML_OBJECT_NODE_HANDLE PciNode
> )
> {
> @@ -416,7 +418,7 @@ GeneratePrt (
> PrtNode = NULL;
>
> // 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)) {
> ASSERT (0);
> goto exit_handler;
> @@ -687,6 +689,7 @@ GeneratePciDevice (
> Generator,
> CfgMgrProtocol,
> PciInfo,
> + Uid,
> PciNode
> );
> if (EFI_ERROR (Status)) {
> diff --git a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
> index e5ab3a3ca8..b35fb6a7dd 100644
> --- a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
> +++ b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
> @@ -41,9 +41,10 @@
> used. It should be possible to enumerate them, but this is additional
> information.
>
> - @param [in] PciInfo Pci device information.
> - @param [in] MappingTable The mapping table structure.
> - @param [in, out] PciNode Pci node to amend.
> + @param [in] PciInfo Pci device information.
> + @param [in] MappingTable The mapping table structure.
> + @param [in] Uid Unique Id of the Pci device.
> + @param [in, out] PciNode Pci node to amend.
>
> @retval EFI_SUCCESS Success.
> @retval EFI_INVALID_PARAMETER Invalid parameter.
> @@ -54,6 +55,7 @@ EFIAPI
> GeneratePciSlots (
> IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
> IN CONST MAPPING_TABLE *MappingTable,
> + IN UINT32 Uid,
> IN OUT AML_OBJECT_NODE_HANDLE PciNode
> )
> {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation
2022-08-24 4:35 [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation Jeff Brasen
2022-08-24 21:12 ` PierreGondois
@ 2022-09-01 14:00 ` Sami Mujawar
2022-09-01 14:01 ` Sami Mujawar
2 siblings, 0 replies; 4+ messages in thread
From: Sami Mujawar @ 2022-09-01 14:00 UTC (permalink / raw)
To: Jeff Brasen, devel
[-- Attachment #1: Type: text/plain, Size: 119 bytes --]
Hi Jeff,
Thank you for this patch.
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Regards,
Sami Mujawar
[-- Attachment #2: Type: text/html, Size: 157 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation
2022-08-24 4:35 [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation Jeff Brasen
2022-08-24 21:12 ` PierreGondois
2022-09-01 14:00 ` [edk2-devel] " Sami Mujawar
@ 2022-09-01 14:01 ` Sami Mujawar
2 siblings, 0 replies; 4+ messages in thread
From: Sami Mujawar @ 2022-09-01 14:01 UTC (permalink / raw)
To: Jeff Brasen, devel; +Cc: pierre.gondois, Alexei.Fedorov, nd
Merged as b9bb27e1ff40..0a4079ad86f5
Thanks.
Regards,
Sami Mujawar
On 24/08/2022 05:35 am, Jeff Brasen wrote:
> 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>
>
> ---
>
> DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h | 8 +++++---
>
> .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 5 ++++-
>
> .../Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c | 8 +++++---
>
> 3 files changed, 14 insertions(+), 7 deletions(-)
>
>
>
> diff --git a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
>
> index 85e283a994..4171dabc33 100644
>
> --- a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
>
> +++ b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
>
> @@ -54,9 +54,10 @@ AddOscMethod (
>
> used. It should be possible to enumerate them, but this is additional
>
> information.
>
>
>
> - @param [in] PciInfo Pci device information.
>
> - @param [in] MappingTable The mapping table structure.
>
> - @param [in, out] PciNode Pci node to amend.
>
> + @param [in] PciInfo Pci device information.
>
> + @param [in] MappingTable The mapping table structure.
>
> + @param [in] Uid Unique Id of the Pci device.
>
> + @param [in, out] PciNode Pci node to amend.
>
>
>
> @retval EFI_SUCCESS Success.
>
> @retval EFI_INVALID_PARAMETER Invalid parameter.
>
> @@ -67,6 +68,7 @@ EFIAPI
>
> GeneratePciSlots (
>
> IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
>
> IN CONST MAPPING_TABLE *MappingTable,
>
> + IN UINT32 Uid,
>
> IN OUT AML_OBJECT_NODE_HANDLE PciNode
>
> );
>
>
>
> diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
>
> index ceffe2838c..24e074ea90 100644
>
> --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
>
> +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
>
> @@ -295,6 +295,7 @@ GeneratePciDeviceInfo (
>
> @param [in] CfgMgrProtocol Pointer to the Configuration Manager
>
> Protocol interface.
>
> @param [in] PciInfo Pci device information.
>
> + @param [in] Uid Unique Id of the Pci device.
>
> @param [in, out] PciNode Pci node to amend.
>
>
>
> @retval EFI_SUCCESS The function completed successfully.
>
> @@ -308,6 +309,7 @@ GeneratePrt (
>
> IN ACPI_PCI_GENERATOR *Generator,
>
> IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
>
> IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
>
> + IN UINT32 Uid,
>
> IN OUT AML_OBJECT_NODE_HANDLE PciNode
>
> )
>
> {
>
> @@ -416,7 +418,7 @@ GeneratePrt (
>
> PrtNode = NULL;
>
>
>
> // 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)) {
>
> ASSERT (0);
>
> goto exit_handler;
>
> @@ -687,6 +689,7 @@ GeneratePciDevice (
>
> Generator,
>
> CfgMgrProtocol,
>
> PciInfo,
>
> + Uid,
>
> PciNode
>
> );
>
> if (EFI_ERROR (Status)) {
>
> diff --git a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
>
> index e5ab3a3ca8..b35fb6a7dd 100644
>
> --- a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
>
> +++ b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
>
> @@ -41,9 +41,10 @@
>
> used. It should be possible to enumerate them, but this is additional
>
> information.
>
>
>
> - @param [in] PciInfo Pci device information.
>
> - @param [in] MappingTable The mapping table structure.
>
> - @param [in, out] PciNode Pci node to amend.
>
> + @param [in] PciInfo Pci device information.
>
> + @param [in] MappingTable The mapping table structure.
>
> + @param [in] Uid Unique Id of the Pci device.
>
> + @param [in, out] PciNode Pci node to amend.
>
>
>
> @retval EFI_SUCCESS Success.
>
> @retval EFI_INVALID_PARAMETER Invalid parameter.
>
> @@ -54,6 +55,7 @@ EFIAPI
>
> GeneratePciSlots (
>
> IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,
>
> IN CONST MAPPING_TABLE *MappingTable,
>
> + IN UINT32 Uid,
>
> IN OUT AML_OBJECT_NODE_HANDLE PciNode
>
> )
>
> {
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-01 14:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-24 4:35 [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation Jeff Brasen
2022-08-24 21:12 ` PierreGondois
2022-09-01 14:00 ` [edk2-devel] " Sami Mujawar
2022-09-01 14:01 ` Sami Mujawar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox