/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ENVD_H
#define _ENVD_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <libintl.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* ADC Sample of ADM in Khz, currently 11.2 KHz
*/
/*
* Taco Platform Details
*/
/*
* ADM1031 Hardware Monitor IDs
* Used as index into arrays
*/
#define CPU_HWM_ID 0
#define CPU_HWM_DEVFS \
#define HWM_FAN1 0
/*
* Taco sensor IDs as used in FRUID segment
*/
#define SYS_IN_SENSOR_ID 0
/*
* Taco fan IDs used in FRUID segment
*/
#define SYSTEM_FAN_ID 0
/*
*/
#define ENV_CPU_FAN_DEVFS \
"/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:fan_2"
#define ENV_SYSTEM_FAN_DEVFS \
"/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:fan_1"
/*
* devfs-path for various temperature sensors and CPU platform path
*/
#define SENSOR_CPU_DIE_DEVFS \
"/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:remote_2"
#define SENSOR_SYS_IN_DEVFS \
"/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:remote_1"
#define SENSOR_INT_AMB_DEVFS \
"/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:local"
/*
* Temperature type
*/
/*
* Fan names
*/
/*
* Sensor names
*/
/* Bit Map of ADM 1031 Status 1/2 Registers */
enum adm1031 {
} adm1031_t;
/* ADM Stat 1/2 Mask */
enum adm1031Mask {
/*
* ES segment related structures
*/
typedef struct id_off {
} id_off_t;
typedef struct fan_ctl_pair {
typedef struct Correction_Pair {
typedef struct sensor_ctrl_blk {
typedef struct fan_ctrl_blk {
/*
* Macros to fetch 16 and 32 bit data from unaligned address
*/
/*
* SEEPROM section header layout and location
*/
typedef struct {
/*
* SEEPROM segment header layout
*/
typedef struct {
#define SENSOR_OK 0
/*
* SEEPROM environmental segment header layout
*/
typedef struct {
typedef struct {
/*
* FRU envseg list
*/
typedef struct fruenvseg {
} fruenvseg_t;
/*
* Table data structures
*/
typedef struct {
int32_t x;
int32_t y;
} point_t;
typedef struct {
int nentries;
} table_t;
/*
* Temperature sensor related data structure
*/
typedef struct env_sensor {
int hwm_id;
void *fanp;
} env_sensor_t;
/*
* Fan information data structure
*/
typedef int fanspeed_t;
typedef struct env_fan {
} env_fan_t;
/*
* Tuneables
*/
typedef struct env_tuneable {
char *name;
char type;
void *value;
int nbytes;
extern int env_debug;
/*
* Various messages
*/
#define ENVD_PLUGIN_INIT_FAILED \
gettext("SUNW_piclenvd: initialization failed!\n")
#define ENVD_PICL_SETUP_FAILED \
gettext("SUNW_piclenvd: PICL setup failed!\n")
#define PM_THREAD_CREATE_FAILED \
gettext("SUNW_piclenvd: pmthr thread creation failed!\n")
#define PM_THREAD_EXITING \
gettext("SUNW_piclenvd: pmthr exiting! errno:%d %s\n")
#define ENVTHR_THREAD_CREATE_FAILED \
gettext("SUNW_piclenvd: envthr thread creation failed!\n")
#define ENV_SHUTDOWN_MSG \
gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \
"limits (%d...%d). Shutting down the system.\n")
#define ENV_WARNING_MSG \
gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \
"operating limits (%d...%d).\n")
#define ENV_FAN_OPEN_FAIL \
gettext("SUNW_piclenvd: can't open '%s' fan path:%s errno:%d %s\n")
#define ENV_SENSOR_OPEN_FAIL \
gettext("SUNW_piclenvd: can't open '%s' sensor path:%s errno:%d %s\n")
#define ENV_SENSOR_ACCESS_FAIL \
gettext("SUNW_piclenvd: can't access '%s' sensor errno:%d %s\n")
#define ENV_SENSOR_ACCESS_OK \
gettext("SUNW_piclenvd: '%s' sensor is accessible now.\n")
#define ENV_FRU_OPEN_FAIL \
gettext("SUNW_piclenvd: can't open FRU SEEPROM path:%s errno:%d %s\n")
#define ENV_FRU_BAD_ENVSEG \
gettext("SUNW_piclenvd: version mismatch or environmental segment " \
"header too short in FRU SEEPROM %s\n")
#define ENV_FRU_BAD_SENSOR_ENTRY \
gettext("SUNW_piclenvd: discarding bad sensor entry (sensor_id " \
"%x sensor '%s') in FRU SEEPROM %s\n")
#define ENV_FRU_SENSOR_MAP_NOMEM \
gettext("SUNW_piclenvd: out of memory, discarding sensor map for " \
"sensor_id %x (sensor '%s') in FRU SEEPROM %s\n")
#define ENV_ADM_OPEN_FAIL \
gettext("SUNW_piclenvd: can't open hwm path:%s errno:%d %s\n")
#define ENV_ADM_MANUAL_MODE \
gettext("SUNW_piclenvd: Cannot change the ADM Chip to Manual mode")
#define ENV_ADM_AUTO_MODE \
gettext("SUNW_piclenvd: Cannot change the ADM Chip to Auto mode")
#define ENV_FAN_FAULT \
gettext("SUNW_piclenvd: ADM %s, Fan %s Fault")
#ifdef __cplusplus
}
#endif
#endif /* _ENVD_H */