From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.71]) by mx.groups.io with SMTP id smtpd.web11.29118.1585494859678853175 for ; Sun, 29 Mar 2020 08:14:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=O9k6o8iy; spf=pass (domain: arm.com, ip: 40.107.6.71, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8cuqpqrGQYzresOgmd16U6ZSIqX/qs8kXbD8plncGg8=; b=O9k6o8iyL+5LerNTaUYStOOOU/DQB3kMMRlh87I3Gn3m+Hod/ukc/JUZ8P7o+RyYK6FiPDVPPdjmuLUsfJiyGaEluPoKUzBQaLgVVhHqXq4c2r0SwZAhMlqzzA/5hFIrZlqKWsdPKrgNm1v8sAdamZldQXLQWClOa/Z3yDLoVp4= Received: from AM5PR0102CA0011.eurprd01.prod.exchangelabs.com (2603:10a6:206::24) by DB7PR08MB3563.eurprd08.prod.outlook.com (2603:10a6:10:4d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20; Sun, 29 Mar 2020 15:14:16 +0000 Received: from AM5EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:0:cafe::66) by AM5PR0102CA0011.outlook.office365.com (2603:10a6:206::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.18 via Frontend Transport; Sun, 29 Mar 2020 15:14:16 +0000 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=bestguesspass action=none header.from=arm.com; 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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT032.mail.protection.outlook.com (10.152.16.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17 via Frontend Transport; Sun, 29 Mar 2020 15:14:16 +0000 Received: ("Tessian outbound 66307db0259d:v48"); Sun, 29 Mar 2020 15:14:16 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 22592d0bc064360d X-CR-MTA-TID: 64aa7808 Received: from 088483b25b7e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 247C0890-8987-4601-BAFB-4A236620C99F.1; Sun, 29 Mar 2020 15:14:08 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 088483b25b7e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 29 Mar 2020 15:14:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UDzK8uEkr7E4laopzt0MeEPteMLfkd58eXptUYo3WuypzuYN+tz/j4+/zi/2kFPMnCQSDnGx4p156d/z5LJA8/+f6XPuGO9r1Q0aNblu6u5Qc9csmS2ija3+ZJZ2/86zZG2bj+6X+VymxtNhQN1bcyiJIHgI5b1+wG7WzIA1tafz/oE+jm4F7m96M/KLx02FOo7/phJfXfaHTMA5ZWl+pPctn/Za/HwPvazZONOvQ5UoNn2RhaLfQmHa+183v8cGcovRfCo0byqxnKjWuVRGGlcjpZV5psLKM63WXRiAZ2jbAyZcV9Jo0olylAVal8e7QKcH9CKFBYtLECf0DowL9w== 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=8cuqpqrGQYzresOgmd16U6ZSIqX/qs8kXbD8plncGg8=; b=ip9qTEMChMOrxeA/NzCjZXB9i407gqfzxP99VsAyaeuEf5rvfaMmJGCmuDS2HDF1hZ/127BkejMhsGy+aAdzmeV0VCxfBe0bKel+zY3qxUGu+SUBio3c9HJycjnyfFPyu6UomK8DjCnCaG9K8Siz8D+YrnipW+7rNJ7HtsjTdIl067N5ypz59siT9UH2KemrMTC4iuRgX7hZTOOcSd3N1+yaafoDja+BO1NGFfIQFhN9DM4GVa2Y2Y95meQd/4+h0zVrSullzXtz9VV/V7nUxx13OISNnTwLB6kK+MhrcBNghNRWSjOLx4mHzUNPYN3LZ3hX3e8im0+2egac+3grmw== 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=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8cuqpqrGQYzresOgmd16U6ZSIqX/qs8kXbD8plncGg8=; b=O9k6o8iyL+5LerNTaUYStOOOU/DQB3kMMRlh87I3Gn3m+Hod/ukc/JUZ8P7o+RyYK6FiPDVPPdjmuLUsfJiyGaEluPoKUzBQaLgVVhHqXq4c2r0SwZAhMlqzzA/5hFIrZlqKWsdPKrgNm1v8sAdamZldQXLQWClOa/Z3yDLoVp4= Received: from AM4PR0902CA0015.eurprd09.prod.outlook.com (2603:10a6:200:9b::25) by AM6PR08MB3845.eurprd08.prod.outlook.com (2603:10a6:20b:85::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Sun, 29 Mar 2020 15:14:07 +0000 Received: from AM5EUR03FT061.eop-EUR03.prod.protection.outlook.com (2603:10a6:200:9b:cafe::d0) by AM4PR0902CA0015.outlook.office365.com (2603:10a6:200:9b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20 via Frontend Transport; Sun, 29 Mar 2020 15:14:07 +0000 Authentication-Results-Original: 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=bestguesspass 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; Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT061.mail.protection.outlook.com (10.152.16.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2856.17 via Frontend Transport; Sun, 29 Mar 2020 15:14:07 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Sun, 29 Mar 2020 15:14:02 +0000 Received: from E107187.Arm.com (10.57.20.21) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Sun, 29 Mar 2020 15:14:02 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [PATCH v2 10/16] DynamicTablesPkg: Serial debug port initialisation Date: Sun, 29 Mar 2020 16:13:47 +0100 Message-ID: <20200329151353.14096-11-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20200329151353.14096-1-sami.mujawar@arm.com> References: <20200329151353.14096-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant 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;SFTY:;SFS:(10009020)(4636009)(376002)(346002)(136003)(39850400004)(396003)(46966005)(81166006)(81156014)(8676002)(2616005)(70206006)(70586007)(47076004)(966005)(6916009)(478600001)(8936002)(5660300002)(2906002)(7696005)(54906003)(4326008)(44832011)(86362001)(186003)(336012)(36756003)(6666004)(356004)(26005)(82740400003)(426003)(1076003)(316002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f7fd07f6-cd24-43db-d756-08d7d3f3d8c4 X-MS-TrafficTypeDiagnostic: AM6PR08MB3845:|DB7PR08MB3563: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-Forefront-PRVS: 035748864E X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: eUQA5WcmLw/0bIuAZxNm5JZdkpd0w2NERarIzmr9QTp2HoVGPKnBd0jMOBT21iZDsyErnk/54aVzz51eZbnN2rieJ/dg7rCrWnAp5rNX8U45dIMtjVD/zJU84Id8BiB50Z0OPHSD46MUOKk6rz2iVCVda1l3OCWFNYyUaG57fubJHIB6m4HAhJE6VqBIPFbnB8PjMJNC/EKp7IOPpw1Ml61+wfjMVamr/vqTqti4ryZ2dmPpcyWVfJVDD1meokxzWf3zftI/w8Xx0eOWmFtPncI5dQnx9qjy6cVvgcvlKztGgrkNMbgedAxSs87V8/m0Q+UTO7IhRRnqck3WLtnQlfYmxT+Yh0kfzfJVmAOJv+wV9kGbCm23yYsKNNhrmZ2JPOGsCOo8WcxPoRi27Q6hKN42sJQ5nAftWgaKG/q9yQSJFKCPk2qvlQedVG6tIiG6gEzNaEb41YDVBaeMF9WoAERPb/SSmYM2Sgw4ml43Ggaba2RYPQSEG8Zg+PXu1YI7us0jP4CK7kYmkWBOlEZwAlHdiKSuromghutLcrtZa9QUKgaLxI6OEcKzfyKQ1kBaO1fBM+a6mrNpp0/iIbK1hLYMeSYNJ11Tm8al56AAu1k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3845 Original-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=bestguesspass action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT032.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(10009020)(4636009)(39850400004)(136003)(346002)(396003)(376002)(46966005)(6666004)(6916009)(81156014)(81166006)(8676002)(966005)(82740400003)(47076004)(478600001)(26826003)(36906005)(54906003)(316002)(70206006)(70586007)(44832011)(5660300002)(2616005)(336012)(7696005)(4326008)(186003)(426003)(86362001)(1076003)(26005)(8936002)(2906002)(36756003);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 6683e4cb-ad8c-4c67-7916-08d7d3f3d38b X-Forefront-PRVS: 035748864E X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Are8c8w5YNpCVWs7eZVWFm1GnjbO2V3mOA6Y0+Aym7ob59NuoxcMHrvTUK0DPqjNs9WlHgZvFlqB6quAKe153FNu6OS8MCA5TbR3cFjaCZM4bRMiVi9YF2lRQRugk+w5QnNmmegN5YxQU+cOB7ZhG6GWZR50cfB//KgXlDBENqtnrUGsM15OZI80oJK9UgOMlSPKEzTZqEEP7SLSyxHR97UWCLoT6X4S79giQkqoxLE9eN7GKYyMqBdREUHR3n5Sh3AWpPYAarl6ov+JE5t6aZVbUZW8LbIGHPOaAURnIiNZRWKNFfLnvEoc3Bhe3DJxNgKhu+qEIA4dC4HqK/HvlmUzesL1fO1MY67QZ1n0x9e82s2b5nhRfszPBSI21TBpFgJ0PnFDNqep0B29enTnayHbz+gzD8JT/l5q98djVwxM2T3cPntUAi+7pArUpbEwIeHrt0cTvEVyZs3g+3O3qvweNm+pMXyuoSzrWVzqA8K+xV1O35CSJpVnORo5b9BZwTeCwJwS5KHYdmAMWZTq5XmZOZV2t2dCc++VQF80ZUXrQs2BxPt7iZ4NcujsUT2mAV4V3SPiIxuy1eBzMS4PZSokTO6lRyLrjA5gBwxLhHo= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2020 15:14:16.2936 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f7fd07f6-cd24-43db-d756-08d7d3f3d8c4 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3563 Content-Type: text/plain The ARM DCC serial port subtype is an option that is supported by the DBG2 generator. However, the serial port initialisation should only be done for PL011/SBSA compatible UARTs. Add check to conditionally initialise the serial port. Signed-off-by: Sami Mujawar Reviewed-by: Alexei Fedorov Reviewed-by: Philippe Mathieu-Daude --- Notes: v2: Splitting patch series and re-submitting DynamicTablesPkg [SAMI] patches from https://edk2.groups.io/g/devel/message/46261 DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c | 27 ++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c index 346ab5b22f5402bf87c385558f68f080d1b454ed..51c843d25f75388104694855ce133b3d61860196 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c @@ -175,7 +175,7 @@ GET_OBJECT_LIST ( CM_ARM_SERIAL_PORT_INFO ); -/** Initialize the PL011 UART with the parameters obtained from +/** Initialize the PL011/SBSA UART with the parameters obtained from the Configuration Manager. @param [in] SerialPortInfo Pointer to the Serial Port Information. @@ -353,15 +353,22 @@ BuildDbg2Table ( AcpiDbg2.Dbg2DeviceInfo[DBG_PORT_INDEX_PORT1].Dbg2Device.PortSubtype = SerialPortInfo->PortSubtype; - // Initialize the serial port - Status = SetupDebugUart (SerialPortInfo); - if (EFI_ERROR (Status)) { - DEBUG (( - DEBUG_ERROR, - "ERROR: DBG2: Failed to configure debug serial port. Status = %r\n", - Status - )); - goto error_handler; + if ((SerialPortInfo->PortSubtype == + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART) || + (SerialPortInfo->PortSubtype == + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART_2X) || + (SerialPortInfo->PortSubtype == + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_SBSA_GENERIC_UART)) { + // Initialize the serial port + Status = SetupDebugUart (SerialPortInfo); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: DBG2: Failed to configure debug serial port. Status = %r\n", + Status + )); + goto error_handler; + } } *Table = (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiDbg2; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'