From patchwork Sun Apr 15 13:37:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 898248 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40PCLR3rSVz9s1B for ; Sun, 15 Apr 2018 23:39:59 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3338EC21DA2; Sun, 15 Apr 2018 13:38:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5F34DC21E29; Sun, 15 Apr 2018 13:37:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 59974C21C50; Sun, 15 Apr 2018 13:37:25 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id F131BC21D72 for ; Sun, 15 Apr 2018 13:37:24 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 40PCHQ1VFfz1r1ly; Sun, 15 Apr 2018 15:37:22 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 40PCHQ19ZGz1qqkT; Sun, 15 Apr 2018 15:37:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id gXR0h4S7qawj; Sun, 15 Apr 2018 15:37:21 +0200 (CEST) X-Auth-Info: OaFbWjrjHEwO4k+HX57yqTrrfgIqwHJ2tFqRZBCxh/8= Received: from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz [86.49.107.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 15 Apr 2018 15:37:21 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Date: Sun, 15 Apr 2018 15:37:00 +0200 Message-Id: <20180415133704.18950-1-marex@denx.de> X-Mailer: git-send-email 2.16.2 Cc: Marek Vasut , Chin Liang See Subject: [U-Boot] [PATCH 1/5] ARM: socfpga: Add boot trampoline for Arria10 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The Arria10 uses slightly different boot image header than the Gen5 SoCs, in particular the header itself contains an offset from the start of the header to which the Arria10 jumps. This offset must not be negative, yet the header is placed at offset 0x40 of the bootable binary. Therefore, to jump into U-Boot, add a trampoline just past the Arria10 boot header and point to this trampoline at fixed offset from the header generated using the mkimage -T socfpgaimage_v1 . Note that it is not needed to jump back to offset 0x0 of the image, it is possible to jump directly at the reset label and save processing two instructions. Signed-off-by: Marek Vasut Cc: Dinh Nguyen Cc: Chin Liang See Acked-By: Chin Liang See --- arch/arm/mach-socfpga/include/mach/boot0.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-socfpga/include/mach/boot0.h b/arch/arm/mach-socfpga/include/mach/boot0.h index d6b9435d33..06bbe27d2c 100644 --- a/arch/arm/mach-socfpga/include/mach/boot0.h +++ b/arch/arm/mach-socfpga/include/mach/boot0.h @@ -18,10 +18,10 @@ _start: .word 0xcafec0d3; /* Checksum, zero-pad */ nop; - b reset; /* SoCFPGA jumps here */ - nop; + b reset; /* SoCFPGA Gen5 jumps here */ nop; nop; + b reset; /* SoCFPGA Gen10 trampoline */ #endif #endif /* __BOOT0_H */