1e516572fSJason Baron /* 2e516572fSJason Baron * QEMU GMCH/ICH9 LPC PM Emulation 3e516572fSJason Baron * 4e516572fSJason Baron * Copyright (c) 2009 Isaku Yamahata <yamahata at valinux co jp> 5e516572fSJason Baron * VA Linux Systems Japan K.K. 6e516572fSJason Baron * 7e516572fSJason Baron * This library is free software; you can redistribute it and/or 8e516572fSJason Baron * modify it under the terms of the GNU Lesser General Public 9e516572fSJason Baron * License as published by the Free Software Foundation; either 10e516572fSJason Baron * version 2 of the License, or (at your option) any later version. 11e516572fSJason Baron * 12e516572fSJason Baron * This library is distributed in the hope that it will be useful, 13e516572fSJason Baron * but WITHOUT ANY WARRANTY; without even the implied warranty of 14e516572fSJason Baron * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15e516572fSJason Baron * Lesser General Public License for more details. 16e516572fSJason Baron * 17e516572fSJason Baron * You should have received a copy of the GNU Lesser General Public 18e516572fSJason Baron * License along with this library; if not, see <http://www.gnu.org/licenses/> 19e516572fSJason Baron */ 20e516572fSJason Baron 21e516572fSJason Baron #ifndef HW_ACPI_ICH9_H 22e516572fSJason Baron #define HW_ACPI_ICH9_H 23e516572fSJason Baron 240d09e41aSPaolo Bonzini #include "hw/acpi/acpi.h" 25e516572fSJason Baron 26e516572fSJason Baron typedef struct ICH9LPCPMRegs { 27e516572fSJason Baron /* 28e516572fSJason Baron * In ich9 spec says that pm1_cnt register is 32bit width and 29e516572fSJason Baron * that the upper 16bits are reserved and unused. 30e516572fSJason Baron * PM1a_CNT_BLK = 2 in FADT so it is defined as uint16_t. 31e516572fSJason Baron */ 32e516572fSJason Baron ACPIREGS acpi_regs; 33503b19fcSGerd Hoffmann 34cacaab8bSGerd Hoffmann MemoryRegion io; 3576a7daf9SGerd Hoffmann MemoryRegion io_gpe; 3610cc69b0SGerd Hoffmann MemoryRegion io_smi; 37503b19fcSGerd Hoffmann 38e516572fSJason Baron uint32_t smi_en; 39e516572fSJason Baron uint32_t smi_sts; 40e516572fSJason Baron 41e516572fSJason Baron qemu_irq irq; /* SCI */ 42e516572fSJason Baron 43e516572fSJason Baron uint32_t pm_io_base; 44e516572fSJason Baron Notifier powerdown_notifier; 45e516572fSJason Baron } ICH9LPCPMRegs; 46e516572fSJason Baron 47503b19fcSGerd Hoffmann void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, 48a3ac6b53SHu Tao qemu_irq sci_irq); 49e516572fSJason Baron void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base); 50e516572fSJason Baron extern const VMStateDescription vmstate_ich9_pm; 51e516572fSJason Baron 52*6f1426abSMichael S. Tsirkin void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp); 53*6f1426abSMichael S. Tsirkin 54e516572fSJason Baron #endif /* HW_ACPI_ICH9_H */ 55