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: Memory Mapped Peripherals


> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Michele
> Portolan
> Sent: 11 May 2004 08:36
> To: ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] Memory Mapped Peripherals
>
>
>
>
> > "Michele Portolan" <michele.Portolan@imag.fr> writes:
> >
> > > Does eCos supports memory mapped devices?
> > > If yes, can anyone give me some hints on how to structure a device
> driver
> > > (ex: how to assign a given memory space to my device) ?
> >
> > You don't need to do anything. If the device is memory mapped then you
> > can just access the device registers in memory with conventional
> > memory reads and writes.
>
> What I fearead was that some memory allocation (either static or
> dynamic, it
> does not matter) would overwrite the space reserved to the peripheral. Is
> there any possibility of something like that to happen?

'Memory-mapped' doesn't mean 'mapped over the memory' as such, it just
means, as Nick says, that you can access it using the type of access you
would use to access memory.

The memory map of your system will clearly allocate address ranges to the
memory device(s) and all the peripherals. These address ranges will not
overlap each other. For example, RAM may go from address 0x00000 to address
0x10000, and your peripheral may go from address 0x40000 to address 0x40040.
Therefore you cannot allocate memory (which will be in the RAM) which will
overlap (hence overwrite) any peripheral.

Robert Cragie, Design Engineer
_______________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT,  UK
http://www.jennic.com  Tel: +44 (0) 114 281 2655
_______________________________________________________________


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