summaryrefslogtreecommitdiff
path: root/cmd/bdinfo.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-05 17:10:11 -0600
committerSimon Glass <sjg@chromium.org>2016-07-27 14:15:54 -0600
commit7f7ddf2a882c13e9a64eae80d1539cc05632a402 (patch)
treee5881c6decbcb8d56e6350547a6eaa37a448c3b3 /cmd/bdinfo.c
parent911954859d6dece49c3e4835faea004cfe392506 (diff)
downloadu-boot-imx-7f7ddf2a882c13e9a64eae80d1539cc05632a402.zip
u-boot-imx-7f7ddf2a882c13e9a64eae80d1539cc05632a402.tar.gz
u-boot-imx-7f7ddf2a882c13e9a64eae80d1539cc05632a402.tar.bz2
arm: Show early-malloc() usage in bdinfo
This is useful information to show how close we are to the limit. At present it is only available by enabling DEBUG in board_r.c. Make it available with the 'bdinfo' command also. Note that this affects ARM only. The bdinfo command is different for each architecture. Rather than duplicating the code it would be better to refactor it (as was done with global_data). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/bdinfo.c')
-rw-r--r--cmd/bdinfo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index f2435ab..1fb66c4 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -416,6 +416,11 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
#ifdef CONFIG_BOARD_TYPES
printf("Board Type = %ld\n", gd->board_type);
#endif
+#ifdef CONFIG_SYS_MALLOC_F
+ printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr,
+ CONFIG_SYS_MALLOC_F_LEN);
+#endif
+
return 0;
}