2 * QEMU ICH9 TCO emulation (total cost of ownership)
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"
15 /* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */
16 #define TCO_TICK_NSEC 600000000LL
18 /* TCO I/O register offsets */
34 /* TCO I/O register control/status bits */
39 TCO_TMR_HLT
= 1 << 11,
41 TCO_SECOND_TO_STS
= 1 << 1,
42 TCO_BOOT_STS
= 1 << 2,
45 /* TCO I/O registers mask bits */
48 TCO1_STS_MASK
= 0xe870,
49 TCO2_STS_MASK
= 0xfff8,
50 TCO1_CNT_MASK
= 0xfeff,
54 typedef struct TCOIORegs
{
78 void acpi_pm_tco_init(TCOIORegs
*tr
, MemoryRegion
*parent
);
80 extern const VMStateDescription vmstate_tco_io_sts
;
82 #endif /* HW_ACPI_TCO_H */