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]

Re: Reserved Memory


On Tue, 2005-02-01 at 08:04 -0500, Tim Sohacki wrote:
> Is there a configuration to reserve a block of memory outside the eCos
> heap (but that is still configured as R/W memory)?  I am using a MPC8270
> PPC.
> 
> For those who are familiar with vxWorks, a macro is available,
> USER_RESERVED_MEM, to define an amount of memory that is left untouched
> by the operating system.  This memory region is reserved at the end of
> memory, ending on the highest memory address. How would this be
> accomplished with eCos?
> 
> An example memory map with a 1 MB reserved region:
>    0x0000_0000: vector stubs
>    0x0004_0000: start of program
>    0x00xx_xxxx: end of program
>    0x00xx_xxxy: start of heap
>    0x01EF_FFFF: "end of heap"              // to be added
>    0x01F0_FFFF: "start of reserved memory" // to be added
>    0x0200_0000: end of memory
> 
> This memory region will be used to store debug information across
> reboots (not power cycles), so the area must *not* be initialized to a
> known value by the operating system.

In the file .../hal/powerpc/<PLATFORM>/current/include/pkgconf/mlt*ram.h
Change these lines (or whatever you have):

#define CYGMEM_REGION_ram_SIZE (0x1000000)  /* 16MB */
                                ^^^^^^^^^
#define CYGMEM_SECTION_heap1_SIZE (0x1000000 - (size_t) CYG_LABEL_NAME (__heap1))
                                   ^^^^^^^^^

Simply set these to the end of the heap you want eCos (and RedBoot)
to access.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


-- 
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]