xref: /illumos-gate/usr/src/uts/intel/promif/prom_init.c (revision 763f1f5f97e4c16840af2ced98915f0ed0f46616)
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 #include <sys/promif.h>
28 #include <sys/promimpl.h>
29 #include <sys/prom_emul.h>
30 #include <sys/bootconf.h>
31 #include <sys/obpdefs.h>
32 #include <sys/kmem.h>
33 
34 int	promif_debug = 0;	/* debug */
35 int	emul_1275 = 0;
36 
37 /*
38  *  Every standalone that wants to use this library must call
39  *  prom_init() before any of the other routines can be called.
40  */
41 /*ARGSUSED*/
42 void
43 prom_init(char *pgmname, void *cookie)
44 {
45 	/* nothing to do */
46 }
47 
48 #ifndef _KMDB
49 /*
50  * This is for compatibility only. Somewhere between Solaris 2.6
51  * and 10, we had a prom tree constructed by a bootloader with
52  * realmode drivers. That is now gone, but we are left with some
53  * applications depending on /dev/openprom. We fake a prom tree
54  * based on hardware properties in the kernel device tree.
55  */
56 void
57 prom_setup()
58 {
59 	promif_create_device_tree();
60 }
61 #endif
62