diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2024-02-20 16:06:14 +0000 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-02-22 12:47:40 +0100 |
| commit | 859eb5eeb4ac1b451841ad8a193f1454311ff1a6 (patch) | |
| tree | c6d9ba193581ffa9daacaa6e4854e0c15a010c9d /include | |
| parent | 2df87da19091b3c4674a3d1504232a86dec7e529 (diff) | |
| download | focaccia-qemu-859eb5eeb4ac1b451841ad8a193f1454311ff1a6.tar.gz focaccia-qemu-859eb5eeb4ac1b451841ad8a193f1454311ff1a6.zip | |
hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()
In the i386 PC machine, we want to run the pc_cmos_init_late() function only once the IDE and floppy drive devices have been set up. We currently do this using qemu_register_reset(), and then have the function call qemu_unregister_reset() on itself, so it runs exactly once. This was an expedient way to do it back in 2010 when we first added this (in commit c0897e0cb94e8), but now we have a more obvious point to do "machine initialization that has to happen after generic device init": the machine-init-done hook. Do the pc_cmos_init_late() work from our existing PC machine init done hook function, so we can drop the use of qemu_register_reset() and qemu_unregister_reset(). Because the pointers to the devices we need (the IDE buses and the RTC) are now all in the machine state, we don't need the pc_cmos_init_late_arg struct and can just pass the PCMachineState pointer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240220160622.114437-3-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions