xref: /titanic_44/usr/src/uts/sun4u/starcat/sys/domaind.h (revision ad9a7bd3532cf0ef931ded51a5ffe5d0496aad88)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
227c478bd9Sstevel@tonic-gate /*
237c478bd9Sstevel@tonic-gate  * Copyright (c) 2000 by Sun Microsystems, Inc.
247c478bd9Sstevel@tonic-gate  * All rights reserved.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #ifndef _SYS_DOMAIND_H
287c478bd9Sstevel@tonic-gate #define	_SYS_DOMAIND_H
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
317c478bd9Sstevel@tonic-gate extern "C" {
327c478bd9Sstevel@tonic-gate #endif
337c478bd9Sstevel@tonic-gate 
34*ad9a7bd3SRichard Lowe #include <sys/sysmacros.h>
357c478bd9Sstevel@tonic-gate #include <sys/cpu_sgnblk_defs.h>
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate typedef struct domain_data {
387c478bd9Sstevel@tonic-gate 	uint32_t	magic;		/* magic number */
397c478bd9Sstevel@tonic-gate 	uint8_t		version;	/* version number */
407c478bd9Sstevel@tonic-gate 	uint8_t		keyswitch;	/* virtual SC keyswitch */
417c478bd9Sstevel@tonic-gate 	uint32_t	master_sc_ip;	/* IP address of master SC */
427c478bd9Sstevel@tonic-gate 	uint32_t	leds;		/* software LEDs */
437c478bd9Sstevel@tonic-gate 	sig_state_t	domain_state;	/* domain state */
447c478bd9Sstevel@tonic-gate 	uint32_t	heartbeat;	/* domain heartbeat */
457c478bd9Sstevel@tonic-gate 	cpuset_t	cpus_present;	/* CPU's present in this domain */
467c478bd9Sstevel@tonic-gate 	sig_state_t	cpu_sigs[NCPU];	/* state for present CPUs */
477c478bd9Sstevel@tonic-gate 	uint32_t	resetinfo_off[NCPU];	/* resetinfo offsets */
487c478bd9Sstevel@tonic-gate 	uint8_t		_reserved[16];	/* word aligned */
497c478bd9Sstevel@tonic-gate } domain_data_t;
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate /*
527c478bd9Sstevel@tonic-gate  * Unique ID for domain data IOSRAM chunk
537c478bd9Sstevel@tonic-gate  */
547c478bd9Sstevel@tonic-gate #define	DOMD_MAGIC	0x444F4D44	/* 'D' 'O' 'M' 'D' */
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate /*
577c478bd9Sstevel@tonic-gate  * offsets
587c478bd9Sstevel@tonic-gate  */
59*ad9a7bd3SRichard Lowe #define	DOMD_MAGIC_OFFSET	offsetof(domain_data_t, magic)
60*ad9a7bd3SRichard Lowe #define	DOMD_VERSION_OFFSET	offsetof(domain_data_t, version)
61*ad9a7bd3SRichard Lowe #define	DOMD_KEYSWITCH_OFFSET	offsetof(domain_data_t, keyswitch)
62*ad9a7bd3SRichard Lowe #define	DOMD_SCIP_OFFSET	offsetof(domain_data_t, master_sc_ip)
63*ad9a7bd3SRichard Lowe #define	DOMD_LEDS_OFFSET	offsetof(domain_data_t, leds)
64*ad9a7bd3SRichard Lowe #define	DOMD_DSTATE_OFFSET	offsetof(domain_data_t, domain_state)
65*ad9a7bd3SRichard Lowe #define	DOMD_HEARTBEAT_OFFSET	offsetof(domain_data_t, heartbeat)
66*ad9a7bd3SRichard Lowe #define	DOMD_CPUSPRESENT_OFFSET	offsetof(domain_data_t, cpus_present)
67*ad9a7bd3SRichard Lowe #define	DOMD_CPUSIGS_OFFSET	offsetof(domain_data_t, cpu_sigs)
68*ad9a7bd3SRichard Lowe #define	DOMD_RESETINFO_OFFSET	offsetof(domain_data_t, resetinfo_off)
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate /*
717c478bd9Sstevel@tonic-gate  * tod
727c478bd9Sstevel@tonic-gate  */
737c478bd9Sstevel@tonic-gate #define	TODSC_SET_THRESHOLD	30		/* in seconds */
747c478bd9Sstevel@tonic-gate 
757c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
767c478bd9Sstevel@tonic-gate }
777c478bd9Sstevel@tonic-gate #endif
787c478bd9Sstevel@tonic-gate 
797c478bd9Sstevel@tonic-gate #endif	/* _SYS_DOMAIND_H */
80