4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
29 #include <sys/hpet_acpi.h>
32 * Interface for HPET access.
40 * HPET_INFINITY is used for timers that will never expire.
42 #define HPET_INFINITY (INT64_MAX)
45 * State of initialization.
47 #define HPET_NO_SUPPORT (0)
48 #define HPET_TIMER_SUPPORT (1) /* supports main counter reads */
49 #define HPET_INTERRUPT_SUPPORT (2) /* supports interrupt/timer */
50 #define HPET_FULL_SUPPORT (3) /* supports counter and timer intr */
54 boolean_t (*install_proxy
)(void);
55 boolean_t (*callback
)(int);
57 * Next two function pointers allow CPUs to use the HPET's timer
58 * as a proxy for their LAPIC timers which stop during Deep C-State.
60 boolean_t (*use_hpet_timer
)(hrtime_t
*);
61 void (*use_lapic_timer
)(hrtime_t
);
64 #define CST_EVENT_MULTIPLE_CSTATES (128) /* callbacks for _CST changes */
65 #define CST_EVENT_ONE_CSTATE (129)
68 * unix access to the HPET is done through the hpet structure.
72 int hpet_acpi_init(int *hpet_vect
, iflag_t
*hpet_flags
);
73 void hpet_acpi_fini(void);
74 uint32_t hpet_proxy_ipl(void);