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.41]) by mx.groups.io with SMTP id smtpd.web10.4163.1657313928137337921 for ; Fri, 08 Jul 2022 13:58:48 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=O1bQphoc; 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.41, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jFj0h6AiMauSPG053bbk4+FXPgz99VdKkAT2gtpxNaQlk8SRwz2hkQVrKbu2w2lEGtuUWA94J89HhmmFsey/1orVdhh4pCz2S36ZvjPDzbvQskCx9UKmnffdpIwoHAhctvIdPBJ1nrzmn2LEqMDgzzpAIkSKRPo2/IrQ1avLxk0nO302bAV0aotIiOFc+VE9yFkQGSWVy/SoYjUCrhwKy+RJOBlPK3HM8CYzzL+bvE+fMBhfUENbipjEgkAP/OdkcqB8hRPiVh4mcQFmYHNA71Z0v4nt3O9bkS36dA8nKpWmN9rEpoDe5Q081vHV5VRTBBhevg8kUbO6Jbck/ZVpBQ== 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=hPMkkMPP0t4hXQf66emVmwAj8jZlf3DLpkBS2X27gik=; b=j5a8kFR74cCQeufSL+UCUTdjbrlG/parUJa80vWNhYG1ED6sYspLx2AyIL/Us5M3uayautge7YinhhIPF2/t89ApBMcWDxlo9yhAypbTKnQOw6wujwPDfrnKM1oXAYPHpgKS9/aANPfLDIE8fdOemHo/YU6zwR3dzhANPwaeQqV7fsF0pB4ObycFyETBSJq1+KeW++A4ffBQJez4n1xtNWfwar0V9JdGUahz3LxwTtxRsE2gyCyI6Jz/jzkUA6omkejQ4LSMHWmwqGQlqbZ1YNQ7OV4xmh3+UB20AlmWuQcX8S+XA1aMbZpD0ACT/u0okDJAPSYvsoGQWW3gTuj33w== 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=hPMkkMPP0t4hXQf66emVmwAj8jZlf3DLpkBS2X27gik=; b=O1bQphocnIoM8NV6hLg7Cf72e5jHRdPhaYogZLlJsj/MNBK/Y1V9NK5RetUodB2U3aRCDS9ujW3jNPd1HFoveGkwCizskAauOG3uFXtoGCv0ahdWthp1/UiY4O9DJX9RGGkpkPr9PxxWVKRWECn7wORzhzjlAgjBWu07JvzTAvhrvtLfTX08THM/9ii2hKUbhi8veIc6PdweMvu1wrYBFmn7EvrP9CxLWtRSBJnR1zIj/FKYW/x+AJ+Nn+aRTtBl68npa5wGZCDL8MHGTj5nVylLs3ZC/aCLvb3Xk9FxZLoRHcMhRgrlnRkuEt75gwbvY/xRsVJGcRFawbo7WGxaKQ== Received: from BN9P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::9) by BN8PR12MB3508.namprd12.prod.outlook.com (2603:10b6:408:6b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.16; Fri, 8 Jul 2022 20:58:44 +0000 Received: from BN8NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13e:cafe::73) by BN9P220CA0004.outlook.office365.com (2603:10b6:408:13e::9) 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, 8 Jul 2022 20:58:44 +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 BN8NAM11FT036.mail.protection.outlook.com (10.13.177.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5417.16 via Frontend Transport; Fri, 8 Jul 2022 20:58:44 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 8 Jul 2022 20:58:43 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 8 Jul 2022 13:58:42 -0700 Received: from perses.nvidia.com (10.127.8.14) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 8 Jul 2022 13:58:42 -0700 From: "Jeff Brasen" To: , CC: , , Jeff Brasen Subject: [PATCH v3 2/3] DynamicTablesPkg: AcpiSsdtPcieLibArm: Support UID > 0xF Date: Fri, 8 Jul 2022 14:59:02 -0600 Message-ID: <7a47623bd7e32de309df4113102858b78aacd9e4.1657313523.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: ff058223-4f5f-46f8-8487-08da6124a50b X-MS-TrafficTypeDiagnostic: BN8PR12MB3508:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qITfc7xGFgCYsEF8WsPUxEacA71xQFfCYtR2PBiWuVkVF2lQnyWwS+loEJfXBLuB2NYoPVZZV7Sl84XHPDHy0o6M+Ci0tuYjDj+kXySbiYCsh6N4gHMgQ/LJ99/m1/BzgYAW/YbzXs7Lq5uMILXNamrj4NjL5j0CkAH1fV4xkxSE5IJIpdgOjX8i3IK2abQdsg0YWipItt56CJghIiegUNdsVMjqElL3SchaGVttJItR3CwH6+32RXlz+JoXcybZrd7ACTfAFYjZOA/90UhL4N72qfCKauIE99ixpNfmghP8YnK2Pw2Dmhd/QLoEsJBz/Bn+Fs9RiBokHgBtGQAV6s3bXW1Tz09LfCSyWN6YgrycCCllVqfuPECAbqPpfNh6u6pWH4SAVvTv7tY+Sz8hECkyLaWqY6mcTSfExQ0GlvJMvVPJujAYpY76i6sjLZrHg2Uil0lcjfEPFpCuN6NcbojH6+DwqWXRb/0p/kPgqaEWrzPZCgcA3tBAyY6P6WPUxrKUHzGuHcdIpmFPdlOUD0e3qZSlEYSqtk93utKmZpm0epgvjSI6goiv3SlQHcr6kmGGWmwy06uDXxNgq85Zeo6MLsBZ5Ia2GieW1bomiGAK87OAUYXMBULVwHCu8z6vekcNoXaaZaZ+qleIZNUZVu3gHyn4ZtC1OvjDx5fdAb0iqEiDBVLp07i1jGUu1xMw8en4OYFFzOo/H5rI5vUj+Mwkqc6e+Ds8wcBBDkcztuFagzjzYEMbc+QiF7QK3Ikbg3D3TPllwAwb3Y+3zR3ibLB9xpiBuXurlmfZpgIdXRuvZDqNxHqIYCgAO+xlZC79RQXqXBhAo3NJgE/emigymqDrf/JxeN4HC4ECe9yqUYnq1q/HJ65Gfhl37rVrIB7y 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)(376002)(346002)(396003)(136003)(39860400002)(36840700001)(40470700004)(46966006)(54906003)(356005)(110136005)(41300700001)(26005)(70586007)(70206006)(81166007)(336012)(7696005)(36756003)(6666004)(86362001)(47076005)(426003)(478600001)(8676002)(316002)(107886003)(186003)(4326008)(2616005)(82310400005)(8936002)(2906002)(40480700001)(5660300002)(40460700003)(82740400003)(83380400001)(36860700001)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2022 20:58:44.0340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff058223-4f5f-46f8-8487-08da6124a50b 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: BN8NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3508 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Add support for PCIe devices with UID > 0xF. This is done by using the next value in the name so PCI5, PC26, etc Signed-off-by: Jeff Brasen --- .../Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 5 ++++- .../Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c index d4c5f47b07..68ecae96be 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c @@ -824,7 +824,10 @@ GeneratePciDevice ( =20 // Write the name of the PCI device. CopyMem (AslName, "PCIx", AML_NAME_SEG_SIZE + 1); - AslName[AML_NAME_SEG_SIZE - 1] =3D AsciiFromHex (Uid); + AslName[AML_NAME_SEG_SIZE - 1] =3D AsciiFromHex (Uid & 0xF); + if (Uid > 0xF) { + AslName[AML_NAME_SEG_SIZE - 2] =3D AsciiFromHex ((Uid >> 4) & 0xF); + } =20 // ASL: Device (PCIx) {} Status =3D AmlCodeGenDevice (AslName, ScopeNode, &PciNode); diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.h index 59a0d601a3..515a3e1785 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.h +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.h @@ -31,7 +31,7 @@ Corresponding changes would be needed to support the Name and UID fields describing the Pci root complexes. */ -#define MAX_PCI_ROOT_COMPLEXES_SUPPORTED 16 +#define MAX_PCI_ROOT_COMPLEXES_SUPPORTED 256 =20 // _SB scope of the AML namespace. #define SB_SCOPE "\\_SB_" --=20 2.25.1