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

-- 
rnf



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