1 #include "qemu/osdep.h" 2 #include "hw/acpi/acpi_dev_interface.h" 3 #include "hw/acpi/acpi_aml_interface.h" 4 #include "qemu/module.h" 5 6 void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event) 7 { 8 AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev); 9 if (adevc->send_event) { 10 AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev); 11 adevc->send_event(adev, event); 12 } 13 } 14 15 static void register_types(void) 16 { 17 static const TypeInfo acpi_dev_if_info = { 18 .name = TYPE_ACPI_DEVICE_IF, 19 .parent = TYPE_INTERFACE, 20 .class_size = sizeof(AcpiDeviceIfClass), 21 }; 22 static const TypeInfo acpi_dev_aml_if_info = { 23 .name = TYPE_ACPI_DEV_AML_IF, 24 .parent = TYPE_INTERFACE, 25 .class_size = sizeof(AcpiDevAmlIfClass), 26 }; 27 28 29 type_register_static(&acpi_dev_if_info); 30 type_register_static(&acpi_dev_aml_if_info); 31 } 32 33 type_init(register_types) 34