public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] [RFC] memsize.c: adapt get_ram_size() for address spaces >32 bit
Date: Thu, 27 May 2010 22:57:55 +0200	[thread overview]
Message-ID: <20100527205755.446C4EAC238@gemini.denx.de> (raw)
In-Reply-To: <4BFECF82.60901@freescale.com>

Dear Timur Tabi,

In message <4BFECF82.60901@freescale.com> you wrote:
> 
> Scott pointed out that writing/reading memory to determine how much memory
> actually exists is dangerous.  I'm not convinced that I should be using
> get_ram_size().  I still believe that I shouldn't.

And I point out that we have been doing this for a decade on tens of
different board configurations with millions of devices in the field.

> I have not been able to find any other PowerPC system in U-boot that
> supports more memory than is mapped.  If you know of one, please tell me.

The systems I know are the opposite - initially they map more memory
than they support, then they determine the real size, then they
adjust the mapping to the real size.

> My point is that sizeof(phys_addr_t) has got nothing to do with the size of
> the read/write operation, so I think it's wrong on all platforms.

Actually it will only be wrong on systems where phys_addr_t != ulong,
but you are right.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The two most common things in the universe are hydrogen  and  stupi-
dity."

  reply	other threads:[~2010-05-27 20:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 18:11 [U-Boot] [PATCH] [RFC] memsize.c: adapt get_ram_size() for address spaces >32 bit Wolfgang Denk
2010-05-27 18:16 ` [U-Boot] [PATCH v2] " Wolfgang Denk
2010-05-27 19:46   ` Scott Wood
2010-05-27 19:57     ` Wolfgang Denk
2010-05-27 20:00       ` Scott Wood
2010-05-27 20:53         ` Wolfgang Denk
2010-05-27 18:23 ` [U-Boot] [PATCH] " Timur Tabi
2010-05-27 19:44   ` Wolfgang Denk
2010-05-27 20:01     ` Timur Tabi
2010-05-27 20:57       ` Wolfgang Denk [this message]
2010-05-27 21:05         ` Timur Tabi
2010-05-27 21:13           ` Wolfgang Denk
2010-05-27 21:10         ` Kumar Gala
2010-05-27 21:16           ` Wolfgang Denk
2010-05-27 20:06     ` Scott Wood
2010-05-27 21:06       ` Wolfgang Denk
2010-05-27 18:59 ` Wolfgang Wegner
2010-05-27 19:49   ` Wolfgang Denk

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=20100527205755.446C4EAC238@gemini.denx.de \
    --to=wd@denx.de \
    --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