xref: /titanic_52/usr/src/uts/sun4v/sys/platsvc.h (revision ae115bc77f6fcde83175c75b4206dc2e50747966)
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 _PLATSVC_H
28 #define	_PLATSVC_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #include <sys/types.h>
37 #include <sys/ds.h>
38 
39 #define	MAX_REASON_SIZE		1
40 
41 /*
42  * PLATSVC STATUS
43  */
44 #define	PLATSVC_SUCCESS		0x0
45 #define	PLATSVC_FAILURE		0x1
46 #define	PLATSVC_INVALID_MESG	0x2
47 
48 #define	MD_UPDATE_SUCCESS		PLATSVC_SUCCESS
49 #define	MD_UPDATE_FAILURE		PLATSVC_FAILURE
50 #define	MD_UPDATE_INVALID_MSG		PLATSVC_INVALID_MESG
51 
52 #define	DOMAIN_SHUTDOWN_SUCCESS		PLATSVC_SUCCESS
53 #define	DOMAIN_SHUTDOWN_FAILURE		PLATSVC_FAILURE
54 #define	DOMAIN_SHUTDOWN_INVALID_MSG	PLATSVC_INVALID_MESG
55 
56 #define	DOMAIN_PANIC_SUCCESS		PLATSVC_SUCCESS
57 #define	DOMAIN_PANIC_FAILURE		PLATSVC_FAILURE
58 #define	DOMAIN_PANIC_INVALID_MSG	PLATSVC_INVALID_MESG
59 
60 typedef struct platsvc_md_update_req {
61 	uint64_t	req_num;
62 } platsvc_md_update_req_t;
63 
64 typedef struct platsvc_md_update_resp {
65 	uint64_t	req_num;
66 	uint32_t	result;
67 } platsvc_md_update_resp_t;
68 
69 
70 typedef struct platsvc_shutdown_req {
71 	uint64_t	req_num;
72 	uint32_t	delay;
73 } platsvc_shutdown_req_t;
74 
75 typedef struct platsvc_shutdown_resp {
76 	uint64_t	req_num;
77 	uint32_t	result;
78 	char		reason[MAX_REASON_SIZE];
79 } platsvc_shutdown_resp_t;
80 
81 typedef struct platsvc_panic_req {
82 	uint64_t	req_num;
83 } platsvc_panic_req_t;
84 
85 typedef struct platsvc_panic_resp {
86 	uint64_t	req_num;
87 	uint32_t	result;
88 	char		reason[MAX_REASON_SIZE];
89 } platsvc_panic_resp_t;
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /* _PLATSVC_H */
96