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