xref: /titanic_52/usr/src/psm/promif/ieee1275/common/prom_version.c (revision c2580b931007758eab8cb5ae8726ebe1588e259b)
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 (c) 1991-1994, by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 #include <sys/promif.h>
30 #include <sys/promimpl.h>
31 
32 int
33 prom_getversion(void)
34 {
35 
36 	/*
37 	 * For compatibility with older client programs, if there is no
38 	 * ROMVEC, we simply return a very large number here.
39 	 */
40 	return (obp_romvec_version);
41 }
42 
43 int
44 prom_is_openprom(void)
45 {
46 	/*
47 	 * Returns true, if openboot or open firmware interface exists.
48 	 */
49 	return (1);
50 }
51 
52 int
53 prom_is_p1275(void)
54 {
55 	/*
56 	 * Returns true, if IEEE 1275 interface exists.
57 	 */
58 	return (1);
59 }
60 
61 /*
62  * Certain standalones need to get the revision of a certain
63  * version of the firmware to be able to figure out how to
64  * correct for certain errors in certain versions of the PROM.
65  *
66  * The caller has to know what to do with the cookie returned
67  * from prom_mon_id(). c.f. uts/sun4c/io/autoconf.c:impl_fix_props().
68  */
69 
70 void *
71 prom_mon_id(void)
72 {
73 	return (NULL);		/* For compatibilty, none exists in 1275 */
74 }
75