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.
26 * Copyright (c) 2009, Intel Corporation.
27 * All rights reserved.
33 #include <sys/cpupm.h>
39 #define CPU_MAX_CSTATES 8
41 #define CPU_ACPI_C0 IDLE_STATE_C0
42 #define CPU_ACPI_C1 IDLE_STATE_C1
43 #define CPU_ACPI_C2 IDLE_STATE_C2
44 #define CPU_ACPI_C3 IDLE_STATE_C3
48 #define BM_ARB_DIS 0x4
50 #define CPUID_TSC_INVARIANCE 0x100
52 #define CPU_IDLE_DEEP_CFG (0x1) /* Deep Idle disabled by user */
53 #define CPU_IDLE_CPR_CFG (0x2) /* In CPR */
55 typedef struct cpu_idle_kstat_s
{
56 struct kstat_named addr_space_id
; /* register address space id */
57 struct kstat_named cs_latency
; /* worst latency */
58 struct kstat_named cs_power
; /* average power consumption */
61 extern cpupm_state_ops_t cpu_idle_ops
;
63 extern void cpu_acpi_idle(void);
64 extern void cstate_wakeup(cpu_t
*, int);
65 extern boolean_t
cpu_deep_cstates_supported(void);
66 extern void cpu_wakeup(cpu_t
*, int);
67 extern void cpu_wakeup_mwait(cpu_t
*, int);
68 extern void cpuidle_manage_cstates(void *);
69 extern boolean_t
cstate_timer_callback(int code
);
75 #endif /* _CPUIDLE_H */