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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,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 96C69C4338F for ; Thu, 19 Aug 2021 16:31:48 +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 CC01B60F5E for ; Thu, 19 Aug 2021 16:31:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CC01B60F5E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.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 C5CF380ECD; Thu, 19 Aug 2021 18:31:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (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" (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="lHYWncbS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 08551804E7; Thu, 19 Aug 2021 18:31:42 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20617.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eae::617]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9B57280F47 for ; Thu, 19 Aug 2021 18:31:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michals@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oHQtVIw0kVtaI+Yo0JRVG/j3xvhdm479UQJxsqZjqveWL36VqJrhe860kkR7VVRAPyAw4a+R+Nlr3EwR/LPqMpwH/euj3V7YhhwuIAnN1IWlxLP5Wz0iodJ8MElb5ZBVPFy+mh9PXW8ioXBJ6ZspZ4WE29ZXflPlloQc8/SyBpt4RWeTtp9ntBSndCBnrO7TdGdlqFIoQGsOm3l0LUmSUoMM3hCsxR36tNnJLv/GweEyIpydfZPoAcaTbAoaqiuZj1FhWejxhgUnMKKI9X2+AQ7kkaUKRBOq9bG8q7MIHRWq4Q/E6XOFZhq4aJH597bGnmRQ0CIpp8HksuJDKHruiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DeCUOf6FV0FchI4Mw/gXYGuu7Z0p5UVpM+LXqyiVIRY=; b=ntQVbbHeNiZ1B2Pu0W2xywdb9h0toB0+93T3QRGp6QGOOofxGEnGryd3KRAFcun+wh33fc/BfI4OQVBkWKPU2+NwWhUqBePsgA+ZOC6bllL/BA44aZ85kMkK51nCPWJi4ZITcrgnLCWSPeWKAbBvbabN5CSX0qVCB/frEk59F08GcF8pcddS3Jxzhx78Dv/C68eby3beAeOzICOCEVqcwZMEfrCHcGH14yPMhEcmUbS6IKmN7wSnXQcUuOSzYQGQt2d2w3A0JwSrdJ7KAvGfyy6VhOycdofGNFNTrRGUt7u96K6PiDeFa3OUqdBBN+zKZIj2Pz8k1ZH13WGnHe2q0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=chromium.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DeCUOf6FV0FchI4Mw/gXYGuu7Z0p5UVpM+LXqyiVIRY=; b=lHYWncbSaPjVuW+ug2yzI5CF8szh8WK4XUMYzr8Fsg2BFxVjvHLMJGkmyx95Nm8GepHaeNnL7+3VHnuziBx02ZSGA6L5ofJYjNHcm1JugpI1qE/0wy8GQcE/v+eRfaNSOXwXUoAjMtnBaUfo37MuI1bia8WZ17Tnlk1s7Ndug18= Received: from DM3PR14CA0137.namprd14.prod.outlook.com (2603:10b6:0:53::21) by SJ0PR02MB8660.namprd02.prod.outlook.com (2603:10b6:a03:3f9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Thu, 19 Aug 2021 16:31:30 +0000 Received: from DM3NAM02FT050.eop-nam02.prod.protection.outlook.com (2603:10b6:0:53:cafe::58) by DM3PR14CA0137.outlook.office365.com (2603:10b6:0:53::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Thu, 19 Aug 2021 16:31:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; chromium.org; dkim=none (message not signed) header.d=none;chromium.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT050.mail.protection.outlook.com (10.13.5.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4436.19 via Frontend Transport; Thu, 19 Aug 2021 16:31:30 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 19 Aug 2021 09:31:29 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 19 Aug 2021 09:31:29 -0700 Envelope-to: git@xilinx.com, sjg@chromium.org, pali@kernel.org, marek.behun@nic.cz, chee.hong.ang@intel.com, bmeng.cn@gmail.com, u-boot@lists.denx.de, andre.przywara@arm.com, trini@konsulko.com Received: from [172.30.17.109] (port=43284) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1mGkwy-000CWE-1Z; Thu, 19 Aug 2021 09:31:28 -0700 Subject: Re: [PATCH 07/10] Makefile: Align fit-dtb.blob and u-boot.itb by 64bits for 64bit systems To: Tom Rini , Michal Simek CC: Andre Przywara , , , Bin Meng , Chee Hong Ang , =?UTF-8?Q?Marek_Beh=c3=ban?= , =?UTF-8?Q?Pali_Roh=c3=a1r?= , Simon Glass References: <835b6be6-6f63-913c-7872-f043c82f8fe5@arm.com> <0f5c68ec-4396-1088-a650-b284d9007190@xilinx.com> <20210819161835.GZ858@bill-the-cat> From: Michal Simek Message-ID: Date: Thu, 19 Aug 2021 18:31:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210819161835.GZ858@bill-the-cat> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a595c2d-ccc9-4167-6816-08d9632eccc3 X-MS-TrafficTypeDiagnostic: SJ0PR02MB8660: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kKFgerwdb5bXaOHTqoY0gm7OUZFJzb5uF4b73z8euQ+TpEO4og3JM1L4HewKxMXb0utgyYLFMgk6DCCyH9chQuXqpBqD2PmI9/jzFB/6BmAIWkiVlQlj6Hv/Jhmf6a5kVUDrPKdZBAvu39HNms88S6viyNYzg/+ZOybnp3YQ/KoveP8n4OcDeJdmJYENUA4ffqpAN695itwyM3SLyIv9zUfuE48cLgYCdzo0+cEC8VSbFWkWMnaardBL1o4GYLceMC7AFZnmzvp5fjYZMSShQmP4VVcOEmczHcD++ANW/K7cDDSNkFWgmpNZeFnS9ALhrr09AwSDGF/+AYTw7JqROazXhjOQ+dhvMQgiezg0qyoTOqQ+MCFBMYb0K7mZZWca6M4p8HbKjuGgVyN9OKAou0rfrUqNWM+DOZi3KG1dxAegTOcgaTLKZocjYUN3J+LGV5OzC1t3wAdk5EaQpOuwytzbc1lAW9DN945SXdzeMwElPgJMjiElSud80UeDbfyAFAT4H659rW4BPftvHb12XNTamgzudDAY99c41izi416bd5AAIQJpeNJxILPa66IJrAO0gwgdWwgQI5YOicgxX7n73z0yvoJC3/B5eUrUVJpMSD3I21f8p+Hl6Q0XcTLc1KHn5PPWBEOtL8tduDcjPeKNJOVaTYzlF1JHUwE6/g0TEs64/SfkX5KtV3lXP1ZvCtzXb0huGzlN4+pjaG+Lwywv/uAMsV66bU4o8WIqBv2Jv/n2PMJgA+YDdrx4E9ReBfqcTa8cHhpxWbv479q1gg== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(136003)(46966006)(36840700001)(2616005)(336012)(70586007)(316002)(5660300002)(478600001)(186003)(4326008)(44832011)(53546011)(26005)(6666004)(47076005)(83380400001)(82310400003)(31696002)(426003)(70206006)(2906002)(36860700001)(36756003)(8936002)(356005)(54906003)(36906005)(8676002)(7636003)(110136005)(31686004)(82740400003)(9786002)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2021 16:31:30.3729 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a595c2d-ccc9-4167-6816-08d9632eccc3 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT050.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR02MB8660 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 On 8/19/21 6:18 PM, Tom Rini wrote: > On Thu, Aug 19, 2021 at 06:01:39PM +0200, Michal Simek wrote: >> Hi Andre, >> >> On 8/19/21 5:56 PM, Andre Przywara wrote: >>> On 8/19/21 12:19 PM, Michal Simek wrote: >>> >>> Hi, >>> >>>> 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 there >>>> 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 >>>> --- >>>> >>>>   Makefile | 7 +++++++ >>>>   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 = -f auto -A $(ARCH) >>>> -T firmware -C none -O u-boot \ >>>>       -a 0 -e 0 -E \ >>>>       $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst >>>> ",,$(CONFIG_OF_LIST))) -d /dev/null >>>>   +ifeq ($(CONFIG_PHYS_64BIT),y) >>> >>> 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. >> >> 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. > As is in the second thread. Does it make sense to also align the end? I did that in 8/10 patch. The problem with these alignments is that you also need to align the start of FIT image. Maybe would the best to copy fdt to different aligned location. Thanks, Michal