[U-Boot] [PATCH] omap3evm: Pass 'mem' argument to linux kernel

Wolfgang Denk wd at denx.de
Wed Sep 28 20:53:17 CEST 2011


Dear "Premi, Sanjeev",

In message <B85A65D85D7EB246BE421B3FB0FBB59302577A8A72 at dbde02.ent.ti.com> you wrote:
>
> > Can't the get_ram_size() function be used for detecting the actual
> > amount of RAM? and then the memory tag or FDT equivalent
> > (if there is one) used to pass the memory size information?
> 
> Yes something like this can be done, but that would mean string
> manipulation at run-time. Question is - when we should/ shouldn't
> do this manipulation.

I don't understand what you are trying to say.

There are two possibilities:

- In a FDT enabled kernel, memory information is passed in the device
  tree; no "string manipulation" is needed anywhere.  If the user
  decides to overwrite the auto-detected settings by using a "mem="
  boot argument, this is his decision and of course he can do so.

- Without FDT support, on ARM systems we pass a memory information in
  one or more ATAG_MEM entries.  Again, no "string manipulation" is
  needed anywhere.

> If user wants to explicitly pass only a portion of memory to Linux
> using environment variables, we shouldn't be manipulating the
> bootargs.

This statement makes even less ense to me.  Passing a "mem=" boot
argument is the official, documented way to acchive this.  So what
makes you think we should not pass such a boot argument?

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
How many seconds are there in a year? If I tell you there are 3.155 x
10^7, you won't even try to remember it. On the other hand, who could
forget that, to within half a percent, pi seconds is a nanocentury.
                                                - Tom Duff, Bell Labs


More information about the U-Boot mailing list