[PATCH v2 0/2] xen/device-tree: FDT dump helper and common discard_initial_modules()

Oleksii Kurochko posted 2 patches 1 week, 4 days ago
xen/Kconfig.debug                       |  10 ++
xen/arch/arm/domain_build.c             |   2 +
xen/arch/arm/include/asm/setup.h        |   2 -
xen/arch/arm/setup.c                    |  39 +----
xen/common/device-tree/Makefile         |   1 +
xen/common/device-tree/bootinfo.c       |  30 ++++
xen/common/device-tree/dom0less-build.c |   3 +
xen/common/device-tree/fdt-dump.c       | 185 ++++++++++++++++++++++++
xen/include/xen/bootfdt.h               |  16 ++
xen/include/xen/bootinfo.h              |   8 +
10 files changed, 257 insertions(+), 39 deletions(-)
create mode 100644 xen/common/device-tree/fdt-dump.c
[PATCH v2 0/2] xen/device-tree: FDT dump helper and common discard_initial_modules()
Posted by Oleksii Kurochko 1 week, 4 days ago
Two small, independent device-tree changes. Arm is the only user of both
at the moment; RISC-V is going to use them as well.

Patch 1 moves discard_initial_modules() from Arm to common device-tree
code, as everything it uses is already common, so that other device-tree
based architectures can reuse it. No functional change.

Patch 2 adds device_tree_dump(), which prints an FDT in a DTS-like format
under CONFIG_DEVICE_TREE_DEBUG, to make it possible to inspect the device
tree Xen generates for a dom0less domain.

Build-tested on arm64 and arm32.

CI tests: https://gitlab.com/xen-project/people/olkur/xen/-/pipelines/2930332473

---
v2:
 - Update the order of the patches.
 - Address other comments from ML.
 ---

Oleksii Kurochko (2):
  xen/device-tree: move discard_initial_modules() to common code
  xen/device-tree: add a helper to dump an FDT in DTS-like format

 xen/Kconfig.debug                       |  10 ++
 xen/arch/arm/domain_build.c             |   2 +
 xen/arch/arm/include/asm/setup.h        |   2 -
 xen/arch/arm/setup.c                    |  39 +----
 xen/common/device-tree/Makefile         |   1 +
 xen/common/device-tree/bootinfo.c       |  30 ++++
 xen/common/device-tree/dom0less-build.c |   3 +
 xen/common/device-tree/fdt-dump.c       | 185 ++++++++++++++++++++++++
 xen/include/xen/bootfdt.h               |  16 ++
 xen/include/xen/bootinfo.h              |   8 +
 10 files changed, 257 insertions(+), 39 deletions(-)
 create mode 100644 xen/common/device-tree/fdt-dump.c


base-commit: 63d0e8cc842975e786455f8a2e6502e85685f258
-- 
2.55.0