xref: /titanic_41/usr/src/uts/sun4u/starcat/sys/domaind.h (revision 8b464eb836173b92f2b7a65623cd06c8c3c59289)
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 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef _SYS_DOMAIND_H
28 #define	_SYS_DOMAIND_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #include <sys/cpu_sgnblk_defs.h>
37 
38 typedef struct domain_data {
39 	uint32_t	magic;		/* magic number */
40 	uint8_t		version;	/* version number */
41 	uint8_t		keyswitch;	/* virtual SC keyswitch */
42 	uint32_t	master_sc_ip;	/* IP address of master SC */
43 	uint32_t	leds;		/* software LEDs */
44 	sig_state_t	domain_state;	/* domain state */
45 	uint32_t	heartbeat;	/* domain heartbeat */
46 	cpuset_t	cpus_present;	/* CPU's present in this domain */
47 	sig_state_t	cpu_sigs[NCPU];	/* state for present CPUs */
48 	uint32_t	resetinfo_off[NCPU];	/* resetinfo offsets */
49 	uint8_t		_reserved[16];	/* word aligned */
50 } domain_data_t;
51 
52 /*
53  * Unique ID for domain data IOSRAM chunk
54  */
55 #define	DOMD_MAGIC	0x444F4D44	/* 'D' 'O' 'M' 'D' */
56 
57 /*
58  * offsets
59  */
60 #define	DOMD_MAGIC_OFFSET	((uint32_t)&((domain_data_t *)0)->magic)
61 #define	DOMD_VERSION_OFFSET	((uint32_t)&((domain_data_t *)0)->version)
62 #define	DOMD_KEYSWITCH_OFFSET	((uint32_t)&((domain_data_t *)0)->keyswitch)
63 #define	DOMD_SCIP_OFFSET	((uint32_t)&((domain_data_t *)0)->master_sc_ip)
64 #define	DOMD_LEDS_OFFSET	((uint32_t)&((domain_data_t *)0)->leds)
65 #define	DOMD_DSTATE_OFFSET	((uint32_t)&((domain_data_t *)0)->domain_state)
66 #define	DOMD_HEARTBEAT_OFFSET	((uint32_t)&((domain_data_t *)0)->heartbeat)
67 #define	DOMD_CPUSPRESENT_OFFSET	((uint32_t)&((domain_data_t *)0)->cpus_present)
68 #define	DOMD_CPUSIGS_OFFSET	((uint32_t)&((domain_data_t *)0)->cpu_sigs)
69 #define	DOMD_RESETINFO_OFFSET	((uint32_t)&((domain_data_t *)0)->resetinfo_off)
70 
71 /*
72  * tod
73  */
74 #define	TODSC_SET_THRESHOLD	30		/* in seconds */
75 
76 #ifdef	__cplusplus
77 }
78 #endif
79 
80 #endif	/* _SYS_DOMAIND_H */
81