]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/acpi/acpi_dev_interface.h
Include hw/qdev-properties.h less
[mirror_qemu.git] / include / hw / acpi / acpi_dev_interface.h
CommitLineData
521b3673
IM
1#ifndef ACPI_DEV_INTERFACE_H
2#define ACPI_DEV_INTERFACE_H
3
2ae16a6a 4#include "qapi/qapi-types-misc.h"
521b3673 5#include "qom/object.h"
ac35f13b 6#include "hw/boards.h"
a27bd6c7 7#include "hw/qdev-core.h"
521b3673 8
eaf23bf7
IM
9/* These values are part of guest ABI, and can not be changed */
10typedef enum {
11 ACPI_PCI_HOTPLUG_STATUS = 2,
12 ACPI_CPU_HOTPLUG_STATUS = 4,
13 ACPI_MEMORY_HOTPLUG_STATUS = 8,
b097cc52 14 ACPI_NVDIMM_HOTPLUG_STATUS = 16,
d03637bc 15 ACPI_VMGENID_CHANGE_STATUS = 32,
eaf23bf7
IM
16} AcpiEventStatusBits;
17
521b3673
IM
18#define TYPE_ACPI_DEVICE_IF "acpi-device-interface"
19
20#define ACPI_DEVICE_IF_CLASS(klass) \
21 OBJECT_CLASS_CHECK(AcpiDeviceIfClass, (klass), \
22 TYPE_ACPI_DEVICE_IF)
23#define ACPI_DEVICE_IF_GET_CLASS(obj) \
24 OBJECT_GET_CLASS(AcpiDeviceIfClass, (obj), \
25 TYPE_ACPI_DEVICE_IF)
26#define ACPI_DEVICE_IF(obj) \
27 INTERFACE_CHECK(AcpiDeviceIf, (obj), \
28 TYPE_ACPI_DEVICE_IF)
29
aa1b35b9 30typedef struct AcpiDeviceIf AcpiDeviceIf;
521b3673 31
eaf23bf7
IM
32void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event);
33
521b3673
IM
34/**
35 * AcpiDeviceIfClass:
36 *
37 * ospm_status: returns status of ACPI device objects, reported
38 * via _OST method if device supports it.
eaf23bf7 39 * send_event: inject a specified event into guest
ac35f13b
IM
40 * madt_cpu: fills @entry with Interrupt Controller Structure
41 * for CPU indexed by @uid in @apic_ids array,
42 * returned structure types are:
43 * 0 - Local APIC, 9 - Local x2APIC, 0xB - GICC
521b3673
IM
44 *
45 * Interface is designed for providing unified interface
46 * to generic ACPI functionality that could be used without
47 * knowledge about internals of actual device that implements
48 * ACPI interface.
49 */
50typedef struct AcpiDeviceIfClass {
51 /* <private> */
52 InterfaceClass parent_class;
53
54 /* <public> */
55 void (*ospm_status)(AcpiDeviceIf *adev, ACPIOSTInfoList ***list);
eaf23bf7 56 void (*send_event)(AcpiDeviceIf *adev, AcpiEventStatusBits ev);
ac35f13b 57 void (*madt_cpu)(AcpiDeviceIf *adev, int uid,
80e5db30 58 const CPUArchIdList *apic_ids, GArray *entry);
521b3673
IM
59} AcpiDeviceIfClass;
60#endif