mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
pc-sysfw: make sure to call qdev_init
We're not actually calling qdev_init for the pc-sysfw device. Since we create the canonical path during realize, this was causing an assert to trigger when attempting to read a link pointing to pc-sysfw. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
ec4a804792
commit
1d38574fdf
1 changed files with 8 additions and 0 deletions
|
@ -190,6 +190,8 @@ void pc_system_firmware_init(MemoryRegion *rom_memory)
|
||||||
|
|
||||||
sysfw_dev = (PcSysFwDevice*) qdev_create(NULL, "pc-sysfw");
|
sysfw_dev = (PcSysFwDevice*) qdev_create(NULL, "pc-sysfw");
|
||||||
|
|
||||||
|
qdev_init_nofail(DEVICE(sysfw_dev));
|
||||||
|
|
||||||
if (sysfw_dev->rom_only) {
|
if (sysfw_dev->rom_only) {
|
||||||
old_pc_system_rom_init(rom_memory);
|
old_pc_system_rom_init(rom_memory);
|
||||||
return;
|
return;
|
||||||
|
@ -230,11 +232,17 @@ static Property pcsysfw_properties[] = {
|
||||||
DEFINE_PROP_END_OF_LIST(),
|
DEFINE_PROP_END_OF_LIST(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int pcsysfw_init(DeviceState *dev)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void pcsysfw_class_init (ObjectClass *klass, void *data)
|
static void pcsysfw_class_init (ObjectClass *klass, void *data)
|
||||||
{
|
{
|
||||||
DeviceClass *dc = DEVICE_CLASS (klass);
|
DeviceClass *dc = DEVICE_CLASS (klass);
|
||||||
|
|
||||||
dc->desc = "PC System Firmware";
|
dc->desc = "PC System Firmware";
|
||||||
|
dc->init = pcsysfw_init;
|
||||||
dc->props = pcsysfw_properties;
|
dc->props = pcsysfw_properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue