From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.80]) by mx.groups.io with SMTP id smtpd.web08.26784.1656604137832924515 for ; Thu, 30 Jun 2022 08:48:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=W7pAsXQj; 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.220.80, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J6X23GdKPEykx0RT2PHUGV2jS6E2kBlFyfuyPgTTNLHde+3UaFgDU4jp5d9bFnUIOtqs7DQrxEIlQ2zODdI5VcsekbOKf6LrpyyL5Shxtspt3e6WwGEqWt2q9SUx4Qf7UDozK5iDXDCTANRAMxCW1kVACll3n00QB/gow1PWg4ek4b8vbieM4rI95neTY+Psro5E2GCcz2/7XeIsu0gIEaD9hYRowfj66XqRluZyYY/S0U+Pi2/RJnxo1O/MTIsHkWLOiRhKQ/p+FPdPu/RhrRklYxtSzRjdaQXM6bG9EPFDaWBvL9c00cGkBjiUnDx72gUFOU6dsNjwX1uQXYc2Nw== 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=G6XotJDKS38NmggwG9SKo2NTRgb7FehyoBFhytkQDnk=; b=J3OSiNMOq7fWgEohOh89W+Lp+Fpd6c10A10DWW47b5KDNNJZhyAiYqkuQ7TciFl2ZmVlL91xehlZxfYBxGUvcbmzPdoV83oE45Soqr21Nxpo6qNBSB3bcQ7yCra3INjDAcRC8LWqJgjBEscw8zv4fpcWowAzPcnv43f+d2Wsje8NFI5zLVkq4E49SxbkjlFG8jWMpWMz99FMwf2Kwf1VBC0Imj5q2IxQlGO5melhKVZRyxPIRMTZXLA/NdhHw3xCIdgUl7Ih+43XxJhBN4hTRnojVxot4uT2gGj1QYTorlHmIiuC71yXoDln+NuiuaTC4maMqGgy79yPQIVLaHLLEw== 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=G6XotJDKS38NmggwG9SKo2NTRgb7FehyoBFhytkQDnk=; b=W7pAsXQj27IZbRDe3KNOp5CSqwrnj+lz1pUqgH+3jOHK9ppKv84RObmT6ovw8NHVOuCRn0eNYdw90ThPZU7GbpZWlpj1a0nn1+6jGCT1+rT+gszxZmEtlPrhQCWtgbbHB1z7zluDu8U7uzFLPKs/UcB9V5YpK+wyhMdupgO2l34O4hDS1MhpmSpn5Qv0ezXfFlWlz2NnwFzZmRNfWVHLPtTyHMM5RATjGF2sEKsbXFw5s/6auhU2QxsPcSZPpDwDTGKDBgcnvh+V+7fIkqIfC8bAgGDrVlMWhru0DN2tvFz8xnVk4PttgpnZjvVaz7J57SdpytacmCbffH4Tm3PyEA== Received: from DM6PR07CA0060.namprd07.prod.outlook.com (2603:10b6:5:74::37) by BL0PR12MB2547.namprd12.prod.outlook.com (2603:10b6:207:3e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Thu, 30 Jun 2022 15:48:55 +0000 Received: from DM6NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:5:74:cafe::57) by DM6PR07CA0060.outlook.office365.com (2603:10b6:5:74::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Thu, 30 Jun 2022 15:48:55 +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 DM6NAM11FT014.mail.protection.outlook.com (10.13.173.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5395.14 via Frontend Transport; Thu, 30 Jun 2022 15:48:55 +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.32; Thu, 30 Jun 2022 15:48:55 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) 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.26; Thu, 30 Jun 2022 08:48:54 -0700 Received: from perses.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Thu, 30 Jun 2022 08:48:54 -0700 From: "Jeff Brasen" To: CC: , , , Jeff Brasen Subject: [PATCH 2/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Allow use of segment number as UID Date: Thu, 30 Jun 2022 09:48:49 -0600 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: 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: 554aa567-a2b4-4669-64d7-08da5ab00a1b X-MS-TrafficTypeDiagnostic: BL0PR12MB2547:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z/nEPNt89vU1+9Y1m8wUyJ+itZCJDoti1AqF/jviDIPimVlKF5sTrXhJpIeXwDcw9K8Wq1k4S6Q1/jmTihYQ+7YstzkiLAyUjaaPHz66AAIF4DkslF4dv1gN8ZfLL6dG2gM/tZp/Ssv0EEup7js6M82DqJ2LV/6M4jRWv8H0WKk4yW8Gedc+sO1emDtIP56gmub8GieFFNo+zhoNLrDwbkRx6Ra+C3qRGM8Ntkx/YYpm5/gaNEp/JhpLjbp0oC/+/hfUzUlfNfDAb3EE++LTa2LWFF8uytricKt7xe1wB+LQAJ/KQav7D1iVtBthhFZzFYPnrK46KBDk+P6PgXWgsQ75HhJE8AlY3HwaTbQ2RujspnC30gjJcw168t/C4ov0oaczLEf+eE7GGPQgiO7TEgdJCgCFGkGAFtIrrXrtBfAcYJYxVF7oYATQa2hbEY8tjr/m1wdJsgNDJYdwaseikdP0OsVqcSg7we6v97p0nzSoYgUki7ckieYQoKpLyPm04yji5fUATX0QJ8B8LRGzq5fZd4M7CjwuCWj2eYdJFy/e8BL/CJlQR2IUR1w5oD0ZW8QuoQbVdd8B7hJwDXUOSeg1M/p+C5eDLtd8bMOwhW98Ik7mrJbHGVcPrfRfXNs8sEzZmQbZA1YxHaT1UgF7cErRZoJrHmcJJ0sjh7DVdYnRyecI3MvHGARxpcowjEnjq2HjcdUpND+Gf+tVmb5uZRv+9tfw4nUvUaD72xRelq97fc/uNpWWWUg052WlYcKQa9jiBhFtTXg8b8QMUZ2tF/LGjHXACW39f3MXZXEkvv7hcNaMyAPX135Tg45Q/ag/HhOvQ/dhe7q4AkR3ktFBCZJj3yWlDetxlAvUF13oTrgsrbeY60RicMhmBZBVrZGA 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)(346002)(396003)(39860400002)(40470700004)(36840700001)(46966006)(40460700003)(81166007)(82740400003)(86362001)(41300700001)(8936002)(36860700001)(5660300002)(82310400005)(478600001)(356005)(316002)(2906002)(6666004)(83380400001)(8676002)(6916009)(70586007)(70206006)(426003)(47076005)(336012)(186003)(40480700001)(107886003)(54906003)(7696005)(2616005)(4326008)(26005)(36756003)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2022 15:48:55.5564 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 554aa567-a2b4-4669-64d7-08da5ab00a1b 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: DM6NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2547 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 =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 9b74c5a671..a890a048be 100644=0D --- a/DynamicTablesPkg/DynamicTablesPkg.dec=0D +++ b/DynamicTablesPkg/DynamicTablesPkg.dec=0D @@ -57,5 +57,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 f0d15f69a4..85782af380 100644=0D --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D @@ -996,6 +996,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 @@ -1051,13 +1052,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 283b564801..431e32a777 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 AcpiHelperLib=0D AmlLib=0D BaseLib=0D +=0D +[Pcd]=0D + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdPciUseSegmentAsUid=0D -- =0D 2.25.1=0D =0D