From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (NAM04-MW2-obe.outbound.protection.outlook.com [40.107.101.66]) by mx.groups.io with SMTP id smtpd.web08.40581.1656693152721631964 for ; Fri, 01 Jul 2022 09:32:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=bzYzjeF3; 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.101.66, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S84pKdV8MG3IMSEQWhGUvO1pZ2EDqjdvI7+//+vMubqmRc6HGHhybzJ5w7FDLMWvdY1N1eECnuZua0DaXrOO1TqnUPj0ebq9NnhwcYztvSWDlbLE+bHGAbH28xKjncn3HC5/0Ow5kegywRJCj4gALkqhJumsTaL5Lew3KHDDCOc27lBWuhcRTEM01HW4u6vQOi7kq1T1iahqBg1UCRn6Qq5T4+8+7uIDFNByalqs+UQjL0MQTkYqknBt6BbjhVqV+1HA9TiRiHIc5FBUl0lIUvGkyX6lj9IKv8lMp5WKQ/NX8wRwBrlLVGb6FKirr6RitsSLlFX1+epg1wRffu8Ulg== 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=PxrnWBC9wlcJC9XKhVgNtXzEKrQ2llXS0RZypDhrUbA=; b=jMOl+lwDnsnn6Su5H8tgvVVHENmT3KF+DwJunsI09Q12ZE46qmod1Pg3l6N/464nO1zG66Zg74AtJ2QRPGeZOVanjqx2430tpQhiwTRykMtW2szOdo3vwe9m3UoNOc1H7QbWwqVzalaDzDUX9A9A85qWfAcAInm6sy1bzl908BpAFVHyb86euNp8M3WNWs5Vwe8tIJHkU+jIgivBkqn0pE+NysMWFACrp9vk/lMKPBRgCCUbNLJwaiLCJQ5xDE8z5fVqxXVS8LnDcUQ7eo4ZYLL2KIYv79gie0ood29asH1UbtbF5jr3JTJruKE75deMOYBila7Et7EWyI7GENUX8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) 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=PxrnWBC9wlcJC9XKhVgNtXzEKrQ2llXS0RZypDhrUbA=; b=bzYzjeF3rQXdwlACvDH7FBniQLUI3Q0sBr21Cx5mktxM+ix2Gf+YbZUxf97irkC6QmsrXINU8aCsPRU47rQgIxKtIy5YWBCFUqAkG6cJ0S245oOpQVFE1JJVhwmvIKKY83ozL/LdUrqtuRM/8sTRiWnQ4hyELnG6N6As/MRff9nKH9zOXFAqQtnNfSbMGgxAXgcLbIc/Wi4KT5fsJojg3dKC5QFWclFSYLm5BGhSFvzxyME85yIa9UetRpazQpSGamXhlvuzhxveWnni2cfkw6T+gvZIGzyQtDlhEyXCHY/F6M1sKymerocLzr+LQNXDE5HVgNfnWNH0rcleJ1Tebg== Received: from BN6PR22CA0026.namprd22.prod.outlook.com (2603:10b6:404:37::12) by MWHPR12MB1311.namprd12.prod.outlook.com (2603:10b6:300:13::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Fri, 1 Jul 2022 16:32:30 +0000 Received: from BN8NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:404:37:cafe::57) by BN6PR22CA0026.outlook.office365.com (2603:10b6:404:37::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15 via Frontend Transport; Fri, 1 Jul 2022 16:32:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT016.mail.protection.outlook.com (10.13.176.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5395.14 via Frontend Transport; Fri, 1 Jul 2022 16:32:29 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 1 Jul 2022 16:32:28 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) 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; Fri, 1 Jul 2022 09:32:28 -0700 Received: from perses.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 1 Jul 2022 09:32:27 -0700 From: "Jeff Brasen" To: CC: , , , Jeff Brasen Subject: [PATCH v2 2/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Allow use of segment number as UID Date: Fri, 1 Jul 2022 10:32:35 -0600 Message-ID: <63668e8cc9cad1351b8db7a4f19febe83587ac0a.1656693003.git.jbrasen@nvidia.com> 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: 1fb213a5-8bee-4f87-d7aa-08da5b7f4a7f X-MS-TrafficTypeDiagnostic: MWHPR12MB1311:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QKhunjo5MHWmjqv9abFGBpqNMQzbHw/NSQTNGFWVVHWiRjIQQSD58sBMzazrhvYzs6knvaROFTgAiwv+ItmmP/o4UdVtK5nyNyGYkiwjOn/BPL57EsHQ6wi8Lr7cmbcRgKOgXFEIkO4Gt8kIE0d1TvFCQNxQhFgSsTGKczkbFYzqwRWrETFtCzvuVD9MiFDbkuQ2cyp4jX+jRn2/MW4hSx1gEwsZ7SrutdYPhFM1+dt4RsguZPWnuEttcsBfLTjebss0XyI8V0L9c0OYjf3irst//Ng6EB/M/etY0yo0b7JiF3O9jI25fHI2g+7phOK0nvN4qylZMDMVwM6D3Uuy0o+xPYYoSC40slai143JgtS/C+tCA94tWP/wnzaHx89kbsoFRJvvWlTIx9FL3vT+9vwkgfkrSxXerlbgDmBnKGakCAAaKAbSyj4gtD7OLAgMH/w+bwzn07QamDBi/pM/ay7lD/8S6ZB+Y1eVAlp41KLJxqoX8WOJuCXK1H54zp/5wYIIJYbdVGrys1qH+gkEccns1W+WFe1X25qCaMOFPhojYiCtAOqBxydN1Lfjhksu+WlHR1/ITOexE6hP7/4xuCgaU4Ja9HfJhBgsFQbAVMkJXwvlnG+vvojtQpJGWN/+FZ31s55fdhr5JmhXwAIU3/TVLsUyyMD2/NSIjTyzw86eCvgOA2C38pfP1ikTCIpbe/kVBnFkxuo8Yd7oEqjk+2ZUR6QfY6OAmAwQUTZBzlWNmEDC23Rv35MSVSD3wNQAOgD5ivEm1gTdqcATC6GBnbFmfxJ15Gn8jkiPuMA34enSktLbN1GB+2hfqjrXnC+62gqyifrGbaaN0IFf/nOthHu/Ka6THFKghhteAJmPgy+OB1tI4gIT0nGVkVjuluoO X-Forefront-Antispam-Report: CIP:12.22.5.234;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(376002)(136003)(346002)(396003)(46966006)(36840700001)(40470700004)(40480700001)(54906003)(356005)(6666004)(81166007)(316002)(36860700001)(41300700001)(4326008)(86362001)(8676002)(82740400003)(40460700003)(2906002)(6916009)(70586007)(8936002)(107886003)(336012)(426003)(2616005)(186003)(478600001)(83380400001)(47076005)(70206006)(82310400005)(5660300002)(7696005)(26005)(36756003)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2022 16:32:29.3338 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1fb213a5-8bee-4f87-d7aa-08da5b7f4a7f 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.234];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1311 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 d4c5f47b07..80776ceb79 100644=0D --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D @@ -1002,6 +1002,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 @@ -1057,13 +1058,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