mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus. Converting subclasses independently of their base class is prohibitively hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
40021f0888
commit
999e12bbe8
131 changed files with 2734 additions and 1297 deletions
33
hw/hpet.c
33
hw/hpet.c
|
@ -695,18 +695,27 @@ static int hpet_init(SysBusDevice *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static SysBusDeviceInfo hpet_device_info = {
|
||||
.qdev.name = "hpet",
|
||||
.qdev.size = sizeof(HPETState),
|
||||
.qdev.no_user = 1,
|
||||
.qdev.vmsd = &vmstate_hpet,
|
||||
.qdev.reset = hpet_reset,
|
||||
.init = hpet_init,
|
||||
.qdev.props = (Property[]) {
|
||||
DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS),
|
||||
DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
},
|
||||
static Property hpet_device_properties[] = {
|
||||
DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS),
|
||||
DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void hpet_device_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
|
||||
|
||||
k->init = hpet_init;
|
||||
}
|
||||
|
||||
static DeviceInfo hpet_device_info = {
|
||||
.name = "hpet",
|
||||
.size = sizeof(HPETState),
|
||||
.no_user = 1,
|
||||
.vmsd = &vmstate_hpet,
|
||||
.reset = hpet_reset,
|
||||
.props = hpet_device_properties,
|
||||
.class_init = hpet_device_class_init,
|
||||
};
|
||||
|
||||
static void hpet_register_device(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue