On Sun, 16 Aug 2026 at 14:15, Bin Meng <bin.meng@processmission.com> wrote:
>
>
> 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
>
Applied to target-arm.next, thanks.
-- PMM