/*
* 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 2000 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_SGENV_H
#define _SYS_SGENV_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* sgenv.h - Serengeti Environmental Driver
*
* This header file contains the environmental definitions for
* the Serengeti platform.
*
* It contains all the information necessary to obtain the required
* data from the kstats which export the environmental data. The
* following information is exported.
*
* o Board status information
* o Keyswitch position
* o Environmental Readings
*/
#include <sys/serengeti.h>
/*
* Board Status Information
* ========================
*/
/* name of kstat returning board status info */
/* Masks to determine which LEDs are on */
/*
* Calculate the number of boards, who's info readings that were
* returned by this kstat
*/
(sizeof (sg_board_info_t)))
typedef union sg_led {
struct {
} status;
int led_status;
} sg_led_t;
typedef struct sg_board_info {
int node_id;
int board_num;
int assigned;
int claimed;
/*
* Keyswitch Information
* =====================
*/
/* name of kstat returning keyswitch info */
/*
* Kstat structure used to pass Keyswitch data to userland.
*
* The position is stored in the 32-bit integer value of the
* kstat_named_t union <keyswitch_position>.
*
* (i.e. to get the position - read keyswitch_position.value.ui32)
*/
typedef struct {
/*
* Environmental Information
* =========================
*
* the environmental kstat exports an array of env_sensor_t structs
*/
/*
* sd_infostamp access macros and return values
*
* N.b. None of the values need shifting. This means the
* UTC time in nanoseconds since The Epoch has, at best,
* a resolution of c.256 nanoseconds (since the lo-order
* c.8-bits are overlaid with other information).
*/
#define _SG_INFO_TIMVALMSK \
/* Calculate the number of sensor readings that were returned by this kstat */
(sizeof (env_sensor_t)))
/* used to calculate the status of a sensor reading from <sd_status> */
status &= ~SG_STATUS_MASK; \
status &= ~SG_PREV_STATUS_MASK; \
/*
* The possible states a sensor reading can be in.
*/
typedef enum env_sensor_status {
/*
* The raw env. info. kstat is made up of an array of these structures.
*/
typedef struct env_sensor {
} env_sensor_t;
/*
* Events Information
* ==================
*/
#define SGENV_FAN_SPEED_OFF 0
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SGENV_H */