hw/arm: collie: Store boot info in the machine state
arm_load_kernel() keeps a pointer to the boot info struct for the lifetime of the VM, so the struct logically belongs to the machine rather than to a file scoped static object. Move the boot info into the existing CollieMachineState. As in the xlnx-zcu102 and raspi machines, the boot info belongs to the machine rather than to a static object: 4d1ac883a7 ("hw/arm: xlnx-zcu102: Move arm_boot_info into XlnxZCU102") 0f15c6e338 ("hw/arm/raspi: Move arm_boot_info structure to RaspiMachineState") Signed-off-by: Bin Meng <bin.meng@processmission.com> Message-id: 20260816131300.51799-5-bin.meng@processmission.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Bin Meng committed
Aug 16, 2026 at 21:12 UTC
9130e284e4e8fdca7994bafe313dc69a03f5f5a5
1 file changed
+5
-7
hw/arm/collie.c
+5
-7
@@ -30,16 +30,12 @@ struct CollieMachineState {
30
MachineState parent;
31
32
StrongARMState *sa1110;
33
+ struct arm_boot_info bootinfo;
34
};
35
36
#define TYPE_COLLIE_MACHINE MACHINE_TYPE_NAME("collie")
37
OBJECT_DECLARE_SIMPLE_TYPE(CollieMachineState, COLLIE_MACHINE)
38
38
-static struct arm_boot_info collie_binfo = {
39
- .loader_start = SA_SDCS0,
40
- .ram_size = RAM_SIZE,
41
-};
42
-
39
static void collie_init(MachineState *machine)
40
{
41
MachineClass *mc = MACHINE_GET_CLASS(machine);
@@ -66,8 +62,10 @@ static void collie_init(MachineState *machine)
62
63
sysbus_create_simple("scoop", 0x40800000, NULL);
64
69
- collie_binfo.board_id = 0x208;
70
- arm_load_kernel(cms->sa1110->cpu, machine, &collie_binfo);
65
+ cms->bootinfo.loader_start = SA_SDCS0;
66
+ cms->bootinfo.ram_size = RAM_SIZE;
67
+ cms->bootinfo.board_id = 0x208;
68
+ arm_load_kernel(cms->sa1110->cpu, machine, &cms->bootinfo);
69
}
70
71
static void collie_machine_class_init(ObjectClass *oc, const void *data)