From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.87]) by mx.groups.io with SMTP id smtpd.web12.4614.1662496446784303942 for ; Tue, 06 Sep 2022 13:34:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=kQhu7clR; 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.93.87, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hesfTWamUUPTqETQuK9U8qa+hCOHpmZx8KlkrRXSCUZ83Lbp+ln46O/x1a4Ftmvf1WzBqwGz4Agt4nT9OeYPAMluQSVv+jVN5C6vkkxOoKaeVVnePYlMVa/3ADgbX7c85boSUecOnzq224zQzoiz4xDPrsSp7wfhvqUH8d2Gz8I6ODYff43PXBzkh45cWBZzOcrsCIC3FoKO9ubDYKgUssjzNEOWuuJiOlrza9M0+iWMLvxSq/eTEkihqwRnJ5JkDFUWxGdSJgoclJ70lRNraDBqYX1AsEvA1W2bHC51DfxWZB4VpQijBHTh8s9ACxqduiYtMPi+m34OUXR359UyTQ== 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=1PMxAyqsEPdOcilfRNlQmSlRuxq4B3zEI3p/fD6jRqk=; b=AGIiGwFIKCx/fKdP3R4F7J9vp5x3hYU15QjROTSkq4TvSCTAlgBVPqs+vqtXS7sjvVRWRBB80gcr/wGBU7p3QCP6ZczEAao17Q6M4Mn9Ybs1FVygXDI0RhgU4fiShOrWoVuOHK+q7ETTClr36zfqRygd3EHXPApu+WCgYmAGN14EY8oVZgXaUckMtHhot4cCo4rJBQnanY7U1xG/ZCfS+kut58uwxS4duMZmU50indGUkuZ8LZhxzsfkmzAg0wFZ0uBEBawtWJjvZ3kBw8w1Wdz/ls/2HuuDOsNwcNii0gp8EKAZ1fftc01+6Zs9CW+OvmMEeCaimvhO17T4d7yeuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) 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=1PMxAyqsEPdOcilfRNlQmSlRuxq4B3zEI3p/fD6jRqk=; b=kQhu7clRYQSy+XgcPygJjtSnjFgFZzLw+RmCajdaDFs2288yQ//9UEcGzTWd8xgUieDuVofDJa6XiiClH9J36/f9/LI4pQ58gTrbRuQiWQtmwmlMafoGwkjqx8frn4tPUiIJihcm+/JuHOHs/1Ng9GQBUoBoJwRDEdlJE1jpwojRWg9rV+g5Osd4s06Phnjno+AeF72jur5H8cWYG92Dkx4CQfMfU99MHUGfuAL3jnKmfiY64aWKyulRouyHlUXr8vG7eQAIwuzO+Ss6XoZTf7c62ycdZ37OeJivKvbOEN+kMj9yAex1qcSHGaC69RqvQYf0T5teWQOXfEPwA1/IgA== Received: from DM6PR21CA0012.namprd21.prod.outlook.com (2603:10b6:5:174::22) by PH7PR12MB6396.namprd12.prod.outlook.com (2603:10b6:510:1fc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Tue, 6 Sep 2022 20:34:05 +0000 Received: from DM6NAM11FT011.eop-nam11.prod.protection.outlook.com (2603:10b6:5:174:cafe::f8) by DM6PR21CA0012.outlook.office365.com (2603:10b6:5:174::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.4 via Frontend Transport; Tue, 6 Sep 2022 20:34:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT011.mail.protection.outlook.com (10.13.172.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5612.13 via Frontend Transport; Tue, 6 Sep 2022 20:34:04 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Tue, 6 Sep 2022 20:34:04 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 6 Sep 2022 13:34:03 -0700 Received: from 9e107f4f5b88.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Tue, 6 Sep 2022 13:34:03 -0700 From: "Jeff Brasen" To: CC: , , , , Jeff Brasen Subject: [PATCH] DynamicTablesPkg: AcpiSsdtPcieLibArm: Allow use of segment number as UID Date: Tue, 6 Sep 2022 14:33:56 -0600 Message-ID: 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-TrafficTypeDiagnostic: DM6NAM11FT011:EE_|PH7PR12MB6396:EE_ X-MS-Office365-Filtering-Correlation-Id: 743bbcd8-2e7b-439a-72a5-08da90472413 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 82Ry4pqEXp6KrPKZXEGsi8DDRDHkHozXsc65BTSfOtq5m8DSpHLKMYdnELgtk8+RKQwRS+3dq0E6RRy0Vnlv7v/rZaL5j3taMMGa6HVXHU+h7UTVnRhbdZ4/vTXEV6F4tbmJUVhaSvRW3lM2oa15bxf0u9iwcCKzVWcdUwABGpUA2NObyQqRqGJjbGw6CqrdzjoPD8d3kM8ELgE+EeiaLilZsyUGvwGvqjXWncG9SwxzISV7xUC6XoJn1hs019KS83rpkdNGCJLgKsI1d4hEOpAlW7Xzg5zKq+jbWX3j0L1jkhkJpprIe+eIR+8/AiBAEwzBYHyknciq9hJc8b4Ji15s3wbDckxH4mZhP4VvQGZooTCnkgIOGaifP83EPUWvirI5ktCSlJFDiRGj6fE+LdzPNNzutlJDBzFi5On/SbXpJHYZfscE2N1l97OYGLR9FR7uNke9rwO4xMcz5xrF7ExC68afIL33+vD68As4ZHJLCR+DtZeb5ofWsWr0VLBye24XCsFSx1pkMpbzi3oNU4EGgVELnuMykEvcUHZqR0nsNd8py1wq051oH6WgIGgLezq2mLTimLIdCV09Yq6TGZ0aD03bYwM9Yx7WPoQG4TiMI2s6LooStW3HqpUnL+Mku9Ti1d2/ChWuc9isLdwDbDnO00tTtaVQgu77OddpSLtYmYYnriUpnlZcv6Pdo0WHlttbw+56nbSxlNf4B+BY46OAWPeTnDC36flefJhT/cS+fp9+TL8zoX/KIMlC/P8NwaXnCwqIeTjSqCBkcAnHl/cgWTIZy4v3086hty67wB/k467H997cqn+OMRUkKQ1gKL9lTQzvqf1eVNS/I1rwZQ== X-Forefront-Antispam-Report: CIP:12.22.5.235;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230016)(4636009)(376002)(136003)(39860400002)(346002)(396003)(40470700004)(46966006)(36840700001)(356005)(107886003)(81166007)(7696005)(36756003)(336012)(2616005)(47076005)(26005)(36860700001)(6666004)(86362001)(83380400001)(186003)(41300700001)(316002)(40480700001)(82310400005)(4326008)(54906003)(6916009)(70206006)(70586007)(426003)(478600001)(5660300002)(8676002)(82740400003)(2906002)(40460700003)(8936002)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2022 20:34:04.7428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 743bbcd8-2e7b-439a-72a5-08da90472413 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.235];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT011.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6396 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Add support for selecting to use index or segment number as UID and name.=0D This allows the path of the nodes to be well known.=0D For example, if the PCIe node needs to be notified from by an interrupt=0D for a Generic Event Device=0D =0D Signed-off-by: Jeff Brasen =0D ---=0D DynamicTablesPkg/DynamicTablesPkg.dec | 3 +++=0D .../AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 19 ++++++++++++++++++-=0D .../Arm/AcpiSsdtPcieLibArm/SsdtPcieLibArm.inf | 3 +++=0D 3 files changed, 24 insertions(+), 1 deletion(-)=0D =0D diff --git a/DynamicTablesPkg/DynamicTablesPkg.dec b/DynamicTablesPkg/Dynam= icTablesPkg.dec=0D index cc34c2bdd6..adc2e67cbf 100644=0D --- a/DynamicTablesPkg/DynamicTablesPkg.dec=0D +++ b/DynamicTablesPkg/DynamicTablesPkg.dec=0D @@ -60,5 +60,8 @@=0D # Non BSA Compliant 16550 Serial HID=0D gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdNonBsaCompliant16550SerialHid|""= |VOID*|0x40000008=0D =0D + # Use PCI segment numbers as UID=0D + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdPciUseSegmentAsUid|FALSE|BOOLEAN= |0x40000009=0D +=0D [Guids]=0D gEdkiiDynamicTablesPkgTokenSpaceGuid =3D { 0xab226e66, 0x31d8, 0x4613, {= 0x87, 0x9d, 0xd2, 0xfa, 0xb6, 0x10, 0x26, 0x3c } }=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c=0D index d82f071e85..85098752c6 100644=0D --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D @@ -981,6 +981,7 @@ BuildSsdtPciTableEx (=0D UINTN Index;=0D EFI_ACPI_DESCRIPTION_HEADER **TableList;=0D ACPI_PCI_GENERATOR *Generator;=0D + UINT32 Uid;=0D =0D ASSERT (This !=3D NULL);=0D ASSERT (AcpiTableInfo !=3D NULL);=0D @@ -1036,13 +1037,29 @@ BuildSsdtPciTableEx (=0D *Table =3D TableList;=0D =0D for (Index =3D 0; Index < PciCount; Index++) {=0D + if (PcdGetBool (PcdPciUseSegmentAsUid)) {=0D + Uid =3D PciInfo[Index].PciSegmentGroupNumber;=0D + if (Uid > MAX_PCI_ROOT_COMPLEXES_SUPPORTED) {=0D + DEBUG ((=0D + DEBUG_ERROR,=0D + "ERROR: SSDT-PCI: Pci root complexes segment number: %d."=0D + " Greater than maximum number of Pci root complexes supported = =3D %d.\n",=0D + Uid,=0D + MAX_PCI_ROOT_COMPLEXES_SUPPORTED=0D + ));=0D + return EFI_INVALID_PARAMETER;=0D + }=0D + } else {=0D + Uid =3D Index;=0D + }=0D +=0D // Build a SSDT table describing the Pci devices.=0D Status =3D BuildSsdtPciTable (=0D Generator,=0D CfgMgrProtocol,=0D AcpiTableInfo,=0D &PciInfo[Index],=0D - Index,=0D + Uid,=0D &TableList[Index]=0D );=0D if (EFI_ERROR (Status)) {=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieL= ibArm.inf b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieLi= bArm.inf=0D index b38a4e9d34..c2a1acb570 100644=0D --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieLibArm.i= nf=0D +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieLibArm.i= nf=0D @@ -30,3 +30,6 @@=0D AmlLib=0D BaseLib=0D SsdtPcieSupportLib=0D +=0D +[Pcd]=0D + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdPciUseSegmentAsUid=0D -- =0D 2.25.1=0D =0D