summaryrefslogtreecommitdiff
path: root/usr/src/uts/sun4u/serengeti/sys/sbdp_mbox.h
blob: b85c3b92bf373824ebfd54c8e899afd4256c6e12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2001 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef _SBDP_MBOX_H
#define	_SBDP_MBOX_H

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#ifdef	__cplusplus
extern "C" {
#endif

#define	SBDP_POWER_OFF		0x0
#define	SBDP_POWER_ON		0x1
#define	SBDP_UNASSIGN		0x0
#define	SBDP_ASSIGN		0x1

/*
 * DR Mailbox definitions
 */
#define	DR_MBOX_SHOW_BOARD	0x2002
#define	DR_MBOX_POWER		0x2003
#define	DR_MBOX_ASSIGN		0x2004
#define	DR_MBOX_TEST_BD		0x2005
#define	DR_MBOX_STICK_ADM	0x2006
#define	DR_MBOX_SWAP_SLICES	0x2007
#define	DR_MBOX_START_CPU	0x2008
#define	DR_MBOX_STOP_CPU	0x2009
#define	DR_MBOX_START_CPU_PAIRS	0x2010
#define	DR_MBOX_CLAIM		0x2011
#define	DR_MBOX_UNCLAIM		0x2012
#define	DR_MBOX_NOOP		0x2013

/*
 * DR Mailbox data structures
 */
typedef struct {
	int	revision;	/* temp */
	int	node;		/* Node ID */
	int	board;		/* Board number */
	int	extra;		/* for assign and power */
} info2_t;

typedef struct {
	info2_t		info;	/* Normal information */
	uint32_t	flag;	/* Force operation */
} testb_t;

typedef struct {
	int revision;	/* temp */
	int node;	/* Node ID */
	int board;	/* Board number */
} info_t;

typedef struct {
	int	revision;
	int	s_cond;		/* 0 = unknown, 1 = ok, 2 =  failing,	*/
				/* 3 = failed, 4 = unusable		*/
	int	s_power;	/* 0 = off, 1 = on */
	int	s_assigned;	/* 0 = unassigned, 1 = assigned */
	int	s_claimed;	/* 0 = unclaimed, 1 = claimed */
	int	s_present;	/* 0 = slot empty 1 = present */
	int	s_ledstatus;	/* LEDs status */
	char	s_type[12];	/* type of board */
	char	s_info[64];	/* TBD */
} show_board_t;

typedef struct {
	int	board1;
	int	board2;
} swap_slices_t;


int sbdp_start_cpu(processorid_t);
int sbdp_start_cpu_pairs(processorid_t);
int sbdp_stop_cpu(processorid_t);

#ifdef	__cplusplus
}
#endif

#endif	/* _SBDP_MBOX_H */