2010-05-14 09:29:00 +02:00
|
|
|
#ifndef APM_H
|
|
|
|
#define APM_H
|
|
|
|
|
|
|
|
#include "qemu-common.h"
|
2013-02-04 15:40:22 +01:00
|
|
|
#include "hw/hw.h"
|
2012-12-17 18:19:49 +01:00
|
|
|
#include "exec/memory.h"
|
2010-05-14 09:29:00 +02:00
|
|
|
|
2018-02-28 15:23:50 +01:00
|
|
|
#define APM_CNT_IOPORT 0xb2
|
|
|
|
#define ACPI_PORT_SMI_CMD APM_CNT_IOPORT
|
|
|
|
|
2010-05-14 09:29:00 +02:00
|
|
|
typedef void (*apm_ctrl_changed_t)(uint32_t val, void *arg);
|
|
|
|
|
|
|
|
typedef struct APMState {
|
|
|
|
uint8_t apmc;
|
|
|
|
uint8_t apms;
|
|
|
|
|
|
|
|
apm_ctrl_changed_t callback;
|
|
|
|
void *arg;
|
2012-09-19 13:50:03 +02:00
|
|
|
MemoryRegion io;
|
2010-05-14 09:29:00 +02:00
|
|
|
} APMState;
|
|
|
|
|
2012-09-19 13:50:03 +02:00
|
|
|
void apm_init(PCIDevice *dev, APMState *s, apm_ctrl_changed_t callback,
|
|
|
|
void *arg);
|
2010-05-14 09:29:00 +02:00
|
|
|
|
|
|
|
extern const VMStateDescription vmstate_apm;
|
|
|
|
|
|
|
|
#endif /* APM_H */
|