cpu_acpi.h revision 0e7515250c8395f368aa45fb9acae7c4f8f8b786
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CPU_ACPI_H
#define _CPU_ACPI_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* P-state related macros
*/
/*
* T-state related macros
*/
/*
* C-state realted macros
*/
#define CPU_ACPI_NONE_CACHED 0x0000
#define CPU_ACPI_PCT_CACHED 0x0001
#define CPU_ACPI_PSS_CACHED 0x0002
#define CPU_ACPI_PSD_CACHED 0x0004
#define CPU_ACPI_PPC_CACHED 0x0008
#define CPU_ACPI_PTC_CACHED 0x0010
#define CPU_ACPI_TSS_CACHED 0x0020
#define CPU_ACPI_TSD_CACHED 0x0040
#define CPU_ACPI_TPC_CACHED 0x0080
#define CPU_ACPI_CST_CACHED 0x0100
#define CPU_ACPI_CSD_CACHED 0x0200
/*
* CPU Domain Coordination Types
*/
#define CPU_ACPI_SW_ALL 0xfc
#define CPU_ACPI_SW_ANY 0xfd
#define CPU_ACPI_HW_ALL 0xfe
/*
* Container for ACPI processor state dependency information
*/
typedef struct cpu_acpi_state_dependency
{
/*
* Container for ACPI processor control register information
*/
typedef struct cpu_acpi_ctrl_regs
{
typedef cpu_acpi_ctrl_regs_t cpu_acpi_pct_t;
typedef cpu_acpi_ctrl_regs_t cpu_acpi_ptc_t;
/*
* Container for ACPI _PSS information
*/
typedef struct cpu_acpi_pstate
{
/*
* Container for _TSS information
*/
typedef struct cpu_acpi_tstate
{
/*
* Container for _CST information
*/
typedef struct cpu_acpi_cstate
{
typedef struct cpu_acpi_supported_states {
void *ss_states;
typedef int cpu_acpi_present_capabilities_t;
typedef int cpu_acpi_ppc_t;
typedef int cpu_acpi_tpc_t;
/*
* Container for cached ACPI data.
*/
typedef struct cpu_acpi_state {
int cs_id;
typedef cpu_acpi_state_t *cpu_acpi_handle_t;
extern void cpu_acpi_cache_ppc(cpu_acpi_handle_t);
extern void cpu_acpi_cache_tpc(cpu_acpi_handle_t);
extern int cpu_acpi_cache_pstate_data(cpu_acpi_handle_t);
extern void cpu_acpi_free_pstate_data(cpu_acpi_handle_t);
extern int cpu_acpi_cache_tstate_data(cpu_acpi_handle_t);
extern void cpu_acpi_free_tstate_data(cpu_acpi_handle_t);
extern int cpu_acpi_cache_cstate_data(cpu_acpi_handle_t);
extern void cpu_acpi_free_cstate_data(cpu_acpi_handle_t);
extern void cpu_acpi_install_notify_handler(cpu_acpi_handle_t,
ACPI_NOTIFY_HANDLER, void *);
extern void cpu_acpi_remove_notify_handler(cpu_acpi_handle_t,
uint32_t *);
extern void cpu_acpi_free_speeds(int *, uint_t);
extern void cpu_acpi_fini(cpu_acpi_handle_t);
#ifdef __cplusplus
}
#endif
#endif /* _CPU_ACPI_H */