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