From patchwork Wed Feb 20 10:36:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1045253 X-Patchwork-Delegate: lukma@denx.de 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=baylibre.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="kPcb7FXB"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 444DY90kTNz9s1B for ; Wed, 20 Feb 2019 21:36:25 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 12D4EC21E90; Wed, 20 Feb 2019 10:36:20 +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_MSPIKE_H2, T_DKIM_INVALID 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 55744C21D4A; Wed, 20 Feb 2019 10:36:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A1DD7C21D4A; Wed, 20 Feb 2019 10:36:17 +0000 (UTC) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by lists.denx.de (Postfix) with ESMTPS id 3F9C8C21C2F for ; Wed, 20 Feb 2019 10:36:17 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id x7so6044035wmj.0 for ; Wed, 20 Feb 2019 02:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6f3Ll8L2f85fE3UB6UMwrl0cKINtexeLELBS42WR8tI=; b=kPcb7FXBMpR5PUx9wfultq8u7T+kT5ym/p9kao0vha+R4E4RdhMji8SQ60FPT7hx5f LXcddFo++S/1CurcDPkaWZ0gMDerJfZFBRX2OEuEz9xILNBIcNyc2wEh5YpkWQzhrpsa +GhlvAUs0sDWdAyNccGjomA4340O9hz+QIoY/8qA3LvCAF9cKcRHIgGMTi2lmL8Brjot ePeva35L3T+0toktD4A9hM7M45WXDuT8Yfv7isomydQgaw3SOkOyP+nIR1cxWBpNIiSf r8YA2JNIIBj7b5MWv0aYcZ/SC5/xYqtTtm77eTdbxnVQGbfG9YJTC9bC8S/0nojFla4P PIgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6f3Ll8L2f85fE3UB6UMwrl0cKINtexeLELBS42WR8tI=; b=DDSCVUPMrvb6AHKfJfo0Ufx0cx1X3rgWKVcF9nES9xQHMEkIWc37ET+DhMO+0z1jR4 dVEGlBOliAKA7+E+FGmSTquRJXqkQ7sAAb0rHNfSgzuVYKr+c1O2PY5gbT6x/Q0W3K7L 16YS/vA/Sfr8q+3AceOOz0aNpl/UXzqmS9G3oqyXDJh/ytutZc2UIIplms395W05QK+r Fl+hQVKs+ldhECgvqxAxFbADhPCainmavRynckueDHD0B5NurKPvyoQeVcp3pMUJOoNd 83o4fBFlYVz9717S0piwPaPRNO7TSfeFeqemntzQniTnCnIjOBHSc09gVHB4N1N9OEV5 NSAA== X-Gm-Message-State: AHQUAuaIDRiWz4ESgBe+GblqtQSECfii//BqZ4Stkdjacr7M408H4d3U Dp1D9/uSVgEIV5+VrwxKlPAW0kWfJetZXg== X-Google-Smtp-Source: AHgI3IaYFZhMfk3yl8NWnnN0k2ZXpfRb188ikU9iddZn2c0BWzfwkBzZZ4LpwfA1zVQywru/C/6t/Q== X-Received: by 2002:a1c:6788:: with SMTP id b130mr6562420wmc.102.1550658976319; Wed, 20 Feb 2019 02:36:16 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id q9sm13359471wrv.26.2019.02.20.02.36.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Feb 2019 02:36:15 -0800 (PST) From: Neil Armstrong To: u-boot@lists.denx.de, trini@konsulko.com Date: Wed, 20 Feb 2019 11:36:12 +0100 Message-Id: <20190220103612.2421-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: Sam Protsenko Subject: [U-Boot] [PATCH] fastboot: common: fix default fastboot_boot on 64-bit 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When booting on a 64-bit system, the boot_addr_start buffer is not large enough to contain a 64-bit number, thus leading to a crash even if fastboot_buf_addr is valid, only the high part of the address will be printed to boot_addr_start : fastboot with fastboot_buf_addr = 0x0000000006000000: downloading of 92239872 bytes finished Booting kernel at 0x00000000... "Synchronous Abort" handler, esr 0x96000004 elr: 00000000010561f4 lr : 0000000001056fac (reloc) x28: 000000007df2d38f x29: 000000007df2d1b0 Resetting CPU ... With this fix, boot_addr_start can have the full 64-bit address passed to bootm. Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot") Cc: Simon Glass Cc: Alex Kiernan Cc: Sam Protsenko Signed-off-by: Neil Armstrong Reviewed-by: Simon Glass --- drivers/fastboot/fb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index c6e06aab7a..17eca73be0 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -119,7 +119,7 @@ void fastboot_boot(void) if (s) { run_command(s, CMD_FLAG_ENV); } else { - static char boot_addr_start[12]; + static char boot_addr_start[20]; static char *const bootm_args[] = { "bootm", boot_addr_start, NULL };