2012-11-23 07:05:06 +04:00
|
|
|
/*
|
|
|
|
* QEMU GMCH/ICH9 LPC PM Emulation
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009 Isaku Yamahata <yamahata at valinux co jp>
|
|
|
|
* VA Linux Systems Japan K.K.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, see <http://www.gnu.org/licenses/>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HW_ACPI_ICH9_H
|
|
|
|
#define HW_ACPI_ICH9_H
|
|
|
|
|
2013-02-05 20:06:20 +04:00
|
|
|
#include "hw/acpi/acpi.h"
|
2014-01-09 20:36:32 +04:00
|
|
|
#include "hw/acpi/cpu_hotplug.h"
|
2012-11-23 07:05:06 +04:00
|
|
|
|
|
|
|
typedef struct ICH9LPCPMRegs {
|
|
|
|
/*
|
|
|
|
* In ich9 spec says that pm1_cnt register is 32bit width and
|
|
|
|
* that the upper 16bits are reserved and unused.
|
|
|
|
* PM1a_CNT_BLK = 2 in FADT so it is defined as uint16_t.
|
|
|
|
*/
|
|
|
|
ACPIREGS acpi_regs;
|
2012-12-11 12:42:18 +04:00
|
|
|
|
2012-11-22 15:08:22 +04:00
|
|
|
MemoryRegion io;
|
2012-11-22 16:43:17 +04:00
|
|
|
MemoryRegion io_gpe;
|
2012-11-22 16:51:35 +04:00
|
|
|
MemoryRegion io_smi;
|
2012-12-11 12:42:18 +04:00
|
|
|
|
2012-11-23 07:05:06 +04:00
|
|
|
uint32_t smi_en;
|
|
|
|
uint32_t smi_sts;
|
|
|
|
|
|
|
|
qemu_irq irq; /* SCI */
|
|
|
|
|
|
|
|
uint32_t pm_io_base;
|
|
|
|
Notifier powerdown_notifier;
|
2014-01-09 20:36:32 +04:00
|
|
|
|
|
|
|
AcpiCpuHotplug gpe_cpu;
|
|
|
|
Notifier cpu_added_notifier;
|
2012-11-23 07:05:06 +04:00
|
|
|
} ICH9LPCPMRegs;
|
|
|
|
|
2012-12-11 12:42:18 +04:00
|
|
|
void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
|
2013-04-24 14:37:22 +04:00
|
|
|
qemu_irq sci_irq);
|
2012-11-23 07:05:06 +04:00
|
|
|
void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base);
|
|
|
|
extern const VMStateDescription vmstate_ich9_pm;
|
|
|
|
|
2013-07-24 19:56:10 +04:00
|
|
|
void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp);
|
|
|
|
|
2012-11-23 07:05:06 +04:00
|
|
|
#endif /* HW_ACPI_ICH9_H */
|