This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: ARM - Platform specific memory layout
- From: Robin Farine <robin dot farine at acn-group dot ch>
- To: eCos patches ml <ecos-patches at sources dot redhat dot com>
- Date: 13 Feb 2003 09:14:03 +0100
- Subject: Re: ARM - Platform specific memory layout
- References: <1045084017.13502.4110.camel@hermes.chez-thomas.org>
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