This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Variable RAM Sizing


I have looked in the documentation and searched the source, but have not
been able to determine how eCos knows how much RAM is actually present.  My
platform can have different amounts of DRAM installed on it.  My memory
layout files define the largest DRAM size that will occur.  This provides
the definitions CYGMEM_REGION_ram_SIZE and CYGMEM_REGION_heap1_SIZE.
However, they are only correct when the maximum amount of DRAM is installed.

I found the CYGINT_HAL_ARM_MEM_REAL_REGION_TOP CDL definition and used it to
map to the function, hal_arm_mem_real_region_top(), located in my platform
specific code.  This function returns the true top of RAM, based on the
hal_dram_size variable, which is initialized by my hal_platform_setup.h
file.

Looking at the code, redboot is the only "application" that makes use of
this.  How does eCos figure out how much RAM is really there, and how big
the heap really is?  I can find no evidence that it uses the
CYGMEM_REGION_ram_xxx or CYGMEM_REGION_heap1_xxx definitions either.  Does
it just use its own memory sizing algorithm and start at the end of the .bss
section?

Jay Foster
jay@systech.com


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


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