[PATCH 03/13] common: split out meminfo output and make it optional

Jan Luebbe jlu at pengutronix.de
Tue Aug 21 02:55:59 EDT 2012


On Mon, Aug 20, 2012 at 04:42:25PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 16:20 Mon 20 Aug     , Jan Luebbe wrote:
> > --- /dev/null
> > +++ b/common/meminfo.c
> > @@ -0,0 +1,21 @@
> > +#include <common.h>
> > +#include <memory.h>
> > +#include <asm-generic/memory_layout.h>
> > +
> > +void display_meminfo(void)
> > +{
> > +	ulong mstart = mem_malloc_start();
> > +	ulong mend   = mem_malloc_end();
> > +	ulong msize  = mend - mstart + 1;
> > +
> > +	debug("barebox code: 0x%p -> 0x%p\n", _stext, _etext);
> > +	debug("bss segment:  0x%p -> 0x%p\n", __bss_start, __bss_stop);
> > +	printf("Malloc space: 0x%08lx -> 0x%08lx (size %s)\n",
> > +		mstart, mend, size_human_readable(msize));
> > +#ifdef CONFIG_ARM
> > +	printf("Stack space : 0x%08x -> 0x%08x (size %s)\n",
> > +		STACK_BASE, STACK_BASE + STACK_SIZE,
> > +		size_human_readable(STACK_SIZE));
> > +#endif
> > +}
> 
> so move it as a late_initcall

Ok. Then I'll remove the call from startup.c completely.

Thanks,
Jan
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list