xref: /illumos-gate/usr/src/lib/fm/topo/libtopo/common/topo_builtin.h (revision 65a89a64c60f3061bbe2381edaacc81660af9a95)
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 /*
24  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25  * Use is subject to license terms.
26  */
27 
28 #ifndef	_TOPO_BUILTIN_H
29 #define	_TOPO_BUILTIN_H
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 #include <topo_tree.h>
38 #include <topo_module.h>
39 
40 /*
41  * topo_builtin.h
42  *
43  * This header file provides prototypes for any built-in scheme enumerators
44  * that are compiled directly into topo.  Prototypes for their init and
45  * fini routines can be added here and corresponding linkage information to
46  * these functions should be added to the table found in topo_builtin.c.
47  */
48 
49 typedef struct topo_builtin {
50 	const char *bltin_name;
51 	void (*bltin_init)(topo_mod_t *);
52 	void (*bltin_fini)(topo_mod_t *);
53 } topo_builtin_t;
54 
55 extern int topo_builtin_create(topo_hdl_t *, const char *);
56 
57 extern void hc_init(topo_mod_t *);	/* see hc.c */
58 extern void hc_fini(topo_mod_t *);	/* see hc.c */
59 extern void cpu_init(topo_mod_t *);	/* see cpu.c */
60 extern void cpu_fini(topo_mod_t *);	/* see cpu.c */
61 extern void mem_init(topo_mod_t *);	/* see mem.c */
62 extern void mem_fini(topo_mod_t *);	/* see mem.c */
63 extern void mod_init(topo_mod_t *);	/* see mod.c */
64 extern void mod_fini(topo_mod_t *);	/* see mod.c */
65 extern void pkg_init(topo_mod_t *);	/* see pkg.c */
66 extern void pkg_fini(topo_mod_t *);	/* see pkg.c */
67 
68 #ifdef	__cplusplus
69 }
70 #endif
71 
72 #endif	/* _TOPO_BUILTIN_H */
73