All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Wolfgang Denk <wd@denx.de>
Cc: Marek Vasut <marex@denx.de>, Jan Kiszka <jan.kiszka@siemens.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	Hai Pham <hai.pham.ud@renesas.com>,
	Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>,
	Stephen Warren <swarren@nvidia.com>,
	Lokesh Vutla <lokeshvutla@ti.com>
Subject: Re: [PATCH] Revert "arm: bootm: Disable LMB reservation for command line and board info on arm64"
Date: Mon, 9 Aug 2021 08:53:14 -0400	[thread overview]
Message-ID: <20210809125314.GM858@bill-the-cat> (raw)
In-Reply-To: <413588.1628491498@gemini.denx.de>

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

On Mon, Aug 09, 2021 at 08:44:58AM +0200, Wolfgang Denk wrote:
> 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.

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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2021-08-09 12:53 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  7:22 [PATCH] Revert "arm: bootm: Disable LMB reservation for command line and board info on arm64" Jan Kiszka
2021-07-29 15:01 ` Marek Vasut
2021-07-29 15:23   ` Tom Rini
2021-07-29 16:47     ` Marek Vasut
2021-07-29 16:58       ` Tom Rini
2021-08-02  0:54         ` Marek Vasut
2021-08-02  9:37           ` Jan Kiszka
2021-08-02 10:48             ` Marek Vasut
2021-08-02 11:36               ` Jan Kiszka
2021-08-02 11:38                 ` Marek Vasut
2021-08-02 11:54                   ` Jan Kiszka
2021-08-02 13:04                     ` Tom Rini
2021-08-02 14:03                       ` Jan Kiszka
2021-08-02 14:27                         ` Tom Rini
2021-08-02 14:34                           ` Jan Kiszka
2021-08-02 14:44                             ` Tom Rini
2021-08-05 21:52                               ` Marek Vasut
2021-08-06 16:43                                 ` Tom Rini
2021-08-02 13:00           ` Tom Rini
2021-08-05 21:53             ` Marek Vasut
2021-08-05 23:31               ` Tom Rini
2021-08-08 13:35                 ` Marek Vasut
2021-08-02 21:27 ` Tom Rini
2021-08-03 21:51   ` Tom Rini
2021-08-05 22:22     ` Marek Vasut
2021-08-06 16:49       ` Tom Rini
2021-08-08 13:45         ` Marek Vasut
2021-08-08 14:00           ` Tom Rini
2021-08-08 14:28             ` Marek Vasut
2021-08-08 14:54               ` Tom Rini
2021-08-08 15:25                 ` Marek Vasut
2021-08-08 15:57                   ` Tom Rini
2021-08-09  7:34                   ` [EXT] " Ye Li
2021-08-09 13:16                     ` Tom Rini
2021-08-09 14:11                       ` Wolfgang Denk
2021-08-09 14:21                         ` Tom Rini
2021-08-09  6:44               ` Wolfgang Denk
2021-08-09 12:53                 ` Tom Rini [this message]
2021-08-08 18:21 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210809125314.GM858@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=hai.pham.ud@renesas.com \
    --cc=jan.kiszka@siemens.com \
    --cc=lokeshvutla@ti.com \
    --cc=marex@denx.de \
    --cc=simon.k.r.goldschmidt@gmail.com \
    --cc=swarren@nvidia.com \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.