/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _PICL_WATCHDOG_H
#define _PICL_WATCHDOG_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <libintl.h>
#include <sys/inttypes.h>
#include <smclib.h>
if (wd_debug) { \
}
if (wd_debug) { \
}
/* environment variable defs */
/* debug flags */
/* tunables */
#define WD_DEFAULT_THREAD_PRIORITY 0
/* constants */
#define SUPER_USER 0
/* watchdog status */
/* patting status */
/* auto pat feature for SMC f/w */
/* flags used to track user actions */
/* bit masks */
/* timer max values */
/* PICL node names */
/* debug value for wd_op */
/* HEALTHY# status */
"expired.. rebooting"
/* watchdog config file variables */
/* The following values can be tuned using config file */
/* HEALTHY# bitmask */
typedef struct {
/* properties values */
/* Cache for PICL handles */
/* prop handle for op */
} wd_data_t;
/* structure to hold watchdog status */
typedef struct {
int present_state;
} wd_state_t;
/* Error messages */
#define WD_PICL_NOSPACE \
gettext("SUNW_piclwatchdog: Error in memory allocation")
#define WD_PICL_REG_ERR \
gettext("SUNW_piclwatchdog: Failed to register with picl framework,"\
" error = %d")
#define WD_PICL_SMC_OPEN_ERR \
gettext("SUNW_piclwatchdog: Error in opening SMC drv")
#define WD_PICL_EXCLUSIVE_ACCESS_ERR \
gettext("SUNW_piclwatchdog: Error in getting exclusive access "\
"for watchdog commands")
#define WD_PICL_THREAD_CREATE_FAILED \
gettext("SUNW_piclwatchdog: Error in creating %s thread")
#define WD_PICL_PROP_INIT_ERR \
gettext("SUNW_piclwatchdog: ptree prop init call failed:%d")
#define WD_NODE_INIT_ERR \
gettext("SUNW_piclwatchdog: Error in creating watchdog nodes(%d):%d")
#define WD_PICL_GET_STAT_ERR \
gettext("SUNW_piclwatchdog: Error in getting the watchdog status")
#define WD_PICL_GET_ERR \
gettext("SUNW_piclwatchdog: Error in getting watchdog status,"\
" error = %d")
#define WD_PICL_PAT_ERR \
gettext("SUNW_piclwatchdog: Error in patting the watchdog"\
" error = %d")
#define WD_PICL_START_ERR \
gettext("SUNW_piclwatchdog: Error in starting the watchdog, error = %d")
#define WD_PICL_STOP_ERR \
gettext("SUNW_piclwatchdog: Error in stopping the watchdog,"\
" error = %d")
#define WD_PICL_SET_ATTR_FAILED \
gettext("SUNW_piclwatchdog: Error in setting attributes for a stream")
#define WD_PICL_RT_THRD_FAIL \
gettext("SUNW_piclwatchdog: Error in creating real time thread")
#define WD_PICL_RT_THRD_NO_PERM_ERR \
gettext("SUNW_piclwatchdog: No perm to change the priority of thread")
#define WD_PICL_NO_WD_ERR \
gettext("SUNW_piclwatchdog: Watchdog is not running")
#define WD_PICL_WD1_RUNNING_ERR \
gettext("SUNW_piclwatchdog: Disarm the Watchdog level 1")
#define WD_PICL_WD2_RUNNING_ERR \
gettext("SUNW_piclwatchdog: Disarm the Watchdog level 2")
#define WD_PICL_SMC_READ_ERR \
gettext("SUNW_piclwatchdog: Error in reading from SMC")
#define WD_PICL_SMC_WRITE_ERR \
gettext("SUNW_piclwatchdog: Error in writing to SMC")
#define WD_NO_ROOT_PERM \
gettext("SUNW_piclwatchdog: Root perm are reqd to perform this op.")
#define WD_PICL_POLL_ERR \
gettext("SUNW_piclwatchdog: Error in poll system call")
#define WD_PICL_INVALID_T1 \
gettext("SUNW_piclwatchdog: Invalid timeout value for wd level 1")
#define WD_PICL_INVALID_T2 \
gettext("SUNW_piclwatchdog: Invalid timeout value for wd level 2")
#define WD_PICL_TMOUT_LV1_LV2_SETTO_0 \
gettext("SUNW_piclwatchdog: Invalid timeout val for wd level 1 & 2")
#define WD_PICL_INVALID_ACTION1 \
gettext("SUNW_piclwatchdog: Invalid action for level one")
#define WD_PICL_INVALID_ACTION2 \
gettext("SUNW_piclwatchdog: Invalid action for level two")
#define WD_PICL_CLEAR_EXCL_ERR \
gettext("SUNW_piclwatchdog: Error in clearing exclusive "\
"access for watchdog commands")
#define WD_PICL_POST_EVENT_ERR \
gettext("SUNW_piclwatchdog: Error in posting wd expiry event,"\
" error = %d")
#define WD_PICL_COND_SIGNAL_ERR \
gettext("SUNW_piclwatchdog: Error in cond_signal")
#define WD_PICL_IS_NOT_SUPPORTED \
gettext("SUNW_piclwatchdog: This feature is not supported")
#define WD_PICL_TRY_PAT_ERR \
gettext("SUNW_piclwatchdog: OS is already patting the watchdog")
#define WD_PICL_GET_TIMEOUT_ERR \
gettext("SUNW_piclwatchdog: Error in getting the timeout values")
#define WD_PICL_ARM_PAT_ERR \
gettext("SUNW_piclwatchdog: Illegal timeout values for arm-pat op")
#define WD_PICL_PERM_DENIED \
gettext("SUNW_piclwatchdog: This client is not the owner of watchdog")
#define WD_PICL_PAT_TIME_ERR \
gettext("SUNW_piclwatchdog: Negative value for pat_time \
is not allowed")
#define WD_PICL_STATE_INVALID \
gettext("SUNW_piclwatchdog: WD operations not allowed while "\
"chassis state is configuring")
#define WD_HEALTHY_ERR \
gettext("SUNW_piclwatchdog: Cannot arm the watchdog, "\
"action already taken")
#define WD_GET_OWN_FAILED \
gettext("SUNW_piclwatchdog: Error in finding active owner of watchdog,"\
" error = %d")
#define WD_NVLIST_ERR \
gettext("SUNW_piclwatchdog: Error in posting watchdog event"\
"(nvlist error), error = %d")
#define WD_GET_HEALTH_ERR \
gettext("SUNW_piclwatchdog: Error in getting HEALTHY# status")
#define WD_UPDATE_STATE_ERR \
gettext("SUNW_piclwatchdog: Error in updating watchdog state,"\
"error = %d")
#define WD_WD1_EXPIRED \
gettext("SUNW_piclwatchdog: watchdog level 1 expired")
#ifdef __cplusplus
}
#endif
#endif /* _PICL_WATCHDOG_H */