From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.64]) by mx.groups.io with SMTP id smtpd.web08.26786.1656604141319588818 for ; Thu, 30 Jun 2022 08:49:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=EhpgS60n; 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.243.64, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cEbuazgeN0RcQ5Danhy1TPk0QGo5HvbOXE5y/JDOkveVobC2fpA9YHUmWu4CEY9pPi6paprYnRpFHIabfjf0r0KdiSCsOuwnYF9o+Z6vXaZCCdpTrBvbR3Vf0D7Zgeh4f82DKsGskwvwCzFp9bELikhC5bSA1u8YisUwyOd0X+XpK3N4VFbBTfZs9TLwAdUC3EIbHl8fjeK6QqvsHjs/FwP1PZGJpMuQw85RO6Wgb3eXNQqiI0CRY1eihCWIs8iVPzb1Wmxlfikwbm9KTNiy3MCNh6pGXe5kwO/1WWTYZzkEcAFF+nGZA52bL4So/SgjzD7g9xvnL6HK6ygLU1g8tA== 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=p972YgBT388mbKHUKJsPHcADe7kmuvQq4l9rpeZqExU=; b=M5NW+7ZZg/QCo43fh7Q5vwiNpE1eDwH74PVc32KPLnWE7e7AFZlSwQj7bNPx9Gyb3BiR2yDzTnwXUQW8fIGajAymfgG4Nk1Y5LZm24hu5L7PKzs5dDUH6sOaXBV2ThP6sh9arnykFufleLHhQ6rOcsBjaJCEdkbDwVdn+HW5CTLDhtLXk5ZMV+doa8m1Aw00g0BXQzrT8RlAdJMydY6C/vMOwiMJUCkAeVEwOH78XFnuxSstvKKAFihq+CgESY2dMBGAC6hv8PI1J5gdAOqba5ldLNu8YrPx72nq4Q+zUhmjIRBTf0ddDkrBwVTF34MkJZsP8dZdMPInOY24dVpLbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) 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=p972YgBT388mbKHUKJsPHcADe7kmuvQq4l9rpeZqExU=; b=EhpgS60n83vLRfn82d/AXxCvMgdTUrwjSEmviAqKU9jsjka7wqbRyW2V1F8VE9wU9OmLL0jcWJ3PpvT0FfGe0obXe1B976TsRIX4olM2d72IDNhNYO37LlPle6cQvBmBvnIz16aUluf9uU8/OJFXMVPpwVnVwe4wfUAmjpgHeQXnHNGVGoR1VVDsNmvNafDOG2GyU3QufqCQYI9ypXfEffVrvqjLDKuiTnhu/SCY/warwPwrGiIAMoi7RwF71iJuiOq9n09G620Wva+A5gMa6eRxG/gVNrVW4w5dKvHJRfOkp+RCCZMSxTDxPc4RX0bMpvmM6MyYpUkxah4YDf2Lkw== Received: from BN9PR03CA0954.namprd03.prod.outlook.com (2603:10b6:408:108::29) by BYAPR12MB3479.namprd12.prod.outlook.com (2603:10b6:a03:dc::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Thu, 30 Jun 2022 15:48:58 +0000 Received: from BN8NAM11FT024.eop-nam11.prod.protection.outlook.com (2603:10b6:408:108:cafe::1a) by BN9PR03CA0954.outlook.office365.com (2603:10b6:408:108::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15 via Frontend Transport; Thu, 30 Jun 2022 15:48:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by BN8NAM11FT024.mail.protection.outlook.com (10.13.177.38) 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:57 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by DRHQMAIL109.nvidia.com (10.27.9.19) 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 drhqmail201.nvidia.com (10.126.190.180) 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:55 -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 3/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Support UID > 0xF Date: Thu, 30 Jun 2022 09:48:50 -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: e4e5f739-6b44-4167-8ab3-08da5ab00b8e X-MS-TrafficTypeDiagnostic: BYAPR12MB3479:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RG83YPUDNIoaFjCMU9vE0a3N5vvUvV6qd/9FYazIvbXRhun1bt7aZN7eejGRU7cjFymCfrBhBdqIUUUA8bImjFoNILk+w2PZVO8RBBCf5vOf9MfQmExmOI4xsObQQuNVuvYWW990NsPW6onjYBK+yu9PHk7LGB7k3aaUl34d7EZkwUoYzhTGetDrqMN3hx1xYpOmSNEHYKUV2SkybRILRQJzvlv+lL+2KUqcnQ4KuE33/ZWx2yybYmihl0Ugi/fApQY3pUgdR4rztFBfuEVAPlEESraKWfbvKZjX55keeX10bQjVne0Z4+OymuYg9q/UEqw6RJis2IEc9Kn50eMlZ9gmheVIIG/otHvVKDhZuPsssU12ctuCfFkmdncIOgf9Y1UM39wl+qTqkV3vRw85En9zd924/tHXl084n4E6CAFD2bIHg9kQmu6sGQaE8UktVEwg2XrUDCPw5MX1F9yVyqWkmMvLCc0jxHgvq52RA30ybf9QQRiXSqQNnlndUQouPXkgssbURDVlBME2Zsxh8bihB9yOvc0cubOC9DuYYY4vD+7993QRSKb/LSWwHZeTU7jVJweYtpVa0aFPSD55AAQUSoAEN9dMnz+yrWo2/VM3rC/rNDGyY8qm01giKek+B8xYkXYZWt7vgA2yl/QxJfcFt5TixDl0Kxionav1HHE0+Q4GFuoqLJjfcohy+6OvFxAtW9EXKlXeBa+iPnxE5RIRRDDo3Z0rvHRpssm43kzjlFdAV6rbulN/GIN+jFK3KQ0Rrtcr+gm1hhb11Sw/M8up4FBl5ZuynSWaF5gii7NhKRPH1fkF5Gv97PrZyh6QJaDEgNdiBzJJOV8Y8AXiHJFSr9UxLannAAjNwWpBpn4P83pf0B8ECV+XQaVoYrKd X-Forefront-Antispam-Report: CIP:12.22.5.236;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230016)(4636009)(376002)(396003)(136003)(39860400002)(346002)(36840700001)(40470700004)(46966006)(36756003)(186003)(478600001)(82740400003)(336012)(6666004)(107886003)(40460700003)(70206006)(5660300002)(8676002)(70586007)(356005)(7696005)(316002)(8936002)(81166007)(82310400005)(86362001)(2906002)(54906003)(6916009)(2616005)(426003)(36860700001)(47076005)(4326008)(26005)(83380400001)(41300700001)(40480700001)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2022 15:48:57.9106 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e4e5f739-6b44-4167-8ab3-08da5ab00b8e 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.236];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT024.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3479 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Add support for PCIe devices with UID > 0xF.=0D This is done by using the next value in the name so=0D PCI5, PC26, etc=0D =0D Signed-off-by: Jeff Brasen =0D ---=0D .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 11 +++++++----=0D .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.h | 2 +-=0D 2 files changed, 8 insertions(+), 5 deletions(-)=0D =0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.c=0D index 85782af380..c5b23d91d0 100644=0D --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.c=0D @@ -818,7 +818,10 @@ GeneratePciDevice (=0D =0D // Write the name of the PCI device.=0D CopyMem (AslName, "PCIx", AML_NAME_SEG_SIZE + 1);=0D - AslName[AML_NAME_SEG_SIZE - 1] =3D AsciiFromHex (Uid);=0D + AslName[AML_NAME_SEG_SIZE - 1] =3D AsciiFromHex (Uid & 0xF);=0D + if (Uid > 0xF) {=0D + AslName[AML_NAME_SEG_SIZE - 2] =3D AsciiFromHex ((Uid >> 4) & 0xF);=0D + }=0D =0D // ASL: Device (PCIx) {}=0D Status =3D AmlCodeGenDevice (AslName, ScopeNode, &PciNode);=0D @@ -1054,13 +1057,13 @@ BuildSsdtPciTableEx (=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 + if (Uid >=3D 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 + " Greater than maximum supported value =3D %d.\n",=0D Uid,=0D - MAX_PCI_ROOT_COMPLEXES_SUPPORTED=0D + MAX_PCI_ROOT_COMPLEXES_SUPPORTED - 1=0D ));=0D return EFI_INVALID_PARAMETER;=0D }=0D diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieG= enerator.h=0D index 59a0d601a3..515a3e1785 100644=0D --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.h=0D +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerato= r.h=0D @@ -31,7 +31,7 @@=0D Corresponding changes would be needed to support the Name and=0D UID fields describing the Pci root complexes.=0D */=0D -#define MAX_PCI_ROOT_COMPLEXES_SUPPORTED 16=0D +#define MAX_PCI_ROOT_COMPLEXES_SUPPORTED 256=0D =0D // _SB scope of the AML namespace.=0D #define SB_SCOPE "\\_SB_"=0D -- =0D 2.25.1=0D =0D