xref: /titanic_51/usr/src/uts/sun4u/serengeti/sys/sgevents.h (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 2000-2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef _SYS_SGEVENTS_H
28 #define	_SYS_SGEVENTS_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * sgevents.h - Serengeti Events defintions
38  *
39  * This header file contains the common definitions and macros for the
40  * events support on the Serengeti platform.
41  */
42 
43 /*
44  * Serengeti Events Payloads (events are defined in sgsbbc_mailbox.h)
45  */
46 
47 /*
48  * there are a class of events which are consider generic. They all have
49  * the same msg_type and payload.  There is a detail that comes with it to
50  * let the client know what actualy happened. This can be found in the
51  * event_details as defined below
52  */
53 
54 
55 #define	SG_EVT_BOARD_ABSENT		0x10
56 #define	SG_EVT_BOARD_PRESENT		0x11
57 #define	SG_EVT_UNASSIGN			0x20
58 #define	SG_EVT_ASSIGN			0x21
59 #define	SG_EVT_UNAVAILABLE		0x30
60 #define	SG_EVT_AVAILABLE		0x31
61 #define	SG_EVT_POWER_OFF		0x40
62 #define	SG_EVT_POWER_ON			0x41
63 #define	SG_EVT_PASSED_TEST		0x50
64 #define	SG_EVT_FAILED_TEST		0x51
65 
66 
67 /*
68  * Miscallaneous defintions
69  */
70 
71 /* Payload of ENV event */
72 #define	SC_EVENT_FAN		0x4
73 #define	SC_EVENT_ENV		0x7
74 
75 /* Payload of PANIC_SHUTDOWN event */
76 #define	SC_EVENT_PANIC_ENV		0x1
77 #define	SC_EVENT_PANIC_KEYSWITCH	0x2
78 
79 
80 /*
81  * Generic event payload.
82  */
83 typedef struct {
84 	int node;		/* wildcat node number */
85 	int slot;		/* Slot number for this event */
86 	uint64_t parent_hdl;	/* Parent fru handle */
87 	uint64_t child_hdl;	/* Child fru handle */
88 	int event_details;
89 } sg_system_fru_descriptor_t;
90 
91 
92 /*
93  * Domain State event payload.
94  *
95  * Possible values for this are defined in serengeti.h (SG_KEY_POSN_XXX)
96  */
97 typedef int	sg_event_key_position_t;
98 
99 
100 /*
101  * Environmental event payloads.
102  */
103 typedef struct sg_event_env_changed {
104 	int32_t		event_type;
105 
106 } sg_event_env_changed_t;
107 
108 typedef struct sg_event_fan_status {
109 	int32_t		event_type;
110 	int32_t		node_id;
111 	int32_t		slot_number;
112 	int32_t		fan_speed;
113 
114 } sg_event_fan_status_t;
115 
116 
117 /*
118  * Panic Shutdown event payload.
119  */
120 typedef int	sg_panic_shutdown_t;
121 
122 
123 #ifdef	__cplusplus
124 }
125 #endif
126 
127 #endif	/* _SYS_SGEVENTS_H */
128