[PATCH v4 0/8] Allow showing the memory map

Simon Glass sjg at chromium.org
Mon Oct 21 10:19:24 CEST 2024


This little series adds a new 'memmap' command, intended to show the
layout of memory within U-Boot and how much memory is available for
loading images.

Changes in v4:
- Drop am65x patch as it is not needed
- Add patch to export the lmb data structure
- Add new patch to show the lmb records

Changes in v3:
- Add a new Kconfig for the extra functionality

Changes in v2:
- Split into its own patch
- Modify the existing 'meminfo' command instead

Simon Glass (8):
  common: Fix up malloc() comment in reserve_noncached()
  common: Tidy up how malloc() is inited
  global_data: Add some more accessors
  bootstage: Allow counting memory without strings
  cmd: Move meminfo command into its own file
  cmd: Update the meminfo command to show the memory map
  lmb: Export the lmb data structure
  meminfo: Show the lmb records

 cmd/Kconfig                       |  12 +++
 cmd/Makefile                      |   1 +
 cmd/mem.c                         |  19 -----
 cmd/meminfo.c                     |  99 +++++++++++++++++++++++
 common/board_f.c                  |   8 +-
 common/board_r.c                  |   3 +-
 common/bootstage.c                |  16 ++--
 common/dlmalloc.c                 |   8 +-
 common/spl/spl.c                  |   4 +-
 doc/usage/cmd/meminfo.rst         | 128 ++++++++++++++++++++++++++++++
 doc/usage/index.rst               |   1 +
 include/asm-generic/global_data.h |  30 +++++++
 include/bootstage.h               |   5 +-
 include/malloc.h                  |   8 ++
 lib/lmb.c                         |   2 +-
 test/cmd/Makefile                 |   3 +-
 test/cmd/meminfo.c                |  42 ++++++++++
 17 files changed, 347 insertions(+), 42 deletions(-)
 create mode 100644 cmd/meminfo.c
 create mode 100644 doc/usage/cmd/meminfo.rst
 create mode 100644 test/cmd/meminfo.c

-- 
2.43.0



More information about the U-Boot mailing list