1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef HW_ACPI_ICH9_H
22#define HW_ACPI_ICH9_H
23
24#include "hw/acpi/acpi.h"
25#include "hw/acpi/cpu_hotplug.h"
26#include "hw/acpi/cpu.h"
27#include "hw/acpi/memory_hotplug.h"
28#include "hw/acpi/acpi_dev_interface.h"
29#include "hw/acpi/tco.h"
30
31typedef struct ICH9LPCPMRegs {
32
33
34
35
36
37 ACPIREGS acpi_regs;
38
39 MemoryRegion io;
40 MemoryRegion io_gpe;
41 MemoryRegion io_smi;
42
43 uint32_t smi_en;
44 uint32_t smi_en_wmask;
45 uint32_t smi_sts;
46
47 qemu_irq irq;
48
49 uint32_t pm_io_base;
50 Notifier powerdown_notifier;
51
52 bool cpu_hotplug_legacy;
53 AcpiCpuHotplug gpe_cpu;
54 CPUHotplugState cpuhp_state;
55
56 MemHotplugState acpi_memory_hotplug;
57
58 uint8_t disable_s3;
59 uint8_t disable_s4;
60 uint8_t s4_val;
61 uint8_t smm_enabled;
62 bool enable_tco;
63 TCOIORegs tco_regs;
64} ICH9LPCPMRegs;
65
66void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
67 bool smm_enabled,
68 qemu_irq sci_irq);
69
70void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base);
71extern const VMStateDescription vmstate_ich9_pm;
72
73void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp);
74
75void ich9_pm_device_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
76 Error **errp);
77void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
78 DeviceState *dev, Error **errp);
79void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
80 Error **errp);
81
82void ich9_pm_ospm_status(AcpiDeviceIf *adev, ACPIOSTInfoList ***list);
83#endif
84