All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Jan Luebbe <jlu@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 03/13] common: split out meminfo output and make it optional
Date: Mon, 20 Aug 2012 16:42:25 +0200	[thread overview]
Message-ID: <20120820144225.GX6271@game.jcrosoft.org> (raw)
In-Reply-To: <1345472428-17417-4-git-send-email-jlu@pengutronix.de>

On 16:20 Mon 20 Aug     , Jan Luebbe wrote:
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> ---
>  common/Kconfig   |    4 ++++
>  common/Makefile  |    1 +
>  common/meminfo.c |   21 +++++++++++++++++++++
>  common/startup.c |   19 -------------------
>  include/common.h |   10 ++++++++--
>  5 files changed, 34 insertions(+), 21 deletions(-)
>  create mode 100644 common/meminfo.c
> 
> diff --git a/common/Kconfig b/common/Kconfig
> index b776031..7d33c2e 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -88,6 +88,10 @@ config BANNER
>  	bool "display banner"
>  	default y
>  
> +config MEMINFO
> +	bool "display memory info"
> +	default y
> +
>  config ENVIRONMENT_VARIABLES
>  	bool "environment variables support"
>  
> diff --git a/common/Makefile b/common/Makefile
> index a1926d3..69ff5df 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -19,6 +19,7 @@ obj-$(CONFIG_MALLOC_TLSF) += tlsf.o
>  obj-$(CONFIG_MALLOC_DUMMY) += dummy_malloc.o
>  obj-y += clock.o
>  obj-$(CONFIG_BANNER) += version.o
> +obj-$(CONFIG_MEMINFO) += meminfo.o
>  obj-$(CONFIG_COMMAND_SUPPORT) += command.o
>  obj-$(CONFIG_CONSOLE_FULL) += console.o
>  obj-$(CONFIG_CONSOLE_SIMPLE) += console_simple.o
> diff --git a/common/meminfo.c b/common/meminfo.c
> new file mode 100644
> index 0000000..30b5bef
> --- /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

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-08-20 14:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 14:20 Jan Luebbe
2012-08-20 14:20 ` [PATCH 01/13] Makefile: add target to produce a SPL compatible uimage Jan Luebbe
2012-08-20 14:20 ` [PATCH 02/13] scripts: add tool to create image for SPI boot on AM35xx Jan Luebbe
2012-08-20 14:40   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-21  6:51     ` Jan Luebbe
2012-08-21 13:04       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-20 14:20 ` [PATCH 03/13] common: split out meminfo output and make it optional Jan Luebbe
2012-08-20 14:42   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-08-21  6:55     ` Jan Luebbe
2012-08-20 14:20 ` [PATCH 04/13] omap: add SPI as a boot mode for xload Jan Luebbe
2012-08-20 14:20 ` [PATCH 05/13] drivers/net/ksz8864rmn: add driver for Micrel KSZ8864RMN Ethernet Switch Jan Luebbe
2012-08-20 14:20 ` [PATCH 06/13] drivers/net: add driver for the EMAC device found in some TI SoCs Jan Luebbe
2012-08-20 14:47   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-21  6:59     ` Jan Luebbe
2012-08-21 12:16       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-20 14:20 ` [PATCH 07/13] omap3: allow enabling clocks for UART3, MMC1 and SPI Jan Luebbe
2012-08-20 14:47   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-21  7:08     ` Jan Luebbe
2012-08-21 12:15       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-20 14:20 ` [PATCH 08/13] drivers/spi: add driver for the Multichannel SPI controller found in TI SoCs Jan Luebbe
2012-08-20 14:58   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-21  7:16     ` Jan Luebbe
2012-08-21 12:14       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-20 14:20 ` [PATCH 09/13] m25p80: add JEDEC ID for Micron/Numonyx SPI NOR flash Jan Luebbe
2012-08-20 14:20 ` [PATCH 10/13] defaultenv: support NAND and NOR kernel partitions at the same time Jan Luebbe
2012-08-20 14:59   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-20 14:20 ` [PATCH 11/13] defaultenv: use /env/oftree if it exists Jan Luebbe
2012-08-20 15:00   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-20 14:20 ` [PATCH 12/13] defaultenv: support kernel and oftree on a filesystem Jan Luebbe
2012-08-20 15:00   ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-20 14:20 ` [PATCH 13/13] omap3_clock: avoid initializing cores not present on TI AM35xx Jan Luebbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120820144225.GX6271@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=jlu@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.