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=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 7743EC433EF for ; Fri, 17 Sep 2021 22:53:37 +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 8178160F48 for ; Fri, 17 Sep 2021 22:53:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8178160F48 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 3BE6783223; Sat, 18 Sep 2021 00:53:33 +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="PrPAXdz+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4B12A831F5; Sat, 18 Sep 2021 00:53:31 +0200 (CEST) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (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 0BDF2829FC for ; Sat, 18 Sep 2021 00:53:28 +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-x735.google.com with SMTP id 72so10572212qkk.7 for ; Fri, 17 Sep 2021 15:53:27 -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=aRHO94OnR1lbmWDFlwkaHFU65wU4UesqnidesdngmRY=; b=PrPAXdz+PqnLv0sOk385SGGRggqv5USmIXTQjJc4KSNDBAvH/sWMDtgCYqP8+CAwWb iFMw9REzJxSe2piQsicoxaq4kHnfDG6xTc5mFP/14zbANph9Cw3CiJJbFFZDFy6tcl1N DWC06eOkEcK3MWvYa+31UnnH9aMAIAiPMyvTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aRHO94OnR1lbmWDFlwkaHFU65wU4UesqnidesdngmRY=; b=MZSuzRgVDc7xq5VAPBZPrteaCBZFCjUMDnTyeLrPIReTdUFewdM7bpbq1fL/nX7OqA N9lt5q33lHKpkg6Q+fH3+bxfClZZqeCepqWl1MXL9zCiUlDUdoNlXxQZQnWVKghSddx1 DkriO81+3YYbgD4UYdJSEAhT/Z0lvAz4XTk73EeY+SoqdU44Yt/eXc5GIrCVqnUb9dfk f1AR/7J5B+E+w2qFOp+W01bBQxWwIGkAAFWOMHr3OyaKlb0vBkM7dbcZdJE7Y1gtahJ8 +J2300n42uumC84BRypZywGeDm+8Btz0gLkfK8/d+6tJ7joeD88nnCVFRdkyWlxLS70U ceJg== X-Gm-Message-State: AOAM530oztFyo0w9gtccRqOBK2lL+WTUKsNyu3SKjwH8L+WLS4ObzQvS lAi6nhMe5gFYx20W/p3cZqwamQ== X-Google-Smtp-Source: ABdhPJxVrHFgi8NyAhekJllhnlZ8/YsBrNajTJIzH1Ky6G/tjEvkpwuivRiAHx5Ih4z7fN4/2FJbYw== X-Received: by 2002:a37:88c2:: with SMTP id k185mr9531484qkd.227.1631919206614; Fri, 17 Sep 2021 15:53:26 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-11d5-faa7-99fc-5b2d.res6.spectrum.com. [2603:6081:7b01:cbda:11d5:faa7:99fc:5b2d]) by smtp.gmail.com with ESMTPSA id c17sm5481571qtq.42.2021.09.17.15.53.25 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Sep 2021 15:53:25 -0700 (PDT) Date: Fri, 17 Sep 2021 18:53:23 -0400 From: Tom Rini To: Nishanth Menon Cc: Lokesh Vutla , u-boot@lists.denx.de Subject: Re: [PATCH 1/2] arm: mach-k3: common: Make sure firmware sections are loaded prior to armv8 startup Message-ID: <20210917225323.GB8579@bill-the-cat> References: <20210831182049.24636-1-nm@ti.com> <20210831182049.24636-2-nm@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <20210831182049.24636-2-nm@ti.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 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 31, 2021 at 01:20:48PM -0500, Nishanth Menon wrote: > With Device Manager firmware in an elf file form, we cannot load the FIT > image to the exact same address as any of the executable sections of the > elf file itself is located. >=20 > However, the device tree descriptions for the ARMV8 bootloader/OS > includes DDR regions only the final sections in DDR where the Device > Manager firmware is actually executing out of. >=20 > As the R5 uC is usually operating at a slower rate than an ARMv8 MPU, > by starting the Armv8 ahead of parsing the elf and copying the correct > sections to the required memories creates a race condition where the > ARMv8 could overwrite the elf image loaded from the FIT image prior to > the R5 completing parsing and putting the correct sections of elf in > the required memory locations. OR create rather obscure debug conditions > where data in the section is being modified by ARMV8 OS while the elf > copy is in progress. >=20 > To prevent all these conditions, lets make sure that the elf parse and > copy operations are completed ahead of ARMv8 being released to execute. >=20 > We will pay a penalty of elf copy time, but that is a valid tradeoff in > comparison to debug of alternate scenarios. >=20 > Signed-off-by: Nishanth Menon Applied to u-boot/master, thanks! --=20 Tom --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFFHFkACgkQFHw5/5Y0 tywyZgv9H/AnsDHg0sVQx4C/Z4JMs9Fs1SvJPwpJqh9IIKPGpWcsgPQlzTlwG4Yv OcsS85dr710GoFBZa7r9P6dq0cvI9zydXhFZentqueHTuHSqTw0uuK9/MiqMbQD8 38QHg1iH/RbU3fXLf+As7trYorg0yXF2/AaCvlew4sKlb2iE4Dn17YULYlVfUZuU WqqSfX2IUWs9yk1xISkRJ1O5yLFtQzV+0IEQRZZZaPqH9q+4K5iFLfvBZeUah7Et lRmb3uKwWs9xIOND7f6X8kIwHas3mEMJah/Cxi8xyadCPiOVfDis5hEaCX90w9H2 Ethvzf4sp/fWygAwu/+yaxS/UrHx6OLVDaxbgxAn6i7Q/6nyT4S4geavUSiZzLWQ SpzV/vip1CQ6KnRoOZ15UcTtIHNQ14APxLM0b8lCoBw7ZFqISgfzqASo0mIaAGWQ V2lHWmudn0Moybkvnu2jyrs27UWrmVhp8jNrZqr3ov4sc4VVIzwIsr9fybgQYmPd DQS/Iauj =FZIc -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy--