xref: /titanic_50/usr/src/uts/sun4v/os/mach_ddi_impl.c (revision 9acbbeaf2a1ffe5c14b244867d427714fab43c5c)
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 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 /*
30  * sun4u specific DDI implementation
31  */
32 #include <sys/bootconf.h>
33 #include <sys/conf.h>
34 #include <sys/machsystm.h>
35 #include <sys/idprom.h>
36 #include <sys/promif.h>
37 
38 
39 /*
40  * Favored drivers of this implementation
41  * architecture.  These drivers MUST be present for
42  * the system to boot at all.
43  */
44 char *impl_module_list[] = {
45 	"rootnex",
46 	"options",
47 	"sad",		/* Referenced via init_tbl[] */
48 	"pseudo",
49 	"clone",
50 	"scsi_vhci",
51 	(char *)0
52 };
53 
54 /*
55  * Check the status of the device node passed as an argument.
56  *
57  *	if ((status is OKAY) || (status is DISABLED))
58  *		return DDI_SUCCESS
59  *	else
60  *		print a warning and return DDI_FAILURE
61  */
62 /*ARGSUSED*/
63 int
64 check_status(int id, char *buf, dev_info_t *parent)
65 {
66 	char status_buf[64];
67 	extern int status_okay(int, char *, int);
68 
69 	/*
70 	 * is the status okay?
71 	 */
72 	if (status_okay(id, status_buf, sizeof (status_buf)))
73 		return (DDI_SUCCESS);
74 
75 	return (DDI_FAILURE);
76 }
77