xref: /titanic_52/usr/src/uts/sun4u/serengeti/sys/sbdp_mbox.h (revision b6c3f7863936abeae522e48a13887dddeb691a45)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2001 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SBDP_MBOX_H
28 #define	_SBDP_MBOX_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #define	SBDP_POWER_OFF		0x0
37 #define	SBDP_POWER_ON		0x1
38 #define	SBDP_UNASSIGN		0x0
39 #define	SBDP_ASSIGN		0x1
40 
41 /*
42  * DR Mailbox definitions
43  */
44 #define	DR_MBOX_SHOW_BOARD	0x2002
45 #define	DR_MBOX_POWER		0x2003
46 #define	DR_MBOX_ASSIGN		0x2004
47 #define	DR_MBOX_TEST_BD		0x2005
48 #define	DR_MBOX_STICK_ADM	0x2006
49 #define	DR_MBOX_SWAP_SLICES	0x2007
50 #define	DR_MBOX_START_CPU	0x2008
51 #define	DR_MBOX_STOP_CPU	0x2009
52 #define	DR_MBOX_START_CPU_PAIRS	0x2010
53 #define	DR_MBOX_CLAIM		0x2011
54 #define	DR_MBOX_UNCLAIM		0x2012
55 #define	DR_MBOX_NOOP		0x2013
56 
57 /*
58  * DR Mailbox data structures
59  */
60 typedef struct {
61 	int	revision;	/* temp */
62 	int	node;		/* Node ID */
63 	int	board;		/* Board number */
64 	int	extra;		/* for assign and power */
65 } info2_t;
66 
67 typedef struct {
68 	info2_t		info;	/* Normal information */
69 	uint32_t	flag;	/* Force operation */
70 } testb_t;
71 
72 typedef struct {
73 	int revision;	/* temp */
74 	int node;	/* Node ID */
75 	int board;	/* Board number */
76 } info_t;
77 
78 typedef struct {
79 	int	revision;
80 	int	s_cond;		/* 0 = unknown, 1 = ok, 2 =  failing,	*/
81 				/* 3 = failed, 4 = unusable		*/
82 	int	s_power;	/* 0 = off, 1 = on */
83 	int	s_assigned;	/* 0 = unassigned, 1 = assigned */
84 	int	s_claimed;	/* 0 = unclaimed, 1 = claimed */
85 	int	s_present;	/* 0 = slot empty 1 = present */
86 	int	s_ledstatus;	/* LEDs status */
87 	char	s_type[12];	/* type of board */
88 	char	s_info[64];	/* TBD */
89 } show_board_t;
90 
91 typedef struct {
92 	int	board1;
93 	int	board2;
94 } swap_slices_t;
95 
96 
97 int sbdp_start_cpu(processorid_t);
98 int sbdp_start_cpu_pairs(processorid_t);
99 int sbdp_stop_cpu(processorid_t);
100 
101 #ifdef	__cplusplus
102 }
103 #endif
104 
105 #endif	/* _SBDP_MBOX_H */
106