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,URIBL_BLOCKED,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 A8D4AC4338F for ; Mon, 9 Aug 2021 12:53:27 +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 BBE7960E93 for ; Mon, 9 Aug 2021 12:53:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BBE7960E93 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 A3E5781468; Mon, 9 Aug 2021 14:53:24 +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="qQV4zfIS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0E55681E47; Mon, 9 Aug 2021 14:53:23 +0200 (CEST) Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (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 98D3381468 for ; Mon, 9 Aug 2021 14:53:18 +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-qv1-xf31.google.com with SMTP id js7so8841906qvb.4 for ; Mon, 09 Aug 2021 05:53:18 -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=IJfWevK3giOrAyNuFsBn7kszfiqa/wjp/L6uwt4ZlAE=; b=qQV4zfISfK1rYLPH5HX2JsUWFP3usB6F9gYDvWwSBr6o80imXeNMAagZiL6iVe6mKI 5RzrH8yn4hl/fJ71ytyOAl8BQuTb/qN90snqYcxShSiIdfc0CRKJ2pmbWhyLjPeWDadP UtUKskZlFKWTQndurJISpn/iRi9Ynw5esD2bk= 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=IJfWevK3giOrAyNuFsBn7kszfiqa/wjp/L6uwt4ZlAE=; b=gIf6V6LUpYzGkZMc8TB7gPZilclKp8ux1x2P3OXumuEtKmDsy2vTw1dwGreObioy7U bIXx45kXp56K8o984qSKO95Xq+2Wxy9qG/BdXcAu3icKhahZcVH1YHkkie69B80ifBUT CFqPNK7IAOn8XQTzdKYodntyyosAzXcrscReJ0RYAuRqfptZjj27fpNc4ZH1TRjYeEOf sMDTMWHZVcLIDIR2b1G2V6lJ0upuINQLD758NIYE3SalP+ti4a2d+sO6FzkqihDsEZpm 11tHLd2xChI+iJ4JBQTi8oFgpP8KaIvw9Mkowtg4od6BW+1IJT3L+bRKTkm0wKK9JVXY aarA== X-Gm-Message-State: AOAM53090cJYmu9SWbvRjkGixoNu/fVqbP/WhowikULezkkhOkT9cWF3 9pdwnlnb7GOsQcX2XplzfhMsmQ== X-Google-Smtp-Source: ABdhPJwdA89TYwv86Q2JeFCKte5H4JcuQ0P6nQtWgWVtFMyQuyGmmy+79gCFTRduROwXPRqT6QEimA== X-Received: by 2002:a0c:aa42:: with SMTP id e2mr12450546qvb.23.1628513597126; Mon, 09 Aug 2021 05:53:17 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-74d7-5a21-e666-aea2.res6.spectrum.com. [2603:6081:7b01:cbda:74d7:5a21:e666:aea2]) by smtp.gmail.com with ESMTPSA id v7sm9117109qkd.41.2021.08.09.05.53.16 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Aug 2021 05:53:16 -0700 (PDT) Date: Mon, 9 Aug 2021 08:53:14 -0400 From: Tom Rini To: Wolfgang Denk Cc: Marek Vasut , Jan Kiszka , U-Boot Mailing List , Hai Pham , Simon Goldschmidt , Stephen Warren , Lokesh Vutla Subject: Re: [PATCH] Revert "arm: bootm: Disable LMB reservation for command line and board info on arm64" Message-ID: <20210809125314.GM858@bill-the-cat> References: <1971775f-28de-83d0-9459-a4e68c744a18@siemens.com> <20210802212759.GD9379@bill-the-cat> <20210803215144.GW9379@bill-the-cat> <015eed03-b945-8757-e994-17d17de45546@denx.de> <20210806164917.GB858@bill-the-cat> <4aff44db-6a83-bcce-a405-1662187983b2@denx.de> <20210808140010.GH858@bill-the-cat> <03720507-5ea4-0fb9-0549-37df3128be2b@denx.de> <413588.1628491498@gemini.denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+7qMzvEgojnlfQ4q" Content-Disposition: inline In-Reply-To: <413588.1628491498@gemini.denx.de> 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 --+7qMzvEgojnlfQ4q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 09, 2021 at 08:44:58AM +0200, Wolfgang Denk wrote: > Dear Marek, >=20 > In message <03720507-5ea4-0fb9-0549-37df3128be2b@denx.de> you wrote: > > > > The IMX thing is odd indeed and raises a bigger question -- what is the= =20 > > "right" amount of stack to reserve ? >=20 > In the original U-Boot design (which is still documented in the > README, see section "Memory Management", start reading at "typical > memory configuration") The stack was located below the lowest > reserved address range, so it could grow downward, only limited by > available memory size. And yes, it was the responsibility of the > user to make sure not to overwrite it for example by loading images > at too high addresses or running "mw" with unsuitable address or > size. >=20 > What I want to point out is: there are probably a number of areas in > U-Boot which are based on this assumption, as reserving buffers or > the like on the stack is a much cheaper operation with much less > potential for memory leaks etc. than using malloc(). >=20 > Any assumption that a stack size of 4 kB or 16 kB or such will be > sufficient is ... optimistic at best. Ah right, and here's why we call, in the kernel path, the LMB code where we do. We take the current stack pointer, round it, relocate device tree/initrd and then go away. --=20 Tom --+7qMzvEgojnlfQ4q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmERJS8ACgkQFHw5/5Y0 tyxLAwv/XR6K27I3qy37sRCeqJgkv3Rrz1A3j8QGCDOp5/w7W6XhSX52DPwzu4V6 ghoSzsAWmkpQpAsk2JbMW2/w3QwXZxbjWVJ0z5wcgTIV9B4qZP2gvRN9XQwhh9YB oO3F1PBgKhLEqVeZm4xNSxxiJb/OsC4uZYvjPXLTVcqL6kCdnp1HxY4b2n5fw+3M o3M1jN6m0SyuyP+bLaccN7/APMG9k6OMWtLSkHtfonxutiPHBV973YtZFoBZXdkO Y2Dt4SS+SiVmvyzpuCVn670BFb09QjgVkzyIc5dr9nAcQ5Ke/vGSiFTppYv0abKQ rpiq4hclVb9Yz70Pn67CjiSfS9v1YCkcLzsO89Si2xauVqj6tKp/hYV4ccqhkHtW rBcvKaPk0sRezknQJzEyGf91IL3u1mDS62lciPJxlmO8yUfYeOEmALmIxGPJjG7D V7ACTFRejQPN/aSg8wn571p+Bj4OaCLh2NE/PubTVIrAfO7EPER+ZHVeGG3mL6vo 4yi9Kg60 =sjZu -----END PGP SIGNATURE----- --+7qMzvEgojnlfQ4q--