Commit 7f7ddf2a882c13e9a64eae80d1539cc05632a402

Authored by Simon Glass
1 parent 911954859d

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>

Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff

... ... @@ -416,6 +416,11 @@
416 416 #ifdef CONFIG_BOARD_TYPES
417 417 printf("Board Type = %ld\n", gd->board_type);
418 418 #endif
  419 +#ifdef CONFIG_SYS_MALLOC_F
  420 + printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr,
  421 + CONFIG_SYS_MALLOC_F_LEN);
  422 +#endif
  423 +
419 424 return 0;
420 425 }
421 426