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