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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 F1596C07E99 for ; Mon, 12 Jul 2021 05:21:50 +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 1FCDC6100B for ; Mon, 12 Jul 2021 05:21:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FCDC6100B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=4rf.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 61DD182C1D; Mon, 12 Jul 2021 07:21:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=4rf.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=4rf.onmicrosoft.com header.i=@4rf.onmicrosoft.com header.b="LHp7mt8N"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F10FD82C24; Mon, 12 Jul 2021 07:21:46 +0200 (CEST) Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01on20703.outbound.protection.outlook.com [IPv6:2a01:111:f403:7005::703]) (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 8730B82C0B for ; Mon, 12 Jul 2021 07:21:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=4rf.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=reuben.dowle@4rf.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EaRIenGCiW5ZdW2Dvp5YnRXZqfRWldghYWKtWQZO2uECIZ9kgoXQJ/wG+pespbVzJZtpL0QXegoQXyQm8FngUUWNGAc7hTuQk6pv2H6qPlmYcuquqes7dDrxDqtDuFPdNFFVZyJ4UXG82z2tX8KlvoRwcxeE86nV7ulKLrruVNt6Q8JoC5wS5egAOpQQ3uCiiG0MkAn2Ut0L1zh5Pi+5WxDtvlGJYuyocxOSrolM1upSZyaU816LigKBkUogqU0QAWYqfMo4W5z9fdkuf5pyYVgw298digPc/v58jr0Nhkcje10R2HPRwbtSEM7XXy6+6PbvnsK8kDsX4Qlj2kRnZQ== 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=A80z5N3xk2Zns780Oqzybxln0/XoLF7Gjlj57kG0H20=; b=cY/lcvRuazgWb+iZNcYD1qu5n41BrPGucbvMP8gKuKKKGqQfgx29HYtLaNwP3NRNq2l1G5+0UICnEnVUD9rv1wDCjigCHG60gHkxsxHsDobOXayH1O201oD0Tkml0tA8Ul91/EH2y//FJf5kIR8znAq+jqzilUg+9P7Wck1e288RDVOhHbahcr8knXE77o5Pues7SCaLOI2O66TdMEUT9ltpftwqYGy81IqQu4s5BPyCKLt/xXMAsPfmo8+80fJBDEB1jlzubze50fqA74bYACAlC+c2kW9FKImnVhfdRy+3Mjuw84VEt5VTa7wKyTKr+lQShXpaDFolM0RQZJ2KBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 114.110.34.227) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=4rf.com; dmarc=bestguesspass action=none header.from=4rf.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4rf.onmicrosoft.com; s=selector1-4rf-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A80z5N3xk2Zns780Oqzybxln0/XoLF7Gjlj57kG0H20=; b=LHp7mt8N3SPt/oakD+S1BVhYKNOFQaWp0zffFCWofiD5SM+Q5MqwPu1ZWXHWUvXvhyZr3EXpNvIYEr+4LcjfWbbejvhGi4HplOOxVxZh3U16vmUoKKNN7B9wKjSZKtDQTAHNfQRm+Jz06ZQWIsWU/hGNh2D1iVHvpyj9TnpPy9U= Received: from SG2PR03CA0164.apcprd03.prod.outlook.com (2603:1096:4:c9::19) by SYZP282MB3449.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:16b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.21; Mon, 12 Jul 2021 05:21:38 +0000 Received: from SG2APC01FT003.eop-APC01.prod.protection.outlook.com (2603:1096:4:c9:cafe::6b) by SG2PR03CA0164.outlook.office365.com (2603:1096:4:c9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.11 via Frontend Transport; Mon, 12 Jul 2021 05:21:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 114.110.34.227) smtp.mailfrom=4rf.com; lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=bestguesspass action=none header.from=4rf.com; Received-SPF: Pass (protection.outlook.com: domain of 4rf.com designates 114.110.34.227 as permitted sender) receiver=protection.outlook.com; client-ip=114.110.34.227; helo=mail.4rf.com; Received: from mail.4rf.com (114.110.34.227) by SG2APC01FT003.mail.protection.outlook.com (10.152.250.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4308.20 via Frontend Transport; Mon, 12 Jul 2021 05:21:36 +0000 Received: from 4rf-nz-exchange.local.4rf.com (fd00:192:168::f2e9) by 4rf-nz-exchange.local.4rf.com (fd00:192:168::f2e9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 12 Jul 2021 17:21:31 +1200 Received: from 4rf-nz-exchange.local.4rf.com ([fe80::a1ae:a112:ede9:1f15]) by 4rf-nz-exchange.local.4rf.com ([fe80::a1ae:a112:ede9:1f15%18]) with mapi id 15.01.2106.013; Mon, 12 Jul 2021 17:21:31 +1200 From: Reuben Dowle To: Bin Meng , Tom Rini , Simon Glass , "u-boot@lists.denx.de" Subject: RE: [PATCH] spl: Align device tree blob address at 8-byte boundary Thread-Topic: [PATCH] spl: Align device tree blob address at 8-byte boundary Thread-Index: AQHXdtFkmBnFtvRCUEyFTDIbfk7M3as+yyKA Date: Mon, 12 Jul 2021 05:21:31 +0000 Message-ID: <58187afcb4aa481a8302777aca599fa7@4rf.com> References: <20210712035231.26475-1-bmeng.cn@gmail.com> In-Reply-To: <20210712035231.26475-1-bmeng.cn@gmail.com> Accept-Language: en-GB, en-NZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.1.173] x-c2processedorg: b87d8f4e-38aa-47ad-a534-2cc14c7a88c7 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0931191c-4038-4b86-7e1c-08d944f4ebe7 X-MS-TrafficTypeDiagnostic: SYZP282MB3449: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1751; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vsdqcc12+i3fy/w3V7jURJJY3x7XWMl3t3cS/dv96Zxpb/haR2KnAGZQyC8UnmtePePLBg49Q5rwo4U66wQFKRIBAyZ03633IJDLzhn5DT2N4GEPZRlSdZ5fATqnsMRyuFvU/D9xKPBQUGcThzw+wh7Q2kEGqzHShhrWPYJruMl9OIrYucsKaWV8x2Z8mASR+gKcqtgE0dfbAktkvlEEG+eYvzgPslct6+KD7Cxgxu/nDNHDNYgzgDMSQZErZqHh95zNBLA2OQruAt9zJ85gaUowmbMCztewTUIlDp+PL+P2b5XHJlF8VYsO6K5OMX8GaCH3ZF06+s3wEda/LidTOlTxMOSs+ptyFWeiBV5tRv+g1MZdSAtHBG7OjgtfHLXGwSv+/VP2yUYZtkuNM1k4Lk+RjVmAd9Fc/d8fhQmcMp1aMIJT3Jy7TCm0cZlR5YzdYB5B8nL9i5dE18X4EBZnOwXENll6Pgh7QM1qzRYSpIaPIocHPQnGzkhGXgvMIutBVzHtG+Ch+19SICuaND0sq0z0UI9f9UjYROArS2RQwmGk7sVJf4Sxs7UUejWhYmMmM1CWuRhouq36j3XLYwUu78AKlwvJfmldIXqnMYGE6ixjEMYyoLaZO33UJOUK9J5MAGL/JKDV4VETvJORFBr2nZ7vX7C7h8J4O7rCplmz2TFUoBx2DiawCjtmUdmESTXEstCRAhIjJU7iq+EavNGpoKlFfACry603fzXczphqLVGqoyOAf8fUAaiIgcwrps2+BFhLOckpKRaIIajxRSTAHJnNAI4B7vgHygt7Yne+UDU1wh/FfvHccNn0emeASm68 X-Forefront-Antispam-Report: CIP:114.110.34.227; CTRY:NZ; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.4rf.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(39840400004)(376002)(396003)(136003)(346002)(36840700001)(46966006)(426003)(36756003)(110136005)(81166007)(316002)(26005)(2616005)(8936002)(70206006)(336012)(36860700001)(5660300002)(966005)(44832011)(186003)(8676002)(47076005)(356005)(2906002)(70586007)(53546011)(82310400003)(83380400001)(478600001)(24736004)(108616005)(86362001)(7696005)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: 4rf.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2021 05:21:36.7572 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0931191c-4038-4b86-7e1c-08d944f4ebe7 X-MS-Exchange-CrossTenant-Id: 9ffb526e-7b63-4774-8f76-2167f5ab5208 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=9ffb526e-7b63-4774-8f76-2167f5ab5208; Ip=[114.110.34.227]; Helo=[mail.4rf.com] X-MS-Exchange-CrossTenant-AuthSource: SG2APC01FT003.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SYZP282MB3449 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 I submitted an almost identical patch. See https://github.com/u-boot/u-boot= /commit/eb39d8ba5f0d1468b01b89a2a464d18612d3ea76 This patch eventually had to be reverted (https://github.com/u-boot/u-boot/= commit/5675ed7cb645f5ec13958726992daeeed16fd114), because it was causing is= sues on some platforms that had FIT on 32 bit boundary. However I continue = to use it in production code, as without it the boot on my platform aborts. I don't have time to investigate why this was happening, but you need to ch= eck this code won't just cause exactly the same faults. > -----Original Message----- > From: U-Boot On Behalf Of Bin Meng > Sent: Monday, 12 July 2021 3:53 pm > To: Tom Rini ; Simon Glass ; u- > boot@lists.denx.de > Cc: Bin Meng > Subject: [PATCH] spl: Align device tree blob address at 8-byte boundary >=20 > Since libfdt v1.6.1, a new requirement on the device tree address via: >=20 > commit 5e735860c478 ("libfdt: Check for 8-byte address alignment in > fdt_ro_probe_()") >=20 > must be met that the device tree must be loaded in to memory at an 8-byte > aligned address. >=20 > Signed-off-by: Bin Meng > --- >=20 > common/spl/spl_fit.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index > f41abca0cc..9baf6aca9f 100644 > --- a/common/spl/spl_fit.c > +++ b/common/spl/spl_fit.c > @@ -374,6 +374,12 @@ static int spl_fit_append_fdt(struct spl_image_info > *spl_image, > */ > image_info.load_addr =3D spl_image->load_addr + spl_image->size; >=20 > + /* > + * Since libfdt v1.6.1, the device tree must be loaded in to memory > + * at an 8-byte aligned address. > + */ > + image_info.load_addr =3D roundup(image_info.load_addr, 8); > + > /* Figure out which device tree the board wants to use */ > node =3D spl_fit_get_image_node(ctx, FIT_FDT_PROP, index++); > if (node < 0) { > -- > 2.25.1