From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FD39C4338F for ; Thu, 19 Aug 2021 16:18:51 +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 605C660698 for ; Thu, 19 Aug 2021 16:18:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 605C660698 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.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 8DBCB81BC5; Thu, 19 Aug 2021 18:18:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="Fyu8MAUa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DDED980F47; Thu, 19 Aug 2021 18:18:44 +0200 (CEST) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 90F6B81BC5 for ; Thu, 19 Aug 2021 18:18:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x732.google.com with SMTP id o123so7671614qkf.12 for ; Thu, 19 Aug 2021 09:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lJX2RcRG55fZ+6Fm8k+XjAWPRBAnzDu7getSA3hZ5vM=; b=Fyu8MAUaM7C8Dp3evseZt/fy3bFsR2kjmsmBa8bhUjCJzjEI5XGTZpHpW2DikE4m+h I3Rj5KKuM5RC6doV9dsOS0YHT0Qv0TEs88uE551wzKyrqPlX/9yNgThFzMrHlmQI7T/y DEJDa5SVtfNO1JCyzbQDSho1Xho3eVL4zYV6o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lJX2RcRG55fZ+6Fm8k+XjAWPRBAnzDu7getSA3hZ5vM=; b=a1hvbc+bpg/F3fTHW4Gxnjy30evhdIwVwibDLTB3k+IcBZJyEY6RmyW8egU1Rtg445 Y7VE32HAZBRd1wLzHbKWEvUZPmBqnROs404Xr/aHBZlCQQs6B2fmwurl82Ci3+ZJs4Td 7YsRazGDgIrpLQ8evow4dKrr3C3GYfqoxLr++4JPX0Bqt+1pyWOIyK+tq/044DewiXzF 3Qh0cP0I4DMR0uwjad86LAX8YRyCgzMdUmnNuI5x6bq/lpIxKRoXUVVA0zj4ptLqOPnG CwmabbAECEb8Uc4LY7d8G4azPy4kM6c5hQZmBkjUa5kRcYwrYR0tqoXBJk4+t7/R6Inh X8dg== X-Gm-Message-State: AOAM5334NAfxlzF/dYq/xjwaRnX8ZdkZbSGd22nrsK5tsN8zKKuygWcA D8eqLzG7Wgn4FmYzpiABFNe2RA== X-Google-Smtp-Source: ABdhPJw+qVNaW0Wid9eyUgmiCSuzFCKu0mfL/zaMpBxRcIVUH6fJ/lE+/Or1MNPx/O5sVdgDlX4T8A== X-Received: by 2002:a37:a302:: with SMTP id m2mr4388057qke.155.1629389918317; Thu, 19 Aug 2021 09:18:38 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-599d-dbbd-fe12-cbbd.res6.spectrum.com. [2603:6081:7b01:cbda:599d:dbbd:fe12:cbbd]) by smtp.gmail.com with ESMTPSA id e25sm1801630qka.83.2021.08.19.09.18.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Aug 2021 09:18:37 -0700 (PDT) Date: Thu, 19 Aug 2021 12:18:35 -0400 From: Tom Rini To: Michal Simek Cc: Andre Przywara , u-boot@lists.denx.de, git@xilinx.com, Bin Meng , Chee Hong Ang , Marek =?iso-8859-1?Q?Beh=FAn?= , Pali =?iso-8859-1?Q?Roh=E1r?= , Simon Glass Subject: Re: [PATCH 07/10] Makefile: Align fit-dtb.blob and u-boot.itb by 64bits for 64bit systems Message-ID: <20210819161835.GZ858@bill-the-cat> References: <835b6be6-6f63-913c-7872-f043c82f8fe5@arm.com> <0f5c68ec-4396-1088-a650-b284d9007190@xilinx.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n5+lST97N6UivDs1" Content-Disposition: inline In-Reply-To: <0f5c68ec-4396-1088-a650-b284d9007190@xilinx.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --n5+lST97N6UivDs1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 19, 2021 at 06:01:39PM +0200, Michal Simek wrote: > Hi Andre, >=20 > On 8/19/21 5:56 PM, Andre Przywara wrote: > > On 8/19/21 12:19 PM, Michal Simek wrote: > >=20 > > Hi, > >=20 > >> Enabling MULTI_DTB_FIT and DTB_RESELECT can end up with multi DTBs in = FIT > >> image placed and aligned only by 32bits (4bytes). For 64bit systems th= ere > >> is 64bit (8bytes) alignment required. That's why make sure that > >> fit-dtb.blob and u-boot.itb as our primary target images for Xilinx > >> ZynqMP > >> are all 64bit aligned. The patch is using CONFIG_PHYS_64BIT macro to > >> identify 64bit systems (including 32bit systems with PAE). > >> > >> Signed-off-by: Michal Simek > >> --- > >> > >> =A0 Makefile | 7 +++++++ > >> =A0 1 file changed, 7 insertions(+) > >> > >> diff --git a/Makefile b/Makefile > >> index 269e353a28ad..1bbe95595efe 100644 > >> --- a/Makefile > >> +++ b/Makefile > >> @@ -1169,6 +1169,10 @@ MKIMAGEFLAGS_fit-dtb.blob =3D -f auto -A $(ARCH) > >> -T firmware -C none -O u-boot \ > >> =A0=A0=A0=A0=A0 -a 0 -e 0 -E \ > >> =A0=A0=A0=A0=A0 $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst > >> ",,$(CONFIG_OF_LIST))) -d /dev/null > >> =A0 +ifeq ($(CONFIG_PHYS_64BIT),y) > >=20 > > Why is this restricted to 64-bit "systems"? The DT spec[1] clearly > > states that some DT parts (/memreserved/ block, for instance), must be > > 64-bit aligned, which means the whole blobs needs to be 64-bit aligned. > > Granted this probably does not cause real issues on 32-bit systems, but > > is violating the spec anyway. > > So I'd say we add the alignment requirement unconditionally. >=20 > That's even better for me and we need to make sure that dtbs itself are > aligned and also dtbs inside FIT image are aligned too. Right, all dtbs need to be 8 byte aligned to start with. Enforcing this is what will unblock moving to a newer libfdt where that's checked for up-front now. --=20 Tom --n5+lST97N6UivDs1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEehFQACgkQFHw5/5Y0 tyyRxAwAhP6Cv0Rz3CeliWzWv2Ym8sIUM1l2/+oj+0FMNvHvGKwIbzxdR23cO2YX ubISyDdMoD5obhRUrfhKKTrzvrYBBEZ9RZijEAJs0GhR+QwvdPxh5YqrXfHC5Lka BaXiWJWG2jxwdDIUHC5CmP85SWhGaBYWaCFI7XFCmJpHPdPJgLysgMqqtlK3tmOf VZZAoq/nhp00PM5qv2cL0KM0MHpGV3Yj1mB9bs9IuWULm2idm1w9d8Poqq/vILpZ pgQQhYnL35UcD4LisNRFKeQXRvcem+xLg54cR+jyFUV+GuXJX5nY4XFqIIakn2uN lpgZqy4lwbdJZVVqBhBoF8pSPFWGyyK1UVzrmGtubyZZqnK9MW/WeaOx2QFzoFM9 KKUEn9/AYBDEIP2tpmTTIY6YtTNtWaniTGMopWo1KEGyKDFUT3qHcTJFaAdwg3AW 8W/1blEdGe4mLG4TcrmQ9NDvb12ivRlgnxstc0LAzDtNy8OM3v/hLiyxNXBLgCEY vwMXq8IJ =feqs -----END PGP SIGNATURE----- --n5+lST97N6UivDs1--