1*6429Svs195195 /* 2*6429Svs195195 * CDDL HEADER START 3*6429Svs195195 * 4*6429Svs195195 * The contents of this file are subject to the terms of the 5*6429Svs195195 * Common Development and Distribution License (the "License"). 6*6429Svs195195 * You may not use this file except in compliance with the License. 7*6429Svs195195 * 8*6429Svs195195 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*6429Svs195195 * or http://www.opensolaris.org/os/licensing. 10*6429Svs195195 * See the License for the specific language governing permissions 11*6429Svs195195 * and limitations under the License. 12*6429Svs195195 * 13*6429Svs195195 * When distributing Covered Code, include this CDDL HEADER in each 14*6429Svs195195 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*6429Svs195195 * If applicable, add the following below this CDDL HEADER, with the 16*6429Svs195195 * fields enclosed by brackets "[]" replaced with your own identifying 17*6429Svs195195 * information: Portions Copyright [yyyy] [name of copyright owner] 18*6429Svs195195 * 19*6429Svs195195 * CDDL HEADER END 20*6429Svs195195 */ 21*6429Svs195195 22*6429Svs195195 /* 23*6429Svs195195 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24*6429Svs195195 * Use is subject to license terms. 25*6429Svs195195 */ 26*6429Svs195195 27*6429Svs195195 #ifndef _FPSAPI_H 28*6429Svs195195 #define _FPSAPI_H 29*6429Svs195195 30*6429Svs195195 #pragma ident "%Z%%M% %I% %E% SMI" 31*6429Svs195195 32*6429Svs195195 /* 33*6429Svs195195 * FPS structures and constants. 34*6429Svs195195 */ 35*6429Svs195195 36*6429Svs195195 #ifdef __cplusplus 37*6429Svs195195 extern "C" { 38*6429Svs195195 #endif 39*6429Svs195195 40*6429Svs195195 #include <sys/types.h> 41*6429Svs195195 42*6429Svs195195 #define FPS_DOOR_FILE "/var/run/fpsdiagd_door" 43*6429Svs195195 44*6429Svs195195 /* Message types and associated priorities */ 45*6429Svs195195 #define FPS_ERROR 0 /* Goes to syslog(LOG_ERR) */ 46*6429Svs195195 #define FPS_WARNING 1 /* Goes to syslog(LOG_WARNING) */ 47*6429Svs195195 #define FPS_INFO 2 /* Goes to syslog(LOG_INFO) */ 48*6429Svs195195 #define FPS_DEBUG 3 /* Goes to syslog(LOG_DEBUG) */ 49*6429Svs195195 50*6429Svs195195 /* Max Limits */ 51*6429Svs195195 52*6429Svs195195 /* FP-test return codes */ 53*6429Svs195195 54*6429Svs195195 #define FPU_UNSUPPORT -1 55*6429Svs195195 #define FPU_OK 0 /* All tests passed */ 56*6429Svs195195 /* Failed a test, FPU will/should be offlined after ereport is sent */ 57*6429Svs195195 #define FPU_FOROFFLINE 1 58*6429Svs195195 #define FPU_BIND_FAIL 2 /* Could not bind to CPU ID or bind was lost */ 59*6429Svs195195 #define FPU_INVALID_ARG 3 /* Invalid argument passed in */ 60*6429Svs195195 #define FPU_SIG_SEGV 4 61*6429Svs195195 #define FPU_SIG_BUS 5 62*6429Svs195195 #define FPU_SIG_FPE 6 63*6429Svs195195 #define FPU_SIG_ILL 7 64*6429Svs195195 #define FPU_SYSCALL_TRYAGAIN 8 65*6429Svs195195 #define FPU_SYSCALL_FAIL 9 66*6429Svs195195 #define FPU_EREPORT_INCOM 10 67*6429Svs195195 #define FPU_EREPORT_FAIL 11 68*6429Svs195195 #define FPU_TIMED_OUT 12 69*6429Svs195195 70*6429Svs195195 typedef struct fps_event { 71*6429Svs195195 uint32_t version; 72*6429Svs195195 uint32_t type; 73*6429Svs195195 uint32_t length; /* remaining length of data */ 74*6429Svs195195 char data[1]; /* Variable sized data */ 75*6429Svs195195 }fps_event_t; 76*6429Svs195195 77*6429Svs195195 typedef struct fps_event_reply { 78*6429Svs195195 int32_t result; 79*6429Svs195195 } fps_event_reply_t; 80*6429Svs195195 81*6429Svs195195 82*6429Svs195195 #ifdef __cplusplus 83*6429Svs195195 } 84*6429Svs195195 #endif 85*6429Svs195195 86*6429Svs195195 #endif /* _FPSAPI_H */ 87