[PATCH 0/6] resource: add support for walking resource gaps

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Dec 11 12:50:02 PST 2025


We currently keep track of regions with the SDRAM by requesting a struct
resource from the memory bank. We will make additional use of that to
request memory handed out to EFI applications when barebox is being used
as EFI loader.

For that purpose, we need an easy way to walk the requested memory
region and especially the gaps between them as well as support for
freeing partial regions.

Ahmad Fatoum (6):
  resource: implement resource walker
  test: self: implement resource walker selftest
  commands: iomem: add support for printing gaps
  test: py: add test for valid JSON output from iomem/clk_dump
  memory: add helpers for iterating over memory regions
  resource: implement release_region_range

 commands/iomemport.c   |  41 ++++---
 common/resource.c      | 246 +++++++++++++++++++++++++++++++++++++++++
 include/linux/ioport.h |  30 +++++
 include/memory.h       |   6 +
 test/py/test_shell.py  |  41 +++++++
 test/self/Kconfig      |   4 +
 test/self/Makefile     |   1 +
 test/self/resource.c   | 189 +++++++++++++++++++++++++++++++
 8 files changed, 545 insertions(+), 13 deletions(-)
 create mode 100644 test/self/resource.c

-- 
2.47.3




More information about the barebox mailing list