From patchwork Thu Sep 3 11:03:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1356527 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=YEQgDN0R; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bhybd70jFz9sR4 for ; Thu, 3 Sep 2020 21:03:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 99E5D82315; Thu, 3 Sep 2020 13:03:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="YEQgDN0R"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0F13B82301; Thu, 3 Sep 2020 13:03:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8ADB5822F2 for ; Thu, 3 Sep 2020 13:03:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x641.google.com with SMTP id i26so3188175ejb.12 for ; Thu, 03 Sep 2020 04:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4SX/ew2Kbr5Y1XjTbbVgwdxc5mGzU9YUJoGgJSnXOKU=; b=YEQgDN0RZHwnV8l/m1WS7fZ3lnb/+P+3k17JmtdT3OL3b7zDi6yVEOiRUoJlwSEmtT 3JhvS6wN++Q1wvKH6lZ/RlV/JkSBNzgQ4WKE/OeY/fsB7eWu/W0uGxkaKgJZhN6ONMne EHTJfw2zEapO5y5svARxeY7EzUF3aR+gYqBzzuzc0cjaX6XcfqpHvWa9Kw4+R5AJmoC1 97p+PHdGdeCyutrkS49DxG6MRyWCjU8vbHwmNSZXupsAEsoIF+ZH/BilBF1qLZrcB8lr IoqTmue5jCib0V1niUHJvgbFcQipH+hlKOPDPNM37KspdJhRZy1ykEqXfI6zJUHgMMEj GqYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4SX/ew2Kbr5Y1XjTbbVgwdxc5mGzU9YUJoGgJSnXOKU=; b=WiNMIrPiHwHzZH9kF1KC3icWTp3hByTrZJ9WOaMd3h7I45gErmVvCqM7E51mm2Nqqk S6Q8uBPKpen+qfqwTwtKwo5FPTGxQXjnEKOtDTK3npSZ3PGSFlc43IPPsuzF1IBsmmmf Hdqxbp3Yb+779w8KHo/Ea3Uuzg3yj38zQSUfLFC+J/6Jw9JJci7XM86d8r1rCwkqHSaY urD75amkUHwD+AhXLJ4OZsHGFPXnNIjAqOfXSjst8T5zejaDn9WacnyFOpqK6Wtr3AZl ss7M+2j3i6GFOnDm5gjYQnrHgFMfCXF4OiEbC4qSDpch3MOunfSsghJWAMcED9anBDZv zNpg== X-Gm-Message-State: AOAM531iddJGV6oBo/eXgr17NfFCzLDVMqjghvdHxWGaBzt+Bm1N1jqP znFWTbetu3BeqEuNZIrBCnYtJg== X-Google-Smtp-Source: ABdhPJw+HFq5jM5dI61jCyaLFnuB3CfKXxgXV98/G3bfeZX3UF+M4+yAZYjXX5witopBQ63hrqQIUg== X-Received: by 2002:a17:907:70cb:: with SMTP id yk11mr1513478ejb.312.1599130997253; Thu, 03 Sep 2020 04:03:17 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id g11sm2662277edj.85.2020.09.03.04.03.16 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 04:03:16 -0700 (PDT) From: Michal Simek To: Simon Glass , u-boot@lists.denx.de, git@xilinx.com Subject: [PATCH 2/2] spl: fdt: Record load/entry fit-images entries in 64bit format Date: Thu, 3 Sep 2020 13:03:12 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean The commit 9f45aeb93727 ("spl: fit: implement fdt_record_loadable") which introduced fdt_record_loadable() state there spl_fit.c is not 64bit safe. Based on my tests on Xilinx ZynqMP zcu102 platform there shouldn't be a problem to record these addresses in 64bit format. The patch adds support for systems which need to load images above 4GB. Signed-off-by: Michal Simek --- common/fdt_support.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index b8a8768a2147..5ae75df3c658 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -611,14 +611,9 @@ int fdt_record_loadable(void *blob, u32 index, const char *name, if (node < 0) return node; - /* - * We record these as 32bit entities, possibly truncating addresses. - * However, spl_fit.c is not 64bit safe either: i.e. we should not - * have an issue here. - */ - fdt_setprop_u32(blob, node, "load", load_addr); + fdt_setprop_u64(blob, node, "load", load_addr); if (entry_point != -1) - fdt_setprop_u32(blob, node, "entry", entry_point); + fdt_setprop_u64(blob, node, "entry", entry_point); fdt_setprop_u32(blob, node, "size", size); if (type) fdt_setprop_string(blob, node, "type", type);