aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/core/machine.c6
-rw-r--r--include/hw/boards.h1
-rw-r--r--vl.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 420c8c4d16..64e2a4ff2c 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -678,6 +678,12 @@ bool machine_mem_merge(MachineState *machine)
return machine->mem_merge;
}
+void machine_run_board_init(MachineState *machine)
+{
+ MachineClass *machine_class = MACHINE_GET_CLASS(machine);
+ machine_class->init(machine);
+}
+
static void machine_class_finalize(ObjectClass *klass, void *data)
{
MachineClass *mc = MACHINE_CLASS(klass);
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 4e14ff060e..76ce0219ff 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -32,6 +32,7 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
MachineClass *find_default_machine(void);
extern MachineState *current_machine;
+void machine_run_board_init(MachineState *machine);
bool machine_usb(MachineState *machine);
bool machine_kernel_irqchip_allowed(MachineState *machine);
bool machine_kernel_irqchip_required(MachineState *machine);
diff --git a/vl.c b/vl.c
index 5cd0c17ba0..3d8c140011 100644
--- a/vl.c
+++ b/vl.c
@@ -4559,7 +4559,7 @@ int main(int argc, char **argv, char **envp)
current_machine->boot_order = boot_order;
current_machine->cpu_model = cpu_model;
- machine_class->init(current_machine);
+ machine_run_board_init(current_machine);
realtime_init();