From patchwork Thu Jun 11 11:10:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1307459 X-Patchwork-Delegate: sjg@chromium.org 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=0bBHpxmy; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 49jLlt3p3qz9sR4 for ; Thu, 11 Jun 2020 21:11:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6CC9B81777; Thu, 11 Jun 2020 13:11:51 +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="0bBHpxmy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BFC6081C5F; Thu, 11 Jun 2020 13:11:49 +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-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 AEC3A816A4 for ; Thu, 11 Jun 2020 13:11:46 +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-wr1-x443.google.com with SMTP id j10so5712789wrw.8 for ; Thu, 11 Jun 2020 04:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eIl9SOSA34o+BGja0Zp1c0RbeAZPAiQuk8BkW5ACsS8=; b=0bBHpxmyaxMPSZ7U64Pv6ahQ9RZ8Ua7Looa7waEibQoEUKsihLqLl3Knr0qcMBy8Wf GOEw0DAuL5jkTJptowOnsw/0bmH5mQQByPLbwRezrnGcFyYHAHfY0aYJ3LHBjznej5sX VtUEfsbQJ2wIYiSZW1NtV8MvKdIu3zyIlTGOO9V8Gw5fR/hTb3tKULwxIsUCT3ZoAyq3 H8JBnvxfM6gbMRfw9opdcA/KTz7GdcJlsRBVv7uxaIqyXNPIzL1Hw4U3IvvpP9CY+a4O RQZQoOzOrAr+kWwIjwomxeaU+6sjIG24IDaT1Fq8m9y8L3I7LoBf4GlwGvJwUgFQf7NY r1bQ== 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:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=eIl9SOSA34o+BGja0Zp1c0RbeAZPAiQuk8BkW5ACsS8=; b=aB1gowCxS1XRAt04MKiMC6aOy/7ioakV/PFk9FnMfVvtPvk2F1uJJMuBzOtuWMKTJn Kv/xogO9Jvk9cct6rjoUBKAcQFux0lAT64IEbeX1CfwqII9xqORf7xM4D49V6Osvkz6U EoDaOJ/5fj36tYCQl3T/vAX2nXc6rlF+yBs0cYZJzdkGZicS5faxjG/AcGxXYHKZQ0kH oUyCfxAMO9aEKnemeVkoKkSlBqFRAq+g5Z6eEy7wkWq9Ij/oUyNngW/na+CZqu/0If8G iHlEZr4WXnVtIGd9Hd2ILk9ZnNlbpggMKORFyo97dwm7HH8G8JkDmQnImtT6rC0axu1s l8aw== X-Gm-Message-State: AOAM531nIx8lBvAftXLn5WI5PwgrbEQmHRSQ0rWkB0BootpzxLy7RI5y PZNGBz99CiVDrQowOxteSpx6yTv7kY2wlIQC X-Google-Smtp-Source: ABdhPJyvYnbqXVPbXjgC5ufYo3E8UDvLE5i5zXE7746mjd9z55h3PT0SY5e4clQLAThM6axuc7CnyQ== X-Received: by 2002:a05:6000:4c:: with SMTP id k12mr8821736wrx.215.1591873905829; Thu, 11 Jun 2020 04:11:45 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id i3sm4503538wrm.83.2020.06.11.04.11.44 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jun 2020 04:11:44 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, Marek Vasut Cc: Ashok Reddy Soma , Heinrich Schuchardt , Joe Hershberger , Ovidiu Panait , Patrick Delaunay , Simon Glass , Stephen Warren , Vikas Manocha , Ye Li Subject: [PATCH v2] common: fdt: Remove additional 4k space for fdt allocation Date: Thu, 11 Jun 2020 13:10:54 +0200 Message-Id: X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean From: Ashok Reddy Soma There is no technical reason to add additional 4k space for FDT. This space is completely unused and just increase memory requirements. This is problematic on systems with limited memory resources as Xilinx Zynq CSE/ZynqMP mini and Versal mini configurations. The patch is removing additional 4k space and also increasing alignment to 64 to be aligned with 64bit systems. EFI code is using copy_fdt() which copy FDT to different location. And all boot commands in case of using U-Boot's FDT pointed by $fdtcontroladdr are copying FDT to different locations by image_setup_libfdt(). That's why in proper flow none should modified DTB used by U-Boot that's why there is no need for additional space. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- Changes in v2: - Change subject (was: common: Add Kconfig option for FDT mem alignment) - Remove Kconfig symbol - Extend description I have tested it on zcu104 --- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index 01194eaa0e4d..7e99b2425a62 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -537,7 +537,7 @@ static int reserve_fdt(void) * will be relocated with other data. */ if (gd->fdt_blob) { - gd->fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob) + 0x1000, 32); + gd->fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob), 64); gd->start_addr_sp = reserve_stack_aligned(gd->fdt_size); gd->new_fdt = map_sysmem(gd->start_addr_sp, gd->fdt_size);