xref: /titanic_41/usr/src/uts/sun4v/sys/fault_iso.h (revision 0b05a701b49058a6d47b581827961c6c39b1071a)
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 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _FAULT_ISO_H
28 #define	_FAULT_ISO_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /* FMA CPU message numbers */
37 #define	FMA_CPU_REQ_STATUS	0x0
38 #define	FMA_CPU_REQ_OFFLINE	0x1
39 #define	FMA_CPU_REQ_ONLINE	0x2
40 
41 typedef struct {
42 	uint64_t	req_num;
43 	uint32_t	msg_type;
44 	uint32_t	cpu_id;
45 } fma_cpu_service_req_t;
46 
47 /* FMA CPU result codes */
48 #define	FMA_CPU_RESP_OK		0x0
49 #define	FMA_CPU_RESP_FAILURE	0x1
50 
51 /* FMA CPU status codes */
52 #define	FMA_CPU_STAT_ONLINE	0x0
53 #define	FMA_CPU_STAT_OFFLINE	0x1
54 #define	FMA_CPU_STAT_ILLEGAL	0x2
55 
56 typedef struct {
57 	uint64_t	req_num;
58 	uint32_t	result;
59 	uint32_t	status;
60 } fma_cpu_resp_t;
61 
62 /* FMA memory services message numbers */
63 #define	FMA_MEM_REQ_STATUS	0x0
64 #define	FMA_MEM_REQ_RETIRE	0x1
65 #define	FMA_MEM_REQ_RESURRECT	0x2
66 
67 typedef struct {
68 	uint64_t	req_num;
69 	uint32_t	msg_type;
70 	uint32_t	_resvd;
71 	uint64_t	real_addr;
72 	uint64_t	length;
73 } fma_mem_service_req_t;
74 
75 /* FMA result codes */
76 #define	FMA_MEM_RESP_OK		0x0
77 #define	FMA_MEM_RESP_FAILURE	0x1
78 
79 /* FMA status codes */
80 #define	FMA_MEM_STAT_NOTRETIRED		0x0
81 #define	FMA_MEM_STAT_RETIRED		0x1
82 #define	FMA_MEM_STAT_ILLEGAL		0x2
83 
84 typedef struct {
85 	uint64_t	req_num;
86 	uint32_t	result;
87 	uint32_t	status;
88 	uint64_t	res_addr;
89 	uint64_t	res_length;
90 } fma_mem_resp_t;
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* _FAULT_ISO_H */
97