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=-5.8 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 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 BBD42C4338F for ; Mon, 9 Aug 2021 06:45:13 +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 9243C60527 for ; Mon, 9 Aug 2021 06:45:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9243C60527 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 09A548023C; Mon, 9 Aug 2021 08:45:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628491510; bh=3437HQfkGOIv0+o6ziW9K5xCaGKgXXOXYRl2SULNGsA=; h=To:cc:From:Subject:In-reply-to:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DDdK/nO6SFVJs33tTIRHsBbKl8FWhXJp1RrVWW01zst5q8q8E7D4t+qpu4nxdeqr6 aOZfSMkMGDvkAgHQ3L7NlB2wza7fYN/phxdmN7j5yVgUZ8+FjhtX15R7nbh/kWhGZj PjPgoMW18MSkJSHuhv3bhbyJkFd3y8FH+Hdi81OpMBPifM/5Q9QZUbmj4NMfsVZkks FWwmFbSdAMKkv3MsBaUQ4W/CetRzUv+EJ/gx4gNq4vfZjJqyPzjBc1MUchgdI0EY7r Hr6ft9heMiF6R6nHP7rOTlOMbK9PIYin+z+h1O7qehvVukwVmmvy8M5uAF9BivnNz9 P81aJciNhvq5A== Received: from janitor.denx.de (unknown [62.91.23.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: noc@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 95C188022E for ; Mon, 9 Aug 2021 08:45:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628491507; bh=3437HQfkGOIv0+o6ziW9K5xCaGKgXXOXYRl2SULNGsA=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=RqhdyUjwgkR0m04G9dxzc+H/vTbe0/sO93UW99LJ4OazGQELAKX8hcDRdHaQYPUI9 WQ7Yuu2oLoVjW/P6vbh0EjcFIFWYbmm6msazXhL6wtYfuUZ+bD5Coo1PpsnnqXqJJ+ 5WcIhlzGLNAUatlZceSHAkxPAV/F9lIUu34TXe5MAKM6MLdd074w7NdwA4yPTu9bC4 YNoSF6524rpmlH7H0tNxecsyS7GFKR/Pb2ScrJduncBfuTJa3JjR4P5YH9MtQfkDtO yBFBg7EeNScP2tfFDHPSxtqiH7KiA1OSmglelXns7fGrL0jpAmy/d4Hax8TbLI3Ldc 1aYoTrOUcLqnQ== Received: by janitor.denx.de (Postfix, from userid 108) id 4A466A01C7; Mon, 9 Aug 2021 08:45:07 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.4.0.2]) by janitor.denx.de (Postfix) with ESMTPS id B6C0EA005A; Mon, 9 Aug 2021 08:44:58 +0200 (CEST) Received: from gemini.denx.de (localhost [IPv6:::1]) by gemini.denx.de (Postfix) with ESMTP id 84A761E2304; Mon, 9 Aug 2021 08:44:58 +0200 (CEST) To: Marek Vasut cc: Tom Rini , Jan Kiszka , U-Boot Mailing List , Hai Pham , Simon Goldschmidt , Stephen Warren , Lokesh Vutla From: Wolfgang Denk Subject: Re: [PATCH] Revert "arm: bootm: Disable LMB reservation for command line and board info on arm64" MIME-Version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8bit In-reply-to: <03720507-5ea4-0fb9-0549-37df3128be2b@denx.de> 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> Comments: In-reply-to Marek Vasut message dated "Sun, 08 Aug 2021 16:28:14 +0200." Date: Mon, 09 Aug 2021 08:44:58 +0200 Message-ID: <413588.1628491498@gemini.denx.de> 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 Dear Marek, 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 > "right" amount of stack to reserve ? 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. 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(). Any assumption that a stack size of 4 kB or 16 kB or such will be sufficient is ... optimistic at best. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de On the subject of C program indentation: "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." - Blair P. Houghton