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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 BF35FC4338F for ; Sun, 15 Aug 2021 19:49:32 +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 139C56124C for ; Sun, 15 Aug 2021 19:49:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 139C56124C 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 F339482D50; Sun, 15 Aug 2021 21:49:29 +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="os+/tOc8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 75FC182DFA; Sun, 15 Aug 2021 21:49:27 +0200 (CEST) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (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 3AF4582937 for ; Sun, 15 Aug 2021 21:49:23 +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-x729.google.com with SMTP id b207so7349551qkg.9 for ; Sun, 15 Aug 2021 12:49:23 -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=HmsoLkZaVsRD5TeYuuXXlSnYwJuzIWYcA0pMar8Kn9U=; b=os+/tOc8YNWRnuT1touzn57Xdtm9xt3CBRLdlB3/LTvADPtRuPD880m5mo/zM1nzyq 9QWwx9DwqMn5EXDJno/+cclcY67xXvIYa5eV5G8NnR7EvhymTSRQdxSUQYjESke85NhD 0YwfzZy65vx3WgCE+Rw1gm969zG53dO/KJ9DI= 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=HmsoLkZaVsRD5TeYuuXXlSnYwJuzIWYcA0pMar8Kn9U=; b=ihr2vmgTUUhZYh7vcSbrg4lZEIsqgVIfcwjKg9Wnc3SlqRDNdI2JGch39TVx7UGHn6 u+dwqrDJRdK4aaPyVcq9CtKTLG3+e0bHZGxjIZAkjd9kxgfjDZwF3YSI1phPtMn9gfFy sFrP1nWqqhxeh5ACOOO0tYrhXpO1eMiA8KInOTMkSLelHTYFj+N5CTi6Ra/b9urV5nsk 04mhoYAd9Xshl1KUi35YYt6Fnaulcrl5iRs7lOoojnOgc5UbdJozDAAZfPWGp9GuVP5O NJHf3McNiwAHCmzMpkkaLhvg3oNlmNtpsS3oGQcPTENzZTAdddLlPa/8yySELe/9KITE GYPA== X-Gm-Message-State: AOAM5303/96BYmAVniD2aJhdKsMOzFq7A/1xSqth2QQQZWK97DehLGZx qn4J6dLy9XM8O/6QTlB1ja5fRQ== X-Google-Smtp-Source: ABdhPJzdUWNXeSjOWJVzA7F+9T+m6UIMmkPSQefVtVelZcYy/9m/FaYSUmzgcrKhhyqkFcK77DbLYQ== X-Received: by 2002:a37:624a:: with SMTP id w71mr12641596qkb.81.1629056962095; Sun, 15 Aug 2021 12:49:22 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-6085-4c50-20fd-dcb7.res6.spectrum.com. [2603:6081:7b01:cbda:6085:4c50:20fd:dcb7]) by smtp.gmail.com with ESMTPSA id x125sm4995663qkd.8.2021.08.15.12.49.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Aug 2021 12:49:21 -0700 (PDT) Date: Sun, 15 Aug 2021 15:49:19 -0400 From: Tom Rini To: Marek Vasut Cc: u-boot@lists.denx.de, Marek Vasut , Alexey Brodkin , Angelo Dureghello , Daniel Schwierzeck , Eugeniy Paltsev , Hai Pham , Michal Simek , Simon Goldschmidt , Wolfgang Denk Subject: Re: [PATCH 05/14] lmb: Add generic arch_lmb_reserve_generic() Message-ID: <20210815194919.GQ858@bill-the-cat> References: <20210815181314.132330-1-marek.vasut+renesas@gmail.com> <20210815181314.132330-5-marek.vasut+renesas@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hXYrTO9VFOdlBg/+" Content-Disposition: inline In-Reply-To: <20210815181314.132330-5-marek.vasut+renesas@gmail.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 --hXYrTO9VFOdlBg/+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 15, 2021 at 08:13:05PM +0200, Marek Vasut wrote: > The arc/arm/m68k/microblaze/mips/ppc arch_lmb_reserve() implementations > are all mostly the same, except for a couple of details. Implement a > generic arch_lmb_reserve_generic() function which can be parametrized > enough to cater for those differences between architectures. This can > also be parametrized enough so it can handle cases where U-Boot is not > relocated to the end of DRAM e.g. because there is some other reserved > memory past U-Boot (e.g. unmovable firmware for coprocessor), it is not > relocated at all, and other such use cases. [snip] > +void arch_lmb_reserve_generic(struct lmb *lmb, ulong sp, ulong end, ulon= g align) > +{ > + ulong bank_end; > + int bank; > + > + /* > + * Booting a (Linux) kernel image > + * > + * Allocate space for command line and board info - the > + * address should be as high as possible within the reach of > + * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused > + * memory, which means far enough below the current stack > + * pointer. > + */ This comment is wrong, and we need to fix it, rather than continue to perpetuate it. --=20 Tom --hXYrTO9VFOdlBg/+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEZb78ACgkQFHw5/5Y0 tyzLFQwAidVf1EiKx3f0Im6dimdAOCkxEeSqPcpP75Fm6auCHjA/oEhpu7vDeGeD 8EvDeC5HM1ganP9GoZhKN/K7uNZErFy/yJ1Wd+mQPp0UtJifEca+t+OCTe1h5jKx b1vZ9EJPp5aPF6N11aSjZYLMQ7fEWfpBusHZUgKivSQWaIm6uk3Ng30j8wiLtWjd OT4msjeWyqVS6hr9Pj4UtW50eJo26G9qlyjwtnY+8JraxADA+M+zKSbEyp+muwPT p39BeAqeac8p/se62X1ZMpGJ8OHEU9qc3r4/XlamJl6YZArN6kxZoco29lMOrDYz dp5X2S8D3zDCYV9TrIrgL1WCIej/bxTfnGg7Y8xGtZi0xgOaXg+MXXEVBBMMmNvQ 9qPqgHJZ0Q2QehPKhIBbO+nZiZIFqLURQTAoDpyKll/sLOdCJ+MgUHgtHTrtUUD6 0B6ff9fS/QKp3fbJ8Wv0rPjypzODDV7u8uCSux8DgEVcVWCYv05K+sSnr/H6P13W aTB8vh2R =KunE -----END PGP SIGNATURE----- --hXYrTO9VFOdlBg/+--