xref: /titanic_41/usr/src/uts/common/sys/fm/io/ddi.h (revision 05dd151b48459b1282a9ba09a1012307693cf4b9)
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  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_SYS_FM_IO_DDI_H
27 #define	_SYS_FM_IO_DDI_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #define	DDI_DVR_MAX_CLASS		32
34 
35 /* IO-specific FMA ereport class defintions */
36 #define	DDI_IO_CLASS			"io"
37 
38 /* leaf driver detected ereport definitions */
39 #define	DDI_FM_DEVICE			"device"
40 #define	DDI_FM_DEVICE_INVAL_STATE	"inval_state"
41 #define	DDI_FM_DEVICE_NO_RESPONSE	"no_response"
42 #define	DDI_FM_DEVICE_STALL		"stall"
43 #define	DDI_FM_DEVICE_BADINT_LIMIT	"badint_limit"
44 #define	DDI_FM_DEVICE_INTERN_CORR	"intern_corr"
45 #define	DDI_FM_DEVICE_INTERN_UNCORR	"intern_uncorr"
46 #define	DDI_FM_DEVICE_FW_CORRUPT	"fw_corrupt"
47 #define	DDI_FM_DEVICE_FW_MISMATCH	"fw_mismatch"
48 
49 /* service impact ereport definitions */
50 #define	DDI_FM_SERVICE_IMPACT		"service"
51 #define	DDI_FM_SERVICE_LOST		"lost"
52 #define	DDI_FM_SERVICE_DEGRADED		"degraded"
53 #define	DDI_FM_SERVICE_RESTORED		"restored"
54 #define	DDI_FM_SERVICE_UNAFFECTED	"unaffected"
55 
56 /* Driver defect ereport specifications */
57 #define	DVR_ERPT		"ddi."
58 #define	DVR_ECONTEXT		"context"	/* Invalid calling context */
59 #define	DVR_EINVAL		"einval"	/* Invalid calling semantic */
60 #define	DVR_EFMCAP		"fm-capability"	/* Improper FM capability */
61 #define	DVR_EVER		"version"	/* Invalid structure version */
62 
63 /* Required payload member names */
64 #define	DVR_NAME		"dvr-name"
65 #define	DVR_STACK		"dvr-stack"
66 #define	DVR_STACK_DEPTH		"dvr-stack-depth"
67 #define	DVR_ERR_SPECIFIC	"dvr-error-specific"
68 
69 #ifdef	__cplusplus
70 }
71 #endif
72 
73 #endif	/* _SYS_FM_IO_DDI_H */
74