xref: /onnv-gate/usr/src/uts/sun4v/sys/soft_state.h (revision 3266:14b541565bfe)
1*3266Sjb145095 /*
2*3266Sjb145095  * CDDL HEADER START
3*3266Sjb145095  *
4*3266Sjb145095  * The contents of this file are subject to the terms of the
5*3266Sjb145095  * Common Development and Distribution License (the "License").
6*3266Sjb145095  * You may not use this file except in compliance with the License.
7*3266Sjb145095  *
8*3266Sjb145095  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*3266Sjb145095  * or http://www.opensolaris.org/os/licensing.
10*3266Sjb145095  * See the License for the specific language governing permissions
11*3266Sjb145095  * and limitations under the License.
12*3266Sjb145095  *
13*3266Sjb145095  * When distributing Covered Code, include this CDDL HEADER in each
14*3266Sjb145095  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*3266Sjb145095  * If applicable, add the following below this CDDL HEADER, with the
16*3266Sjb145095  * fields enclosed by brackets "[]" replaced with your own identifying
17*3266Sjb145095  * information: Portions Copyright [yyyy] [name of copyright owner]
18*3266Sjb145095  *
19*3266Sjb145095  * CDDL HEADER END
20*3266Sjb145095  */
21*3266Sjb145095 
22*3266Sjb145095 /*
23*3266Sjb145095  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*3266Sjb145095  * Use is subject to license terms.
25*3266Sjb145095  */
26*3266Sjb145095 
27*3266Sjb145095 #ifndef _SYS_SOFT_STATE_H
28*3266Sjb145095 #define	_SYS_SOFT_STATE_H
29*3266Sjb145095 
30*3266Sjb145095 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*3266Sjb145095 
32*3266Sjb145095 /*
33*3266Sjb145095  * sun4v Hypervisor Guest State API
34*3266Sjb145095  */
35*3266Sjb145095 
36*3266Sjb145095 #ifdef __cplusplus
37*3266Sjb145095 extern "C" {
38*3266Sjb145095 #endif
39*3266Sjb145095 
40*3266Sjb145095 /*
41*3266Sjb145095  * String definitions for Solaris
42*3266Sjb145095  */
43*3266Sjb145095 
44*3266Sjb145095 #define	SOLARIS_SOFT_STATE_BOOT_MSG_STR		"Solaris booting"
45*3266Sjb145095 #define	SOLARIS_SOFT_STATE_RUN_MSG_STR		"Solaris running"
46*3266Sjb145095 #define	SOLARIS_SOFT_STATE_HALT_MSG_STR		"Solaris halting"
47*3266Sjb145095 #define	SOLARIS_SOFT_STATE_POWER_MSG_STR	"Solaris powering down"
48*3266Sjb145095 #define	SOLARIS_SOFT_STATE_PANIC_MSG_STR	"Solaris panicking"
49*3266Sjb145095 #define	SOLARIS_SOFT_STATE_REBOOT_MSG_STR	"Solaris rebooting"
50*3266Sjb145095 #define	SOLARIS_SOFT_STATE_DEBUG_MSG_STR	"Solaris debugging"
51*3266Sjb145095 #define	SSM_SIZE				32
52*3266Sjb145095 
53*3266Sjb145095 #ifndef _ASM
54*3266Sjb145095 
55*3266Sjb145095 extern char	soft_state_message_strings[][SSM_SIZE];
56*3266Sjb145095 
57*3266Sjb145095 #define	SOLARIS_SOFT_STATE_BOOT_MSG		soft_state_message_ra[0]
58*3266Sjb145095 #define	SOLARIS_SOFT_STATE_RUN_MSG		soft_state_message_ra[1]
59*3266Sjb145095 #define	SOLARIS_SOFT_STATE_HALT_MSG		soft_state_message_ra[2]
60*3266Sjb145095 #define	SOLARIS_SOFT_STATE_POWER_MSG		soft_state_message_ra[3]
61*3266Sjb145095 #define	SOLARIS_SOFT_STATE_PANIC_MSG		soft_state_message_ra[4]
62*3266Sjb145095 #define	SOLARIS_SOFT_STATE_REBOOT_MSG		soft_state_message_ra[5]
63*3266Sjb145095 #define	SOLARIS_SOFT_STATE_DEBUG_MSG		soft_state_message_ra[6]
64*3266Sjb145095 #define	SOLARIS_SOFT_STATE_SAVED_MSG		soft_state_message_ra[7]
65*3266Sjb145095 #define	SOLARIS_SOFT_STATE_MSG_CNT		8
66*3266Sjb145095 
67*3266Sjb145095 extern uint64_t	soft_state_message_ra[SOLARIS_SOFT_STATE_MSG_CNT];
68*3266Sjb145095 
69*3266Sjb145095 extern void mach_get_soft_state(uint64_t *state,
70*3266Sjb145095 		uint64_t *string_ra);
71*3266Sjb145095 
72*3266Sjb145095 extern void mach_set_soft_state(uint64_t state,
73*3266Sjb145095 		uint64_t *description_ra);
74*3266Sjb145095 
75*3266Sjb145095 extern void prom_sun4v_soft_state_supported(void);
76*3266Sjb145095 
77*3266Sjb145095 #endif	/* _ASM */
78*3266Sjb145095 
79*3266Sjb145095 #ifdef __cplusplus
80*3266Sjb145095 }
81*3266Sjb145095 #endif
82*3266Sjb145095 
83*3266Sjb145095 #endif /* _SYS_SOFT_STATE_H */
84