This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DRAM sizing


On Wed, Nov 30, 2005 at 10:04:33AM -0600, Jerry wrote:
> Dear Ecos:
> 
>         Just started work on the ATCA-7010(dual IXP2800 ARM platform).
>         Intel has delivered the base board with the DRAM size hardcoded to
> 768MG.  CYGMEM_REGION.ram_SIZE is the default value and hal_dram_size
> is set to 768MG(hal_platform_setup.h/hal_plaform_extras.h).  
>        I need to modify the code to dynamically determine the amount of 
> RDRAM.
>        Somewhat new to this so would appreciate some quidance.

You need to look at the code which initializes the SDRAM
controller. You will probably need to extend this code to determine
the RAM size. Sometimes the datasheet for the processor tells you how
to do it. 

One method is to set the SDRAM controller to driver much more memory
than you expect, eg 2Gbyte. Then write some magic number into the
memory at a low location and try to find it again higher up in
memory. If you do find it you known the same memory is mapped twice so
you need to reduce the enabled memory and try again. The actual
algorithm depends on if you only support 2^X boundaries, or you also
allow 2^X+2^Y which can happen when you have two SDRAM sockets and
different sizes are plugged in.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]