cpu_acpi.h revision 5cff782560a1c3cf913ba5574a5123a299f3315e
5cff782560a1c3cf913ba5574a5123a299f3315emh * CDDL HEADER START
5cff782560a1c3cf913ba5574a5123a299f3315emh * The contents of this file are subject to the terms of the
5cff782560a1c3cf913ba5574a5123a299f3315emh * Common Development and Distribution License (the "License").
5cff782560a1c3cf913ba5574a5123a299f3315emh * You may not use this file except in compliance with the License.
5cff782560a1c3cf913ba5574a5123a299f3315emh * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5cff782560a1c3cf913ba5574a5123a299f3315emh * See the License for the specific language governing permissions
5cff782560a1c3cf913ba5574a5123a299f3315emh * and limitations under the License.
5cff782560a1c3cf913ba5574a5123a299f3315emh * When distributing Covered Code, include this CDDL HEADER in each
5cff782560a1c3cf913ba5574a5123a299f3315emh * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5cff782560a1c3cf913ba5574a5123a299f3315emh * If applicable, add the following below this CDDL HEADER, with the
5cff782560a1c3cf913ba5574a5123a299f3315emh * fields enclosed by brackets "[]" replaced with your own identifying
5cff782560a1c3cf913ba5574a5123a299f3315emh * information: Portions Copyright [yyyy] [name of copyright owner]
5cff782560a1c3cf913ba5574a5123a299f3315emh * CDDL HEADER END
5cff782560a1c3cf913ba5574a5123a299f3315emh * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
5cff782560a1c3cf913ba5574a5123a299f3315emh * Use is subject to license terms.
5cff782560a1c3cf913ba5574a5123a299f3315emh#pragma ident "%Z%%M% %I% %E% SMI"
5cff782560a1c3cf913ba5574a5123a299f3315emhextern "C" {
5cff782560a1c3cf913ba5574a5123a299f3315emh#define CPU_ACPI_PSTATES_COUNT(sp) sp->cs_pstates->pss_count
5cff782560a1c3cf913ba5574a5123a299f3315emh#define CPU_ACPI_PSTATE(sp, i) &sp->cs_pstates->pss_pstates[i]
5cff782560a1c3cf913ba5574a5123a299f3315emh#define CPU_ACPI_IS_OBJ_CACHED(sp, obj) (sp->cpu_acpi_cached & obj)
5cff782560a1c3cf913ba5574a5123a299f3315emh#define CPU_ACPI_OBJ_IS_CACHED(sp, obj) (sp->cpu_acpi_cached |= obj)
5cff782560a1c3cf913ba5574a5123a299f3315emh#define CPU_ACPI_OBJ_IS_NOT_CACHED(sp, obj) (sp->cpu_acpi_cached &= ~obj)
5cff782560a1c3cf913ba5574a5123a299f3315emh * Container for _PSD information
5cff782560a1c3cf913ba5574a5123a299f3315emhtypedef struct cpu_acpi_psd
5cff782560a1c3cf913ba5574a5123a299f3315emh * Container for _PCT information
5cff782560a1c3cf913ba5574a5123a299f3315emhtypedef struct cpu_acpi_pct
5cff782560a1c3cf913ba5574a5123a299f3315emh * Containers for _PSS information
5cff782560a1c3cf913ba5574a5123a299f3315emhtypedef struct cpu_acpi_pstate
5cff782560a1c3cf913ba5574a5123a299f3315emhtypedef struct cpu_acpi_pstates {
5cff782560a1c3cf913ba5574a5123a299f3315emh * Container for cached ACPI data.
5cff782560a1c3cf913ba5574a5123a299f3315emhtypedef struct cpu_acpi_state {
5cff782560a1c3cf913ba5574a5123a299f3315emhextern void cpu_acpi_install_ppc_handler(cpu_acpi_handle_t,
5cff782560a1c3cf913ba5574a5123a299f3315emhextern int cpu_acpi_write_pdc(cpu_acpi_handle_t, uint32_t, uint32_t,
5cff782560a1c3cf913ba5574a5123a299f3315emhextern int cpu_acpi_write_port(ACPI_IO_ADDRESS, uint32_t, uint32_t);
5cff782560a1c3cf913ba5574a5123a299f3315emhextern int cpu_acpi_read_port(ACPI_IO_ADDRESS, uint32_t *, uint32_t);
5cff782560a1c3cf913ba5574a5123a299f3315emhextern uint_t cpu_acpi_get_speeds(cpu_acpi_handle_t, int **);
5cff782560a1c3cf913ba5574a5123a299f3315emh#endif /* _CPU_ACPI_H */