xref: /openbmc/qemu/include/hw/isa/apm.h (revision 52c95cae)
1 #ifndef APM_H
2 #define APM_H
3 
4 #include "qemu-common.h"
5 #include "hw/hw.h"
6 #include "exec/memory.h"
7 
8 #define APM_CNT_IOPORT  0xb2
9 #define ACPI_PORT_SMI_CMD APM_CNT_IOPORT
10 
11 typedef void (*apm_ctrl_changed_t)(uint32_t val, void *arg);
12 
13 typedef struct APMState {
14     uint8_t apmc;
15     uint8_t apms;
16 
17     apm_ctrl_changed_t callback;
18     void *arg;
19     MemoryRegion io;
20 } APMState;
21 
22 void apm_init(PCIDevice *dev, APMState *s, apm_ctrl_changed_t callback,
23               void *arg);
24 
25 extern const VMStateDescription vmstate_apm;
26 
27 #endif /* APM_H */
28