2 * QEMU ICH9 TCO emulation
4 * Copyright (c) 2015 Paulo Alcantara <pcacjr@zytor.com>
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
13 #include "exec/memory.h"
14 #include "migration/vmstate.h"
16 /* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */
17 #define TCO_TICK_NSEC 600000000LL
19 /* TCO I/O register offsets */
35 /* TCO I/O register control/status bits */
40 TCO_TMR_HLT
= 1 << 11,
42 TCO_SECOND_TO_STS
= 1 << 1,
43 TCO_BOOT_STS
= 1 << 2,
46 /* TCO I/O registers mask bits */
49 TCO1_STS_MASK
= 0xe870,
50 TCO2_STS_MASK
= 0xfff8,
51 TCO1_CNT_MASK
= 0xfeff,
55 typedef struct TCOIORegs
{
79 void acpi_pm_tco_init(TCOIORegs
*tr
, MemoryRegion
*parent
);
81 extern const VMStateDescription vmstate_tco_io_sts
;
83 #endif /* HW_ACPI_TCO_H */