[PATCH v2 0/7] Allow showing the memory map

Simon Glass sjg at chromium.org
Fri Oct 11 23:40: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 v2:
- Split into its own patch
- Modify the existing 'meminfo' command instead

Simon Glass (7):
  common: Fix up malloc() comment in reserve_noncached()
  common: Tidy up how malloc() is inited
  am65x: Use map_to_sysmem() to convert from pointer
  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

 arch/arm/mach-k3/am65x/am654_init.c |  11 +--
 cmd/Kconfig                         |   1 +
 cmd/Makefile                        |   1 +
 cmd/mem.c                           |  19 -----
 cmd/meminfo.c                       |  72 ++++++++++++++++
 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           | 126 ++++++++++++++++++++++++++++
 doc/usage/index.rst                 |   1 +
 include/asm-generic/global_data.h   |  30 +++++++
 include/bootstage.h                 |   5 +-
 include/malloc.h                    |   8 ++
 test/cmd/Makefile                   |   3 +-
 test/cmd/meminfo.c                  |  38 +++++++++
 17 files changed, 308 insertions(+), 46 deletions(-)
 create mode 100644 cmd/meminfo.c
 create mode 100644 doc/usage/cmd/meminfo.rst
 create mode 100644 test/cmd/meminfo.c

-- 
2.34.1



More information about the U-Boot mailing list