From nobody Tue Feb 10 14:32:43 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70679+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1611319906314565.059480710263; Fri, 22 Jan 2021 04:51:46 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id AjIPYY1788612x9tt6fJtGAK; Fri, 22 Jan 2021 04:51:45 -0800 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.46]) by mx.groups.io with SMTP id smtpd.web08.8503.1611319905198808224 for ; Fri, 22 Jan 2021 04:51:45 -0800 X-Received: from DB6PR07CA0184.eurprd07.prod.outlook.com (2603:10a6:6:42::14) by DB6PR08MB2869.eurprd08.prod.outlook.com (2603:10a6:6:22::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.12; Fri, 22 Jan 2021 12:51:41 +0000 X-Received: from DB5EUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:42:cafe::de) by DB6PR07CA0184.outlook.office365.com (2603:10a6:6:42::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.5 via Frontend Transport; Fri, 22 Jan 2021 12:51:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70679+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT023.mail.protection.outlook.com (10.152.20.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Fri, 22 Jan 2021 12:51:41 +0000 X-Received: ("Tessian outbound f362b81824dc:v71"); Fri, 22 Jan 2021 12:51:41 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 173c3a9de8641961 X-CR-MTA-TID: 64aa7808 X-Received: from b7d188580363.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1CFCE841-1F96-49F5-8FD9-C8B250B80CBC.1; Fri, 22 Jan 2021 12:51:36 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b7d188580363.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 22 Jan 2021 12:51:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AjYcd/rtbCCRQQfaFiI3Ssn7FXKI+Q5U7a92a5QMmo8pIqC0pm7rhcuwnoOhfo5rNNNq4j+ZKyDIiZ1Tn/eS/8s+ZEsbAJlsA9rxgjLeu4JqRu/OibVJkMRFr/DbtIssfyJLSBIQy+QTqF6n4eke0aDuecyWM6xUo/vTjQM9OFh6ZOwcsgAQQlFr8AfWuu7GfOqXb7699KO05OatI3JBcPiOsveBOHG8iC6eoH/uNl0vMhrJW4sp8aG9bij8pHKZAuEIok3wk2C0k8bCNb5dF9d80teUmTNY8JeDVWbgaDMQPOn5oTp45J2Bi1Ac5R9xrBjbO1nQ46LgeHBSkjTysQ== 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-SenderADCheck; bh=lUekSOFN+fAq4WPBHJRzxKz0VjgsqD6uMds2yx9LVfc=; b=XxmSufRl0wNOfzCb7ainnKL1dAz+c9SKd//RIxo0pxXNdnwfEfLSLapL8iztBfHBbWR3qAoXqmi2hiUXnpAi+GNZI7QaELK45JY9yhXFmkaRsDK1YjnZZIMoEQoZyUcd2x/lyPWxD940D/Z8ZkP5TOgGYCkC0h/Jde4wh3Dj1ypkE8MUzwg8uRh2TqC66Yvw3TZXWcwaephwvg81Gfw+Vpm3w/q6NbqKIEC8KIAfYrW4MK5DilNZwSOQWUlvYZ9RG6zsfkYD8N219rMb6Ywa3GpAozP2lmC2Qp2wJGN4MlWbykvOkc2kcwCTHHeGy6E2g1zbNAVM6JaIOKafGLYrmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none X-Received: from DB6PR07CA0006.eurprd07.prod.outlook.com (2603:10a6:6:2d::16) by PA4PR08MB5935.eurprd08.prod.outlook.com (2603:10a6:102:e4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Fri, 22 Jan 2021 12:51:33 +0000 X-Received: from DB5EUR03FT019.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2d:cafe::58) by DB6PR07CA0006.outlook.office365.com (2603:10a6:6:2d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.6 via Frontend Transport; Fri, 22 Jan 2021 12:51:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; X-Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT019.mail.protection.outlook.com (10.152.20.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3784.11 via Frontend Transport; Fri, 22 Jan 2021 12:51:33 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Fri, 22 Jan 2021 12:51:14 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Fri, 22 Jan 2021 12:51:13 +0000 X-Received: from e124191.cambridge.arm.com (10.11.7.12) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Fri, 22 Jan 2021 12:51:13 +0000 From: "Joey Gouly" To: CC: , , , , , , Subject: [edk2-devel] [PATCH v2 2/2] DynamicTablesPkg: Add an override for 16550 HID in SSDT Date: Fri, 22 Jan 2021 12:51:12 +0000 Message-ID: <20210122125112.4705-3-joey.gouly@arm.com> In-Reply-To: <20210122125112.4705-1-joey.gouly@arm.com> References: <20210122125112.4705-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e2802ec-419b-4773-8f23-08d8bed47741 X-MS-TrafficTypeDiagnostic: PA4PR08MB5935:|DB6PR08MB2869: X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:4303;OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: zXFKvsjV7AisPYTdlS+mV4vNG+Vtrs4pgegyBeQT5DIuQBCy13ZC5C9Qdd0/U1UQ5x32A01CYaNV/smzFYqtEAmYryck6p5Td+S8yoAHtLjVh3LOZEWHONccPKuBflafs6LuFzr4HjF8Z5yEJV1R9VQQ9SpN7JJnFfsSmM7o+w45JhJ9fpGveFR6ZPD9o9R+GYm964eJ1pzybgSLyM9bs/eggI6f8ChaGdW2kz13R0feQVCXL4ikTSMgUu8iuDtt9oGYLhuNIoQmfdreoeG7NSLo9kHlD2KoDRCwnvpvg7gvJa5f5mSu5WbWlxOrDZJ/HI0OiSNhCYago8zp26WQixy1CPxdz92jJkIZ+ETqBS9p8V8Sh19Nfwoj7XAFd1JRICcgAzi9LuHqyDsc7D4e5cuUd2ymMPinFcRnGZmuW7HYFo2NhYi6KcvCVMVygqcbgvgDrIc21hDnvX+0N4WfnUMAQTyxxTA0iuxl29eAFhz3X3dleHUB1J6NfzyP5kz5rF/8vP2kbXQlsZltTBrvhk5UaRExA8w5XkOt2NjirDaix7f3STLcb9wQ3+waCZk5S/wNpgCLxbMdf206nERpFSBVPYIoaT7RzrP9en+qPxgubxfTPlNmJsgbK2mnlGfr X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(4636009)(376002)(39860400002)(136003)(396003)(346002)(46966006)(356005)(1076003)(2616005)(83380400001)(8936002)(316002)(47076005)(81166007)(86362001)(70206006)(186003)(70586007)(478600001)(8676002)(336012)(54906003)(26005)(6916009)(82740400003)(82310400003)(19627235002)(426003)(44832011)(36756003)(2906002)(4326008)(5660300002)(7696005)(36610700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB5935 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 807ecd7f-e21f-4ca7-c49a-08d8bed47279 X-Microsoft-Antispam-Message-Info: g2jkw+BOxZNAavCHEGcPf8X7qsISTGYqFm0le8uTS+pAJqDJceQ3R4uP6QrUF+uJveTJRK9KQ6v0lCw36uXSfSgNiZkcxcO6vUUqPFNtNvBiNqJc05hSYR44WSsKdk/SzRjqvGs0nhQL7PMxTSSCtlYt1bKi/Tlq+oNk8SFlOIQVAvAdlziEdhGUreP/DjYLbW1mFVUSr8Lv8CsRphtIGs3CoQIGGDl6SFHvxnOaRWJOHWAD2HeS2tnXAJ35IOg3Tu8vVJRXNcihnav2BPBTyOpan2KwhVo74YLm3yCyDYDOoPvDCgbSeaIyMu2eqtu0kwBy/AvGBF/0FCUo6gJUpN+y1DVdZv8g9AKlOIrYbpyOV/Tu1qdgzSb1glgjG76LyiNeFBSVrbc/yL5Px7MYm6BHHuJ4nnqdb7yvEIb4M+70z+RSJPAuyMDDh0mewLTAMeJ9VQA4yLU95yBnwII7Um8XBUKd8VnNjgOfPI7/qFzXVtPosD8sSX+M6PSlK4tlxyCgRzbTHxWtTGqN6N7foAP16wMUjEkGuvWx/rpgRActen7qu2A30jIdhB7qjpKYF2zqouECt5qt02T8gU/DwGwMbnNqQtbpbmvDKaRkYww= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2021 12:51:41.5984 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e2802ec-419b-4773-8f23-08d8bed47741 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2869 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,joey.gouly@arm.com X-Gm-Message-State: I0NlTq3R7m8HbABHZqr86lNnx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1611319905; bh=B8uK2tOugtjwEVbC1L+nro+CBIjpqU3+8c97I4PRZ1s=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=a3Cmb4G5D8Y1r830x8BDtB+E8pE0nOURooXnK1PhFs/xaon6gkQTrgF8Oxgk6A4BbK7 gMp2Ce8y1zLmXOSuptrv4aye8KNZ7dylQrbvqXAtDrZ2UY0zx0n4YdMufp9qoICjnQ5Zq /ik14y5FQc396z2/lEC2H8Nt8qq/qZ5KPWE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some platforms advertise support for a 16550 UART, but are not compatible with the PNP0500 HID. Allow them to override the HID by setting PcdNonBsaCompliant16550SerialHid. Signed-off-by: Joey Gouly Reviewed-by: Alexei Fedorov --- DynamicTablesPkg/DynamicTablesPkg.dec = | 3 +++ DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixup= Lib.inf | 4 +++- DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixup= Lib.c | 14 +++++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/DynamicTablesPkg/DynamicTablesPkg.dec b/DynamicTablesPkg/Dynam= icTablesPkg.dec index 291a45a69679ae82219ecd2f26dfabfbab1f7f65..b242df01058729ce74d40c1fcf9= 31acc3bc66fa5 100644 --- a/DynamicTablesPkg/DynamicTablesPkg.dec +++ b/DynamicTablesPkg/DynamicTablesPkg.dec @@ -44,5 +44,8 @@ [PcdsFixedAtBuild] # Maximum number of Custom DT Generators gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdMaxCustomDTGenerators|1|UINT16|0= xC0000003 =20 + # Non BSA Compliant 16550 Serial HID + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdNonBsaCompliant16550SerialHid|""= |VOID*|0x40000008 + [Guids] gEdkiiDynamicTablesPkgTokenSpaceGuid =3D { 0xab226e66, 0x31d8, 0x4613, {= 0x87, 0x9d, 0xd2, 0xfa, 0xb6, 0x10, 0x26, 0x3c } } diff --git a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSer= ialPortFixupLib.inf b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLi= b/SsdtSerialPortFixupLib.inf index af3d404393f5f1385ab2d40f45f7222ab66f9b3a..54bf71a3b73949a9c834445a81b= dade02d49e9d3 100644 --- a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPort= FixupLib.inf +++ b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPort= FixupLib.inf @@ -1,7 +1,7 @@ ## @file # SSDT Serial Port fixup Library # -# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent ## @@ -28,3 +28,5 @@ [LibraryClasses] AmlLib BaseLib =20 +[Pcd] + gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdNonBsaCompliant16550SerialHid diff --git a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSer= ialPortFixupLib.c b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/= SsdtSerialPortFixupLib.c index 0ff071485ef25f4ca63de0eeab5120d1beece4db..3c4356097c3bf25e8d1432b45ba= 8ca59d33e8d09 100644 --- a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPort= FixupLib.c +++ b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPort= FixupLib.c @@ -1,7 +1,7 @@ /** @file SSDT Serial Port Fixup Library. =20 - Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.
+ Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -139,13 +139,21 @@ FixupIds ( AML_OBJECT_NODE_HANDLE NameOpIdNode; CONST CHAR8 * HidString; CONST CHAR8 * CidString; + CONST CHAR8 * NonBsaHid; =20 // Get the _CID and _HID value to write. switch (SerialPortInfo->PortSubtype) { case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550: { - HidString =3D "PNP0501"; - CidString =3D "PNP0500"; + // If there is a non-BSA compliant HID, use that. + NonBsaHid =3D (CONST CHAR8*)PcdGetPtr (PcdNonBsaCompliant16550Serial= Hid); + if ((NonBsaHid !=3D NULL) && (AsciiStrLen (NonBsaHid) !=3D 0)) { + HidString =3D NonBsaHid; + CidString =3D ""; + } else { + HidString =3D "PNP0501"; + CidString =3D "PNP0500"; + } break; } case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART: --=20 Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#70679): https://edk2.groups.io/g/devel/message/70679 Mute This Topic: https://groups.io/mt/80029091/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-