public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: u-boot@lists.denx.de, Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 1/2] board: stemmy: Parse atags to get available memory
Date: Wed, 14 Jul 2021 16:53:11 -0400	[thread overview]
Message-ID: <20210714205311.GE9516@bill-the-cat> (raw)
In-Reply-To: <20210707105855.89260-1-stephan@gerhold.net>

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

On Wed, Jul 07, 2021 at 12:58:54PM +0200, Stephan Gerhold wrote:

> At the moment the "stemmy" board attempts to detect the RAM size with
> a simple memory test (get_ram_size()). Unfortunately, this does not work
> correctly for devices with 768 MiB RAM (e.g. Samsung Galaxy Ace 2
> (GT-I8160), "codina"). Reading/writing memory after the 768 MiB RAM
> succeeds but actually overwrites some earlier parts of the memory.
> 
> For U-Boot this does not result in any major problems, but on Linux
> this will eventually lead to strange crashes because of the memory
> corruption.
> 
> Since the "stemmy" U-Boot port is designed to be chainloaded from
> the original Samsung bootloader, the most reliable way to get the
> available amount of RAM is to look at the ATAGS passed by the Samsung
> bootloader. Fortunately, the header used to generate ATAGS in U-Boot
> (asm/setup.h) can also be easily used to parse them.
> 
> Also clarify and simplify stemmy.h a bit to make it more clear where
> some of the magic values in there are actually coming from.
> 
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Applied to u-boot/master, thanks!

-- 
Tom

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

      parent reply	other threads:[~2021-07-14 20:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 10:58 [PATCH 1/2] board: stemmy: Parse atags to get available memory Stephan Gerhold
2021-07-07 10:58 ` [PATCH 2/2] board: stemmy: Copy atags for booting downstream/vendor kernel Stephan Gerhold
2021-07-07 23:54   ` Linus Walleij
2021-07-14 20:53   ` Tom Rini
2021-07-07 23:53 ` [PATCH 1/2] board: stemmy: Parse atags to get available memory Linus Walleij
2021-07-14 20:53 ` Tom Rini [this message]

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=20210714205311.GE9516@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=linus.walleij@linaro.org \
    --cc=stephan@gerhold.net \
    --cc=u-boot@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox