From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=rsF3xYjv; spf=pass (domain: arm.com, ip: 40.107.5.50, mailfrom: sami.mujawar@arm.com) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.50]) by groups.io with SMTP; Fri, 23 Aug 2019 03:57:40 -0700 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=4+rvSQbYeyJsY+M8b1t1C+VkcWcbyH022NXW+CikVpQ=; b=rsF3xYjvK3TA5umZzxViQ3Ue+CfdqenLb5/WdTcKw0eFBt2Lq/Hl0OHfR6E6tc73dfIxkkE6vKmkIudKBPidj8QwuwKAOmuEJF2XcKiPtCZlkEW0kmYj9A4JgWNTW6VGVRNmRmNBuIiQdE9sIM4hynz2wJYMtDU8Z0x4VQI0vO4= Received: from VI1PR08CA0184.eurprd08.prod.outlook.com (2603:10a6:800:d2::14) by AM6PR08MB4949.eurprd08.prod.outlook.com (2603:10a6:20b:ee::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2178.16; Fri, 23 Aug 2019 10:57:35 +0000 Received: from DB5EUR03FT019.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by VI1PR08CA0184.outlook.office365.com (2603:10a6:800:d2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.14 via Frontend Transport; Fri, 23 Aug 2019 10:57:35 +0000 Authentication-Results: spf=temperror (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=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT019.mail.protection.outlook.com (10.152.20.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:34 +0000 Received: ("Tessian outbound 85b7b0590c81:v27"); Fri, 23 Aug 2019 10:57:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d5924438099b6406 X-CR-MTA-TID: 64aa7808 Received: from d44c109efaad.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.0.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3EA597D4-A2F9-4504-8FEF-65779A3ABD31.1; Fri, 23 Aug 2019 10:57:31 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2052.outbound.protection.outlook.com [104.47.0.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d44c109efaad.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Fri, 23 Aug 2019 10:57:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MVOVfCTW5HcQlZm1F6sBtwf/S1z/529a65aRUAhaX78Sxz4Pt1qo4SqP6RvujPiwvKHzeudzbwMcAdeI6PDCXJ1Jw87zEq742UHjPA9ag4l/qgbOu1yA2779RduJ7kM3jyFoohwNcT8dFnbtaDMqUQ7+/DNEbnPhnChgkWHtffY51mGZJ2TKV2WQbqWM0HfTdOb6GUdmJLfn3cMNMn0+y4oog2R6b28LoX0vaHLOi2I5nk8SaJIOSJAPvH6aVaGwQRkMBC5TtyBT7RzAAZYkCFPB2X9QT+/QpgE6n1iGiGAuLim8LcGWxrdubHfeiFnApF58N/loDzFkvXB+ff48cQ== 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=4+rvSQbYeyJsY+M8b1t1C+VkcWcbyH022NXW+CikVpQ=; b=D+1bib+c9DNLqWdd2Nd9uJAsQbXsbTrqGQ3zTTKxQqwcjtA89DY/keS0bUCaI9GLHFmlY3Xh7W+miVBYbWGO2yWfssN7qKJZDiiNIMdKed1ANSG8h6drE+7obiOXWupe9C6fICYIdxf5jcK5E184FknEodvETah4v4oLlz5X7iaRIu/aAS4rRqm5XyC0HEwlAnrUZEymqs+Difr8UfoMR1f0ZRrFKQ0KDaVXKb6ydsS7q7c6cGjrDeukE5JN4tbkDHorXnwy3QJs13AsoPrXJI/GHcSAw/y3tb2svDAOVSGSTk9+5qb75jNm2lWAAXbdeE+CuUGEjjZacILneTIrkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=temperror (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=temperror 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=4+rvSQbYeyJsY+M8b1t1C+VkcWcbyH022NXW+CikVpQ=; b=rsF3xYjvK3TA5umZzxViQ3Ue+CfdqenLb5/WdTcKw0eFBt2Lq/Hl0OHfR6E6tc73dfIxkkE6vKmkIudKBPidj8QwuwKAOmuEJF2XcKiPtCZlkEW0kmYj9A4JgWNTW6VGVRNmRmNBuIiQdE9sIM4hynz2wJYMtDU8Z0x4VQI0vO4= Received: from DB7PR08CA0029.eurprd08.prod.outlook.com (2603:10a6:5:16::42) by AM0PR08MB4948.eurprd08.prod.outlook.com (2603:10a6:208:163::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.19; Fri, 23 Aug 2019 10:57:29 +0000 Received: from AM5EUR03FT015.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::207) by DB7PR08CA0029.outlook.office365.com (2603:10a6:5:16::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2199.17 via Frontend Transport; Fri, 23 Aug 2019 10:57:29 +0000 Authentication-Results-Original: spf=temperror (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=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT015.mail.protection.outlook.com (10.152.16.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2199.13 via Frontend Transport; Fri, 23 Aug 2019 10:57:27 +0000 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.1415.2; Fri, 23 Aug 2019 10:56:27 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.1415.2; Fri, 23 Aug 2019 10:56:22 +0000 Received: from E107187.Arm.com (10.1.195.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 23 Aug 2019 10:56:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [PATCH v1 10/19] DynamicTablesPkg: Serial debug port initialisation Date: Fri, 23 Aug 2019 11:55:30 +0100 Message-ID: <20190823105539.13260-11-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20190823105539.13260-1-sami.mujawar@arm.com> References: <20190823105539.13260-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;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(136003)(39860400002)(376002)(346002)(2980300002)(199004)(189003)(446003)(336012)(426003)(63350400001)(63370400001)(186003)(1076003)(44832011)(53416004)(486006)(70586007)(6666004)(11346002)(2616005)(36756003)(126002)(356004)(476003)(70206006)(2351001)(2906002)(16586007)(51416003)(26005)(76176011)(54906003)(316002)(8676002)(7696005)(6916009)(86362001)(5660300002)(50466002)(48376002)(47776003)(305945005)(53936002)(8936002)(4326008)(50226002)(478600001)(81166006)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR08MB4948;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03ca78f8-d188-4ec3-f6ff-08d727b8b3d5 X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328);SRVR:AM0PR08MB4948; X-MS-TrafficTypeDiagnostic: AM0PR08MB4948:|AM6PR08MB4949: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-Forefront-PRVS: 0138CD935C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: sxDaDXmiXHOo6dY0TqBM8Bm17E+e1DG6PSU48+sKoGcwkvh10KTgOSda1hNAaDDxZ6+QcVYXu+kp/nh5Oje6KofjlMSGa5EuAK+7A6pe+8ICztVSLSfjCPcHZidOlR2eemyb8ghPncWwxWL73nLafcvFOCQUc5ffuzG0qOkb9aj8f5+ioLbvzT4mVvs34OOfYXfHIUSYfQFpzsGfoSo6L3ySnkgMP8dOhEmRj951GjK201w95x+ZQH27lp/ZBkxTrJR/83AUPdD8ZpZ3Lcmlu2r02KanudsXJQJ5uQn7x8UaN461u4jAKmrQiqqAVjEtPa1jcoRdEmcJbWv8cDUalhwSvlRq96DDNkYajE5dUs5cIhzqmt6wuf9FzGxeA3JcbBN0zjVSRMtztKl6nc9wMyuZlNxmJhMzn2LlpYaM2gc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4948 Original-Authentication-Results: spf=temperror (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=temperror action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT019.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;IPV:CAL;SCL:-1;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(346002)(39860400002)(396003)(376002)(136003)(2980300002)(199004)(189003)(16586007)(4326008)(26005)(486006)(6916009)(54906003)(53416004)(76176011)(6666004)(44832011)(86362001)(22756006)(2351001)(1076003)(76130400001)(47776003)(478600001)(51416003)(26826003)(7696005)(316002)(2616005)(336012)(70586007)(126002)(476003)(446003)(48376002)(50466002)(5660300002)(186003)(2906002)(305945005)(11346002)(8936002)(50226002)(8676002)(63350400001)(426003)(81166006)(81156014)(63370400001)(70206006)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR08MB4949;H:64aa7808-outbound-1.mta.getcheckrecipient.com;FPR:;SPF:TempError;LANG:en;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;A:1;MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 4851f880-f5b3-4a9d-a1c8-08d727b8afb8 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(710020)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328);SRVR:AM6PR08MB4949; NoDisclaimer: True X-Forefront-PRVS: 0138CD935C X-Microsoft-Antispam-Message-Info: Mwzr0OY7HwdglsajGN7DOuh4/lk//DVN7a0VSYj3xZpAtnGs6KIYHY/NciuV66aMR2fZGKKDlVjaUa+vcbXB+eNqXM3vkAOVnxCeLkRYOF2MwR2gIpbzCzmFFfaFiEje/4luSLgEHG0r1VK+RFGRNp7ownFXiLboLcEHCJ0kqnlYm228TOcXlPJUepCqEBKxzlvNz5yRSC3c/1ZZYmafC3xseLE4qRYIRcXViPX4A58ynC5VIMZ+OwmT21emSbn3abRWMW7GOnsARQK5MLAbkpsOyOvrG72bavo6CnNv1u/Z4pZ/GMU2htJbqq9elFxQ4N0PE+efyB0fzBVukRLCyfHcIgBhooXL4kWBJEWPg2xK/typ+BtVMEIRYLRnK4LlNHw0MunUi+WOZ22eC3R2U5Y1qvVn+lBN+KDsQQnhSME= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2019 10:57:34.0273 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 03ca78f8-d188-4ec3-f6ff-08d727b8b3d5 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: AM6PR08MB4949 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 --- 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)'