This is the mail archive of the ecos-patches@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: ARM - Platform specific memory layout


On Thu, 2003-02-13 at 01:14, Robin Farine wrote:
> On Wed, 2003-02-12 at 22:06, Gary Thomas wrote:
> 
> > +2003-02-12  Gary Thomas  <gary@mlbassoc.com> inspired by
> > +2003-02-12  Robin Farine <robin.farine@acn-group.ch>	
> > +
> > +	* src/redboot_linux_exec.c: Allow platform to override memory layout.
> > +	Also, give error if no "-b" option and base/load address unknown.	
> 
> Thanks Gary. Just a question:
> 
> > +#ifndef CYGHWR_REDBOOT_LINUX_ATAG_MEM
> > +#define CYGHWR_REDBOOT_LINUX_ATAG_MEM(_p_)                                                      \
> > +    /* Next ATAG_MEM. */                                                                        \
> > +    _p_->hdr.size = (sizeof(struct tag_mem32) + sizeof(struct tag_header))/sizeof(long);        \
> > +    _p_->hdr.tag = ATAG_MEM;                                                                    \
> > +    /* Round up so there's only one bit set in the memory size.                                 \
> > +     * Don't double it if it's already a power of two, though.                                  \
> > +     */                                                                                         \
> > +    _p_->u.mem.size  = 1<<hal_msbindex(CYGMEM_REGION_ram_SIZE);                                 \
> > +    if (_p_->u.mem.size < CYGMEM_REGION_ram_SIZE)                                               \
> > +	    _p_->u.mem.size <<= 1;                                                              \
> > +    _p_->u.mem.start = CYGARC_PHYSICAL_ADDRESS(CYGMEM_REGION_ram);
> > +#endif
> 
> Why did you remove the CYG_MACRO_START/END stuff? The line below could
> end with a ';', this helps auto-indenting editors in doing it right.
> 
> > +    CYGHWR_REDBOOT_LINUX_ATAG_MEM(params)
> 

Just lazy (I retyped this instead of using the old patch).
Since the only use of this macro was in this file and I knew
there was no ";", I didn't bother.

I'll add them in, just for completeness.

p.s. I did think about this just as I hit "commit" yesterday :-)

-- 
------------------------------------------------------------
Gary Thomas                 |
MLB Associates              |  Consulting for the
+1 (970) 229-1963           |    Embedded world
http://www.mlbassoc.com/    |
email: <gary@mlbassoc.com>  |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------


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