17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 227c478bd9Sstevel@tonic-gate /* 23*e3f8e17dSsc121708 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _SYS_LOM_IO_H 287c478bd9Sstevel@tonic-gate #define _SYS_LOM_IO_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate /* 337c478bd9Sstevel@tonic-gate * I/O header file for Alarm 347c478bd9Sstevel@tonic-gate */ 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate #ifdef __cplusplus 377c478bd9Sstevel@tonic-gate extern "C" { 387c478bd9Sstevel@tonic-gate #endif 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate #include <sys/ioccom.h> 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate /* ioctls for the alarm card */ 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate #define TSIOCALSTATE _IOWR('a', 1, ts_aldata_t) 457c478bd9Sstevel@tonic-gate #define TSIOCALCTL _IOW('a', 2, ts_aldata_t) 467c478bd9Sstevel@tonic-gate 47*e3f8e17dSsc121708 /* ioctls for watchdog */ 48*e3f8e17dSsc121708 49*e3f8e17dSsc121708 #define TSIOCDOGSTATE _IOR('a', 6, ts_dogstate_t) 50*e3f8e17dSsc121708 #define TSIOCDOGCTL _IOW('a', 7, ts_dogctl_t) 51*e3f8e17dSsc121708 #define TSIOCDOGTIME _IOW('a', 8, uint_t) 52*e3f8e17dSsc121708 #define TSIOCDOGPAT _IO('a', 9) 53*e3f8e17dSsc121708 54*e3f8e17dSsc121708 557c478bd9Sstevel@tonic-gate /* 567c478bd9Sstevel@tonic-gate * Defines for identifying the four alarms 577c478bd9Sstevel@tonic-gate */ 587c478bd9Sstevel@tonic-gate #define ALARM_NUM_0 0 597c478bd9Sstevel@tonic-gate #define ALARM_NUM_1 1 607c478bd9Sstevel@tonic-gate #define ALARM_NUM_2 2 617c478bd9Sstevel@tonic-gate #define ALARM_NUM_3 3 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate #define ALARM_CRITICAL ALARM_NUM_0 647c478bd9Sstevel@tonic-gate #define ALARM_MAJOR ALARM_NUM_1 657c478bd9Sstevel@tonic-gate #define ALARM_MINOR ALARM_NUM_2 667c478bd9Sstevel@tonic-gate #define ALARM_USER ALARM_NUM_3 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate /* 697c478bd9Sstevel@tonic-gate * typedefs used in alarm ioctl definitions 707c478bd9Sstevel@tonic-gate */ 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate typedef 737c478bd9Sstevel@tonic-gate struct { 747c478bd9Sstevel@tonic-gate int alarm_no; 757c478bd9Sstevel@tonic-gate int alarm_state; 767c478bd9Sstevel@tonic-gate } ts_aldata_t; 777c478bd9Sstevel@tonic-gate 78*e3f8e17dSsc121708 typedef 79*e3f8e17dSsc121708 struct { 80*e3f8e17dSsc121708 int reset_enable; 81*e3f8e17dSsc121708 int dog_enable; 82*e3f8e17dSsc121708 } ts_dogctl_t; 83*e3f8e17dSsc121708 84*e3f8e17dSsc121708 typedef 85*e3f8e17dSsc121708 struct { 86*e3f8e17dSsc121708 int reset_enable; 87*e3f8e17dSsc121708 int dog_enable; 88*e3f8e17dSsc121708 uint_t dog_timeout; 89*e3f8e17dSsc121708 } ts_dogstate_t; 90*e3f8e17dSsc121708 917c478bd9Sstevel@tonic-gate /* 927c478bd9Sstevel@tonic-gate * Values for alarm_state 937c478bd9Sstevel@tonic-gate */ 947c478bd9Sstevel@tonic-gate #define ALARM_OFF 0 957c478bd9Sstevel@tonic-gate #define ALARM_ON 1 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate /* 987c478bd9Sstevel@tonic-gate * old commands to manipulate the control node 997c478bd9Sstevel@tonic-gate */ 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate #define LOMIOCALCTL TSIOCALCTL 1027c478bd9Sstevel@tonic-gate #define LOMIOCALSTATE TSIOCALSTATE 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate /* 1057c478bd9Sstevel@tonic-gate * typedefs used in LOMlite ioctl definitions 1067c478bd9Sstevel@tonic-gate */ 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate typedef 1097c478bd9Sstevel@tonic-gate struct { 1107c478bd9Sstevel@tonic-gate int alarm_no; 1117c478bd9Sstevel@tonic-gate int state; 1127c478bd9Sstevel@tonic-gate } lom_aldata_t; 1137c478bd9Sstevel@tonic-gate 114*e3f8e17dSsc121708 #define LOMIOCDOGSTATE TSIOCDOGSTATE 115*e3f8e17dSsc121708 #define LOMIOCDOGCTL TSIOCDOGCTL 116*e3f8e17dSsc121708 #define LOMIOCDOGTIME TSIOCDOGTIME 117*e3f8e17dSsc121708 #define LOMIOCDOGPAT TSIOCDOGPAT 118*e3f8e17dSsc121708 119*e3f8e17dSsc121708 typedef 120*e3f8e17dSsc121708 struct { 121*e3f8e17dSsc121708 int reset_enable; 122*e3f8e17dSsc121708 int dog_enable; 123*e3f8e17dSsc121708 } lom_dogctl_t; 124*e3f8e17dSsc121708 125*e3f8e17dSsc121708 typedef 126*e3f8e17dSsc121708 struct { 127*e3f8e17dSsc121708 int reset_enable; 128*e3f8e17dSsc121708 int dog_enable; 129*e3f8e17dSsc121708 uint_t dog_timeout; 130*e3f8e17dSsc121708 } lom_dogstate_t; 131*e3f8e17dSsc121708 1327c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1337c478bd9Sstevel@tonic-gate } 1347c478bd9Sstevel@tonic-gate #endif 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate #endif /* _SYS_LOM_IO_H */ 137