Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79B40C433EF for ; Thu, 14 Oct 2021 07:15:09 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6DE16610EA for ; Thu, 14 Oct 2021 07:15:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6DE16610EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 93BA983639; Thu, 14 Oct 2021 09:15:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="Aj2ZZ7jJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 26B1583639; Thu, 14 Oct 2021 09:15:03 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e83::61c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 55B5383619 for ; Thu, 14 Oct 2021 09:14:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michals@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aZcwMX5eGS3vEN+FkHgW98qItPQoozC9/mIU2rSPZYjO96YFRFF1Wkk6gGKpdkALij0ci/LOaBgz745w/+7kO9/F2yKGjon2K951dBOdhI1QEHqownEch4x8rc7BI6+v7S5K1P/xEmpeofz5CBU4xAijjGFqBflz5Qh6ESoff2INUkmBFUk939/KGZdoPFHjfXYsnxVq9uQfUPuLBIo7Sd7NsUnFxej4ktdk1pcfnTb73ZLu82aJajiRr17TbyxajkH9vKH6mwe0WyMpVQk06u1HIC6haqz+oyVeYrERmTkqS0WAqhX9dXbP1qsdyAw8b7iFPUFu0nO09yDRNgDy6Q== 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=Jc7MbP+SlQUTgaEtPt9+CvXk6xc3ivnb13gFpQvE2Ls=; b=JkzMOCcMSIf2nze0WxmxWysnUvXo4Sa1+h91H9wy66r0lJaeeLHdX7wWPB5s07UWQaZtCOtM/JeZgvj5yJGDQngwxgigNdSOvi4sggAQSWI4Sd6Kt514QFzSOsDO+Ltr+iOYtb7IR8YxZsnQ1gT9VNjMzAJK1+M8vHYj33wTi17qBrngCa4fUq8Ku9uXKm0LhnI10RkYJxSDOdpnhrvYWtACvwwyRdYP594a1LqC8J4xg0XCJ6yUPu1TMXYPEjQnyfTwLBFa9AxFTBC3afuUi/ppXHyr23Pkz5R5ybAtxCXhzbOOKKa1Sudgn4EaNyHBZnOTHIMwj33i4tca86l4Zw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=foundries.io smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jc7MbP+SlQUTgaEtPt9+CvXk6xc3ivnb13gFpQvE2Ls=; b=Aj2ZZ7jJBcd1sUrkahvBq/OqIloGH/SvkgQhcNkI75lt+zmu+dbZ8knzvaq/YJ9/qtKV/fBYKrNgNKDvgEyNlLQh9fG0wPi4exaOMpeGaHbpDZ+kz0tJLtrSIfYJkryHz590dcuq4fALWSVWvtE0y4t4YqwX02ZVAbaxkZOkjhc= Received: from BN9PR03CA0369.namprd03.prod.outlook.com (2603:10b6:408:f7::14) by CO6PR02MB8835.namprd02.prod.outlook.com (2603:10b6:303:146::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Thu, 14 Oct 2021 07:14:56 +0000 Received: from BN1NAM02FT041.eop-nam02.prod.protection.outlook.com (2603:10b6:408:f7:cafe::f0) by BN9PR03CA0369.outlook.office365.com (2603:10b6:408:f7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Thu, 14 Oct 2021 07:14:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; foundries.io; dkim=none (message not signed) header.d=none;foundries.io; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by BN1NAM02FT041.mail.protection.outlook.com (10.13.2.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4608.15 via Frontend Transport; Thu, 14 Oct 2021 07:14:55 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 14 Oct 2021 00:14:54 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 14 Oct 2021 00:14:54 -0700 Envelope-to: jorge@foundries.io, u-boot@lists.denx.de, igor.opaniuk@foundries.io Received: from [10.254.241.49] (port=37316) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1maux4-0002FG-NW; Thu, 14 Oct 2021 00:14:54 -0700 Message-ID: <40d4fab9-6aae-6983-456d-3ccb940b972e@xilinx.com> Date: Thu, 14 Oct 2021 09:14:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCHv3] zynqmp: restore the jtag interface Content-Language: en-US To: Jorge Ramirez-Ortiz , CC: , References: <20211013134800.19452-1-jorge@foundries.io> From: Michal Simek In-Reply-To: <20211013134800.19452-1-jorge@foundries.io> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 86384ca2-ab19-4597-b11f-08d98ee25319 X-MS-TrafficTypeDiagnostic: CO6PR02MB8835: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:1013; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6SQYq4550lY3tW08TtIBAWTlwHPIsxM2inb+UlVF0OomOYdYIjSQtsmKNH968h9mWvWQJUfpX+cV8yT0DTERaexJsD3vOqjvrbvexU+uyWbtThp63RfEF5wqCfGhYiXoI3HE6R0sOUdLiE7pbSAbLfXQ67h3S+EsvymWan95IpyLJxljTZEtrmo7kYlCza6GvQHNbRSWHg6H7hBla9pUSeXi9QsDdEPwoVITpDm/ecvbxbJvf4KIGar9x2qVyV6KbwZLhcOE627dsx+nNru3R5XFBt9246RTYmrqWldSHfafjT2wtshHdpqUf/ar6QbgnBnMpcvgW2vTtgGhgzaPMqRjS2vxeKZObv5Y/329kBw6ssCVGF0+qCIrqj+cevsr2gQKkwbggnouY4B5Wzg5QnlS4VikBeo3Mo2InwWQEzMTbrHkV4m4+FXVJN5jlSiUi7JTsbr4xgpWRo7BQZ7XCazWNuET0pUthAz7PMzMNU1SstECxqDrgmcsV59Cb9WFLM6bYq1bJp1GXhDlI8whjNI9OSaCPnu8fsMPdspeYSRXetG607zKYSlJW/9ZXvRvsJjsVWlb1BKEZxIVCRG/HFfwNgFMk1Qa1J8UWI0tZ8VZaH5FZLZt6hpS1Suato+63K1IJdtvtaNXLT72GwereNEzrNmEoJ2KxE4ovwdZinSPSP5nG3v/t3gDYn8mUlLlXgAbt0iGwPM4v73An4svV1RNAfCT31vCUohHyZviO4l/75tCoxZ/aeE4VagNHfEHAWadR5HF3aHTYoniAhb1Og== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(36840700001)(46966006)(8676002)(110136005)(31696002)(36756003)(70206006)(70586007)(2616005)(7636003)(53546011)(83380400001)(336012)(508600001)(31686004)(426003)(8936002)(44832011)(36906005)(47076005)(2906002)(5660300002)(186003)(316002)(356005)(82310400003)(4326008)(26005)(9786002)(36860700001)(54906003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 07:14:55.6072 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 86384ca2-ab19-4597-b11f-08d98ee25319 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT041.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR02MB8835 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 10/13/21 15:48, Jorge Ramirez-Ortiz wrote: > When boot.bin is configured for secure boot the CSU will disable the > JTAG interface on all cases. > > Some boards might rely on this interface for flashing to QSPI in which > case those systems might end up bricked during development. > > This commit will restore the interface under CSU control > > Signed-off-by: Jorge Ramirez-Ortiz > --- > > v3: delete unvalid removal of empty line > > arch/arm/mach-zynqmp/Kconfig | 8 +++++ > arch/arm/mach-zynqmp/include/mach/hardware.h | 31 +++++++++++++++----- > board/xilinx/zynqmp/zynqmp.c | 19 ++++++++++++ > 3 files changed, 51 insertions(+), 7 deletions(-) > > diff --git a/arch/arm/mach-zynqmp/Kconfig b/arch/arm/mach-zynqmp/Kconfig > index f7b08db355..ee0895d9a2 100644 > --- a/arch/arm/mach-zynqmp/Kconfig > +++ b/arch/arm/mach-zynqmp/Kconfig > @@ -149,6 +149,14 @@ config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED > Overwrite bootmode selected via boot mode pins to tell SPL what should > be the next boot device. > > +config SPL_ZYNQMP_RESTORE_JTAG > + bool "Restore JTAG" > + depends on SPL > + help > + Booting SPL in secure mode causes the CSU to disable the JTAG interface > + even if no eFuses were burnt. This option restores the interface if > + possible. here should be tab and 2 spaces. I have fixed it myself and applied. M