Skip to content

hw/arm: Store the ARM boot info in the machine state

Bin Meng qemu-arm qemu-devel 2 versions – Applied

Status from this message: Applied to target-arm.next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest20 patches 9 repliesApplied
  2. v120 patches 4 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/20hw/arm: aspeed: Store boot info in the machine statehw/arm/aspeed.c include/hw/arm/aspeed.h+9 -102 replies
2/20hw/arm: aspeed_ast27x0-fc: Store boot info in the machine statehw/arm/aspeed_ast27x0-fc.c+6 -71 reply
3/20hw/arm: bananapi_m2u: Store boot info in the machine statehw/arm/bananapi_m2u.c+15 -60 replies
4/20hw/arm: collie: Store boot info in the machine statehw/arm/collie.c+5 -70 replies
5/20hw/arm: cubieboard: Store boot info in the machine statehw/arm/cubieboard.c+15 -60 replies
6/20hw/arm: exynos4_boards: Store boot info in the board statehw/arm/exynos4_boards.c+11 -151 reply
7/20hw/arm: imx25_pdk: Store boot info in the board statehw/arm/imx25_pdk.c+5 -60 replies
8/20hw/arm: imx8mm-evk: Store boot info in the machine statehw/arm/imx8mm-evk.c+19 -100 replies
9/20hw/arm: integratorcp: Store boot info in the machine statehw/arm/integratorcp.c+16 -60 replies
10/20hw/arm: kzm: Store boot info in the board statehw/arm/kzm.c+5 -70 replies
11/20hw/arm: mcimx7d-sabre: Store boot info in the machine statehw/arm/mcimx7d-sabre.c+19 -90 replies
12/20hw/arm: musicpal: Store boot info in the machine statehw/arm/musicpal.c+15 -60 replies
13/20hw/arm: npcm7xx: Store boot info in the machine statehw/arm/npcm7xx.c hw/arm/npcm7xx_boards.c include/hw/arm/npcm7xx.h+26 -220 replies
14/20hw/arm: npcm8xx: Store boot info in the machine statehw/arm/npcm8xx.c hw/arm/npcm8xx_boards.c include/hw/arm/npcm8xx.h+22 -180 replies
15/20hw/arm: omap_sx1: Store boot info in the machine statehw/arm/omap_sx1.c+13 -61 reply
16/20hw/arm: orangepi: Store boot info in the machine statehw/arm/orangepi.c+16 -60 replies
17/20hw/arm: realview: Store boot info in the machine statehw/arm/realview.c+18 -90 replies
18/20hw/arm: sabrelite: Store boot info in the machine statehw/arm/sabrelite.c+10 -121 reply
19/20hw/arm: versatilepb: Store boot info in the machine statehw/arm/versatilepb.c+12 -42 replies
20/20hw/arm: xilinx_zynq: Store boot info in the machine statehw/arm/xilinx_zynq.c include/hw/arm/xilinx_zynq.h+10 -90 replies

Reviews trailers per patch

7 of 20 patches have a Reviewed-by or Acked-by.

PatchNiek LinnenbankAlistair FrancisPhilippe Mathieu-Daudé
1/20R-b
2/20R-b
3/20
4/20
5/20
6/20R-b
7/20
8/20
9/20
10/20
11/20
12/20
13/20
14/20
15/20R-b
16/20R-b
17/20
18/20R-b
19/20
20/20R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/20] hw/arm: Store the ARM boot info in the machine state

Most ARM board files declare their struct arm_boot_info as a static object at file scope (or, occasionally, as a function-local static inside the machine init function). arm_load_kernel() stashes a pointer to that struct in every CPU and dereferences it from do_cpu_reset() on each reset, so the boot info conceptually belongs to the machine for the lifetime of the VM, not to a static object whose ownership is left implicit.

This is a longstanding leftover pattern: modern machines such as virt, raspi and xlnx-zcu102 already keep the boot info in their MachineState subclass. This series converts the remaining machines that still use a static object, moving the struct into their machine state so that its lifetime and ownership match how arm_load_kernel() actually uses it.

Changes in v2:

Addressed 2 review comments from Peter:

- All assignments now use individual field writes (e.g.:
bpms->bootinfo.loader_start = ...). This applies to: collie, cubieboard, exynos4, imx8mm-evk, integratorcp, kzm, mcimx7d-sabre, musicpal, npcm7xx, npcm8xx, omap_sx1, realview, sabrelite
- The following boards that previously used DEFINE_MACHINE_ARM/AARCH64 now use the macro DEFINE_MACHINE_EXTENDED() instead: bananapi_m2u, cubieboard, imx8mm-evk, integratorcp, mcimx7d-sabre, musicpal, orangepi-pc

Bin Meng (20):
hw/arm: aspeed: Store boot info in the machine state hw/arm: aspeed_ast27x0-fc: Store boot info in the machine state hw/arm: bananapi_m2u: Store boot info in the machine state hw/arm: collie: Store boot info in the machine state hw/arm: cubieboard: Store boot info in the machine state hw/arm: exynos4_boards: Store boot info in the board state hw/arm: imx25_pdk: Store boot info in the board state hw/arm: imx8mm-evk: Store boot info in the machine state hw/arm: integratorcp: Store boot info in the machine state hw/arm: kzm: Store boot info in the board state hw/arm: mcimx7d-sabre: Store boot info in the machine state hw/arm: musicpal: Store boot info in the machine state hw/arm: npcm7xx: Store boot info in the machine state hw/arm: npcm8xx: Store boot info in the machine state hw/arm: omap_sx1: Store boot info in the machine state hw/arm: orangepi: Store boot info in the machine state hw/arm: realview: Store boot info in the machine state hw/arm: sabrelite: Store boot info in the machine state hw/arm: versatilepb: Store boot info in the machine state hw/arm: xilinx_zynq: Store boot info in the machine state

 hw/arm/aspeed.c              | 17 +++++++----------
 hw/arm/aspeed_ast27x0-fc.c   | 13 ++++++-------
 hw/arm/bananapi_m2u.c        | 21 +++++++++++++++------
 hw/arm/collie.c              | 12 +++++-------
 hw/arm/cubieboard.c          | 21 +++++++++++++++------
 hw/arm/exynos4_boards.c      | 26 +++++++++++---------------
 hw/arm/imx25_pdk.c           | 11 +++++------
 hw/arm/imx8mm-evk.c          | 29 +++++++++++++++++++----------
 hw/arm/integratorcp.c        | 22 ++++++++++++++++------
 hw/arm/kzm.c                 | 12 +++++-------
 hw/arm/mcimx7d-sabre.c       | 28 +++++++++++++++++++---------
 hw/arm/musicpal.c            | 21 +++++++++++++++------
 hw/arm/npcm7xx.c             | 28 +++++++++++++---------------
 hw/arm/npcm7xx_boards.c      | 10 +++++-----
 hw/arm/npcm8xx.c             | 28 +++++++++++++---------------
 hw/arm/npcm8xx_boards.c      |  2 +-
 hw/arm/omap_sx1.c            | 19 +++++++++++++------
 hw/arm/orangepi.c            | 22 ++++++++++++++++------
 hw/arm/realview.c            | 27 ++++++++++++++++++---------
 hw/arm/sabrelite.c           | 22 ++++++++++------------
 hw/arm/versatilepb.c         | 16 ++++++++++++----
 hw/arm/xilinx_zynq.c         | 17 ++++++++---------
 include/hw/arm/aspeed.h      |  2 ++
 include/hw/arm/npcm7xx.h     | 10 ++++++++--
 include/hw/arm/npcm8xx.h     | 10 ++++++++--
 include/hw/arm/xilinx_zynq.h |  2 ++
 26 files changed, 267 insertions(+), 181 deletions(-)

---
base-commit: af06b5df2610fe5de6c02d17c17bced9e9f0d47d
branch: cleanup-arm-static-boot-info

Signature · 1 line
2.53.0