public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* AW: [ECOS] memory maps, linker control files, etc.
@ 2005-10-12  9:01 Neundorf, Alexander
  0 siblings, 0 replies; only message in thread
From: Neundorf, Alexander @ 2005-10-12  9:01 UTC (permalink / raw)
  To: Gary Thomas, Andrew Voelkel; +Cc: eCos Discussion

Hi,

> Von: ecos-discuss-owner@ecos.sourceware.org
...
> Not correct.  ROMRAM is used for RedBoot (or any monitor) and is 
> perfectly suited for loading RAM programs.  RAM mode is designed for
> general eCos applications.
> 
> The ROMRAM and RAM loader templates (.ldi files) are 
> structured so that
> memory used by one does not conflict with the other.  In most cases, 
> ROMRAM uses a chunk of low memory and RAM version are allowed to use
> everything else.

I think I see a problem there.

In redboot, main.c, there is the following code:

#ifdef CYGMEM_SECTION_heap1
    workspace_start = (unsigned char *)CYGMEM_SECTION_heap1;
    workspace_end = (unsigned char *)(CYGMEM_SECTION_heap1+CYGMEM_SECTION_heap1_SIZE);
#else
    workspace_start = (unsigned char *)CYGMEM_REGION_ram;
    workspace_end = (unsigned char *)(CYGMEM_REGION_ram+CYGMEM_REGION_ram_SIZE);
#endif


Later on, in flash.c, the last part before the end of workspace is used to store the contents of the fis:

    workspace_end = (unsigned char *)(workspace_end-fisdir_size);
    fis_work_block = workspace_end;

Later on from the application these contents can be accessed via virtual vector calls. So the application should take care not to use this area of the RAM. I'm no ldi-files expert, but AFAICT e.g. hal/arm/xscale/ixdp425/current/include/pkgconf/mlt_arm_xscale_ixdp425_ram.ldi doesn't take this into account:

MEMORY
{
    ram : ORIGIN = 0, LENGTH = 0x10000000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
    SECTION_rom_vectors (ram, 0x80000, LMA_EQ_VMA)
    SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}

Do I misunderstand something and there is a lock, or is it missing ?
If it is missing, how can it be done ?

Bye
Alex

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-12  9:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-12  9:01 AW: [ECOS] memory maps, linker control files, etc Neundorf, Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).