cpudrv_plat.h revision 5cff782560a1c3cf913ba5574a5123a299f3315e
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_CPUDRV_PLAT_H
#define _SYS_CPUDRV_PLAT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/cpu_acpi.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* We currently refuse to power manage if the CPU in not ready to
* take cross calls (cross calls fail silently if CPU is not ready
* for it).
*/
extern ulong_t cpu_ready_set;
/*
* An error attaching any of the devices results in disabling
* CPU power management.
*/
/*
* We're about to exit the _PPC thread so reset tag.
*/
#define CPUDRV_PM_RESET_THROTTLE_THREAD(cpupm) { \
}
/*
* Install a _PPC change notification handler.
*/
/*
* Redefine the topspeed.
*/
/*
* Set callbacks so that PPM can callback into CPUDRV
*/
#define CPUDRV_PM_SET_PPM_CALLBACKS() { \
}
/*
* ACPI provides the supported speeds.
*/
/*
* Convert speed to Hz.
*/
/*
* Compute the idle cnt percentage for a given speed.
*/
/*
* Compute the user cnt percentage for a given speed.
*/
/*
* pm-components property defintions for this platform.
*
* Fully constructed pm-components property should be an array of
* strings that look something like:
*
* pmc[0] = "NAME=CPU Speed"
* pmc[1] = "1=2800MHz"
* pmc[2] = "2=3200MHz"
*
* The amount of memory needed for each string is:
* digits for power level + '=' + digits for freq + 'MHz' + '\0'
*/
#define CPUDRV_PM_COMP_SIZE() \
extern void cpudrv_pm_set_topspeed(void *, int);
extern int cpudrv_pm_get_topspeed(void *);
extern void cpudrv_pm_redefine_topspeed(void *);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_CPUDRV_PLAT_H */