xref: /titanic_41/usr/src/cmd/mdb/common/modules/genunix/devinfo.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_DEVINFO_H
28 #define	_DEVINFO_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #include <mdb/mdb_modapi.h>
37 
38 extern int devinfo_walk_init(mdb_walk_state_t *);
39 extern int devinfo_walk_step(mdb_walk_state_t *);
40 extern void devinfo_walk_fini(mdb_walk_state_t *);
41 
42 extern int devinfo_parents_walk_init(mdb_walk_state_t *);
43 extern int devinfo_parents_walk_step(mdb_walk_state_t *);
44 extern void devinfo_parents_walk_fini(mdb_walk_state_t *);
45 
46 extern int devinfo_children_walk_init(mdb_walk_state_t *);
47 extern int devinfo_children_walk_step(mdb_walk_state_t *);
48 extern void devinfo_children_walk_fini(mdb_walk_state_t *);
49 
50 extern int devinfo2driver(uintptr_t, uint_t, int, const mdb_arg_t *);
51 
52 extern int devnames_walk_init(mdb_walk_state_t *);
53 extern int devnames_walk_step(mdb_walk_state_t *);
54 extern void devnames_walk_fini(mdb_walk_state_t *);
55 
56 extern int devinfo_siblings_walk_init(mdb_walk_state_t *);
57 extern int devinfo_siblings_walk_step(mdb_walk_state_t *);
58 
59 extern int devi_next_walk_step(mdb_walk_state_t *);
60 
61 extern int prtconf(uintptr_t, uint_t, int, const mdb_arg_t *);
62 extern int devinfo(uintptr_t, uint_t, int, const mdb_arg_t *);
63 extern int modctl2devinfo(uintptr_t, uint_t, int, const mdb_arg_t *);
64 extern int devnames(uintptr_t, uint_t, int, const mdb_arg_t *);
65 extern int devbindings(uintptr_t, uint_t, int, const mdb_arg_t *);
66 extern int name2major(uintptr_t, uint_t, int, const mdb_arg_t *);
67 extern int major2name(uintptr_t, uint_t, int, const mdb_arg_t *);
68 extern int major2snode(uintptr_t, uint_t, int, const mdb_arg_t *);
69 extern int dev2major(uintptr_t, uint_t, int, const mdb_arg_t *);
70 extern int dev2minor(uintptr_t, uint_t, int, const mdb_arg_t *);
71 extern int dev2snode(uintptr_t, uint_t, int, const mdb_arg_t *);
72 extern int devt(uintptr_t, uint_t, int, const mdb_arg_t *);
73 extern int softstate(uintptr_t, uint_t, int, const mdb_arg_t *);
74 extern int devinfo_fm(uintptr_t, uint_t, int, const mdb_arg_t *);
75 extern int devinfo_fmce(uintptr_t, uint_t, int, const mdb_arg_t *);
76 
77 extern int soft_state_walk_init(mdb_walk_state_t *);
78 extern int soft_state_walk_step(mdb_walk_state_t *);
79 extern int soft_state_all_walk_step(mdb_walk_state_t *);
80 extern void soft_state_walk_fini(mdb_walk_state_t *);
81 
82 extern int devinfo_fmc_walk_init(mdb_walk_state_t *);
83 extern int devinfo_fmc_walk_step(mdb_walk_state_t *);
84 
85 extern int binding_hash_walk_init(mdb_walk_state_t *);
86 extern int binding_hash_walk_step(mdb_walk_state_t *);
87 extern void binding_hash_walk_fini(mdb_walk_state_t *);
88 extern int binding_hash_entry(uintptr_t, uint_t, int, const mdb_arg_t *);
89 
90 extern int devinfo_audit(uintptr_t, uint_t, int, const mdb_arg_t *);
91 
92 extern int devinfo_audit_log_walk_init(mdb_walk_state_t *);
93 extern int devinfo_audit_log_walk_step(mdb_walk_state_t *);
94 extern void devinfo_audit_log_walk_fini(mdb_walk_state_t *);
95 extern int devinfo_audit_log(uintptr_t, uint_t, int, const mdb_arg_t *);
96 
97 extern int devinfo_audit_node_walk_init(mdb_walk_state_t *);
98 extern int devinfo_audit_node_walk_step(mdb_walk_state_t *);
99 extern void devinfo_audit_node_walk_fini(mdb_walk_state_t *);
100 extern int devinfo_audit_node(uintptr_t, uint_t, int, const mdb_arg_t *);
101 
102 extern int minornode_walk_init(mdb_walk_state_t *);
103 extern int minornode_walk_step(mdb_walk_state_t *);
104 extern int minornodes(uintptr_t, uint_t, int, const mdb_arg_t *);
105 
106 extern void prtconf_help(void);
107 extern void devinfo_help(void);
108 
109 extern uintptr_t devinfo_root;	/* Address of root of devinfo tree */
110 
111 #ifdef	__cplusplus
112 }
113 #endif
114 
115 #endif	/* _DEVINFO_H */
116