From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.40]) by mx.groups.io with SMTP id smtpd.web10.7443.1661315745799872479 for ; Tue, 23 Aug 2022 21:35:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=AGM29tnW; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.236.40, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F9FrJaScMIMzzHoklVu+QpV4OAdnA0NZLSFZtZOHrq/Do+LyaXMAPbez+hcukMs9+Dg8FC2o33F2aiFojX1nJPSwnsQObOV+ePP1OGSQkUg4kDiiCWE1aC1z0ZVnV6aoF4xv65Urvw/lWs5uL9MCMn2SL9boB4tfu9c1A9QLDLn+VwgqwhEW3lpt6Zm1LJCJpQ9qHrLCw5iwcloGHTkFYFgcjrdp4k3L64Q5ZUncEHAhrHWZW77UB7eozU3zdhi/W4SVyx7/15EJYS8A5zNyksacwI1c+f0/BFRaa7ZhzAfFWMVkZtgZVWiH+ioyYnokzqDAux4/6j4ujE0HilpPyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aHCz3nHzc+QUzRy1iRNo7sO7LEzldjSfcrMxZp99q1Y=; b=BJA8J0j9OYu6T2ieerudx+FBRwYSA8fSJSAix1iGGEnUPrP2nr7M76GEelejAqz9jV2Kprsh4IADbhUCqeuKWls9N2Vv8JihIJE88odNgthyuEXXmK5VBMhth0Oas1R7AeXpypB1KHzY244DaHh5UAtizmIjCb6QZnGg4ofPxxeCOp3+RvKTFAgrpxcvTAmZB+GCYrBQee5IGlB/gKCPmTPffWhQZEQJKmxkj12+eNeCRH23Q62TTe2gveV+JqTSMZfUJrksbcyY05thrXlEC+msqvyxT8N5+w9HopxT3w+WI/GuvDMURzwqPn2CuwsBTeu3a8y4qlS7pXyjJCU8Yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aHCz3nHzc+QUzRy1iRNo7sO7LEzldjSfcrMxZp99q1Y=; b=AGM29tnWszdU1XRjxM4SEaVlHlqHWLb5ROZlW4g7vWjytWtfVi5ubRc4yMJN/pFXSkkMnQAeqfUH2GdidsHUhcbZuq6Fgi9Cx2XuyFkHso9phyonO4MhNSt4kDiJlSZ7rTpvUEXWuVjoLyw8F8qHQqFx1cyI0pWsFIUT+UWq7RCl/HsEJuhqARh6NDSQW9epB3X1WPRDNjphMrP2oPGllrvyGywgtU6qxImbB9fqYMFBGp12riWxA4i82E4Tw2I2ROElgTtOZDXgf9c2zIu3F6sN+udXY4r6WJ/1AcQILzIBI8Ox4IZGsTUZanR1C5bXYn6EA1XfsbBxRDPbpnNnsQ== Received: from MW4PR03CA0354.namprd03.prod.outlook.com (2603:10b6:303:dc::29) by CY4PR1201MB0056.namprd12.prod.outlook.com (2603:10b6:910:1c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Wed, 24 Aug 2022 04:35:43 +0000 Received: from CO1NAM11FT015.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dc:cafe::fa) by MW4PR03CA0354.outlook.office365.com (2603:10b6:303:dc::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22 via Frontend Transport; Wed, 24 Aug 2022 04:35:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by CO1NAM11FT015.mail.protection.outlook.com (10.13.175.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5566.15 via Frontend Transport; Wed, 24 Aug 2022 04:35:42 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Wed, 24 Aug 2022 04:35:41 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 23 Aug 2022 21:35:40 -0700 Received: from ed7fa55790ac.nvidia.com (10.127.8.14) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Tue, 23 Aug 2022 21:35:40 -0700 From: "Jeff Brasen" To: CC: , , , , Jeff Brasen Subject: [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation Date: Tue, 23 Aug 2022 22:35:53 -0600 Message-ID: <42a40dcf43d62ff985fd89bbcde47558344384bc.1661315727.git.jbrasen@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NVConfidentiality: public Return-Path: jbrasen@nvidia.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ec5dafb3-5f6c-4db8-b6a0-08da858a1a6a X-MS-TrafficTypeDiagnostic: CY4PR1201MB0056:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4TssPXG/z4DW9jtZgTbaXQiIhuZqlGZkClegCCbVB1IKR2kSo29ajrhOfP8frtsTv2VhqnThFglFHh8KUJSzpb23qrRPph/xu3dG0yD/v9gSttAc8k85Sm8OG+uk+dF4UfXnE0PkeNJ0XJySbF2ELmXWhGGTBYmV4H2eqKcl01VA0G3PoSohbVJW0fz/kKKizaBk2migeSUDjjc4nGSyXN7YJJXyeAtpp62qXA1kdu7jnuXal3S49m108D79hZKafgoUjfFwF392ZtWjWvcAHawUKFDkkOTMW6tZc3n5Bsxf0TmCkSgl55G3KWbASPPP/EyyIYhqzTkET1JGquJ797TVXemWQf24OJxOhLjfv0E1W4BKcsp5XZyruu3/eAnFBsZrsFK2ZH4JXuTpZnO3BH6XFc0PmOxh+/LOEGpjEsZV6BhpRaAbJ9z/7xvLaV6i7k4FeoxAlOKSWoUzVqeghHzlOZWYWjl9kBY++qSjXqYv3NCsX/+nvZPoe2w0FLDa5BMKLaSZMHZ4rzZppVTdpQIzgFHfL1ehrcDRTQMPA9+M43oIF6TeMG/YzhqVCTGzKDs3rOo6XY/GMmO8uQlSLhv/pWywkWqiDOBzuinGG1tcoFZvU3DWa7LgDAKTxg/qI9dVPpDFf4RHMbAzc9lkluPB0PVywK9D89Ck13zzMKJMApiDPCPEk9ipu94I20KJi3moShiCIxfsAHZ2MyjVbYF3Ph/xXj7h1P5G6vkriIdjIJ87+Rpq4n5qnvmjcM/s/B++SglNKls3k8GFINcM6SbHQpOOAFRj1J9HqDKkF+22WkyPmA8+3nLuW3wixPpWF54WEx3Q/7ap3YtiHuTE4Lu6IRG3sFN5GTGoTyKSEQai3ky2cJqkd+6iVYtqessNaiZs75/Sw3xNeE8gRCQKmJld6Xv2k7DDSNSdtubbv2U= X-Forefront-Antispam-Report: CIP:12.22.5.238;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(396003)(346002)(376002)(136003)(46966006)(40470700004)(36840700001)(54906003)(36756003)(336012)(426003)(83380400001)(186003)(82740400003)(47076005)(86362001)(356005)(40480700001)(316002)(6916009)(70586007)(966005)(70206006)(8676002)(4326008)(41300700001)(40460700003)(478600001)(2616005)(2906002)(81166007)(8936002)(7696005)(6666004)(26005)(5660300002)(36860700001)(107886003)(82310400005)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2022 04:35:42.0435 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec5dafb3-5f6c-4db8-b6a0-08da858a1a6a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.238];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0056 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Expose the UID value to GeneratePciSlots().=0D This is needed for some cases for example:=0D https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-= root-ports#identifying-externally-exposed-pcie-root-ports=0D =0D Name (_DSD, Package () {=0D ToUUID("EFCC06CC-73AC-4BC3-BFF0-76143807C389"),=0D Package () {=0D Package (2) {"ExternalFacingPort", 1},=0D Package (2) {"UID", 0},=0D }=0D })=0D =0D Signed-off-by: Jeff Brasen =0D ---=0D DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h | 8 +++++---=0D .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 5 ++++-=0D .../Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c | 8 +++++---=0D 3 files changed, 14 insertions(+), 7 deletions(-)=0D =0D diff --git a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h b/Dynami= cTablesPkg/Include/Library/SsdtPcieSupportLib.h=0D index 85e283a994..4171dabc33 100644=0D --- a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h=0D +++ b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h=0D @@ -54,9 +54,10 @@ AddOscMethod (=0D used. It should be possible to enumerate them, but this is additional=0D information.=0D =0D - @param [in] PciInfo Pci device information.=0D - @param [in] MappingTable The mapping table structure.=0D - @param [in, out] PciNode Pci node to amend.=0D + @param [in] PciInfo Pci device information.=0D + @param [in] MappingTable The mapping table structure.=0D + @param [in] Uid Unique Id of the Pci device.=0D + @param [in, out] PciNode Pci node to amend.=0D =0D @retval EFI_SUCCESS Success.=0D @retval EFI_INVALID_PARAMETER Invalid parameter.=0D @@ -67,6 +68,7 @@ EFIAPI=0D GeneratePciSlots (=0D IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,=0D IN CONST MAPPING_TABLE *MappingTable,=0D + IN UINT32 Uid,=0D IN OUT AML_OBJECT_NODE_HANDLE PciNode=0D );=0D =0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c=0D index ceffe2838c..24e074ea90 100644=0D --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D @@ -295,6 +295,7 @@ GeneratePciDeviceInfo (=0D @param [in] CfgMgrProtocol Pointer to the Configuration Manager=0D Protocol interface.=0D @param [in] PciInfo Pci device information.=0D + @param [in] Uid Unique Id of the Pci device.=0D @param [in, out] PciNode Pci node to amend.=0D =0D @retval EFI_SUCCESS The function completed successfully.=0D @@ -308,6 +309,7 @@ GeneratePrt (=0D IN ACPI_PCI_GENERATOR *Generator,= =0D IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtoc= ol,=0D IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,=0D + IN UINT32 Uid,=0D IN OUT AML_OBJECT_NODE_HANDLE PciNode=0D )=0D {=0D @@ -416,7 +418,7 @@ GeneratePrt (=0D PrtNode =3D NULL;=0D =0D // Generate the Pci slots once all the device have been added.=0D - Status =3D GeneratePciSlots (PciInfo, &Generator->DeviceTable, PciNode);= =0D + Status =3D GeneratePciSlots (PciInfo, &Generator->DeviceTable, Uid, PciN= ode);=0D if (EFI_ERROR (Status)) {=0D ASSERT (0);=0D goto exit_handler;=0D @@ -687,6 +689,7 @@ GeneratePciDevice (=0D Generator,=0D CfgMgrProtocol,=0D PciInfo,=0D + Uid,=0D PciNode=0D );=0D if (EFI_ERROR (Status)) {=0D diff --git a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSup= portLib.c b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupp= ortLib.c=0D index e5ab3a3ca8..b35fb6a7dd 100644=0D --- a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib= .c=0D +++ b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib= .c=0D @@ -41,9 +41,10 @@=0D used. It should be possible to enumerate them, but this is additional=0D information.=0D =0D - @param [in] PciInfo Pci device information.=0D - @param [in] MappingTable The mapping table structure.=0D - @param [in, out] PciNode Pci node to amend.=0D + @param [in] PciInfo Pci device information.=0D + @param [in] MappingTable The mapping table structure.=0D + @param [in] Uid Unique Id of the Pci device.=0D + @param [in, out] PciNode Pci node to amend.=0D =0D @retval EFI_SUCCESS Success.=0D @retval EFI_INVALID_PARAMETER Invalid parameter.=0D @@ -54,6 +55,7 @@ EFIAPI=0D GeneratePciSlots (=0D IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciInfo,=0D IN CONST MAPPING_TABLE *MappingTable,=0D + IN UINT32 Uid,=0D IN OUT AML_OBJECT_NODE_HANDLE PciNode=0D )=0D {=0D -- =0D 2.25.1=0D =0D