Print this page
9842 man page typos and spelling
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man4/sbus.4
+++ new/usr/src/man/man4/sbus.4
1 1 '\" te
2 2 .\" Copyright (c) 1999, Sun Microsystems, Inc.
3 3 .\" All Rights Reserved
4 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 7 .TH SBUS 4 "Dec 31, 1996"
8 8 .SH NAME
9 9 sbus \- configuration files for SBus device drivers
10 10 .SH DESCRIPTION
11 -.sp
12 11 .LP
13 12 The \fBSBus\fR is a geographically addressed peripheral bus present on many
14 13 \fBSPARC\fR hardware platforms. \fBSBus\fR devices are \fIself-identifying\fR
15 14 \(em that is to say the \fBSBus\fR card itself provides information to the
16 15 system so that it can identify the device driver that needs to be used. The
17 16 device usually provides additional information to the system in the form of
18 17 name-value pairs that can be retrieved using the \fBDDI\fR property interfaces.
19 18 See \fBddi_prop_op\fR(9F) for details.
20 19 .sp
21 20 .LP
22 21 The information is usually derived from a small Forth program stored in the
23 22 \fBFCode\fR \fBPROM\fR on the card, so driver configuration files should be
24 23 completely unnecessary for these devices. However, on some occasions, drivers
25 24 for \fBSBus\fR devices may need to use driver configuration files to augment
26 25 the information provided by the \fBSBus\fR card. See \fBdriver.conf\fR(4) for
27 26 further details.
28 27 .sp
29 28 .LP
30 29 When they are needed, configuration files for \fBSBus\fR device drivers should
31 30 identify the parent bus driver implicitly using the \fIclass\fR keyword. This
32 31 removes the dependency on the particular bus driver involved since this may be
33 32 named differently on different platforms.
34 33 .sp
35 34 .LP
36 35 All bus drivers of class \fBsbus\fR recognise the following properties:
37 36 .sp
38 37 .ne 2
39 38 .na
40 39 \fB\fBreg\fR\fR
41 40 .ad
42 41 .RS 14n
43 42 An arbitrary length array where each element of the array consists of a 3-tuple
44 43 of integers. Each array element describes a logically contiguous mappable
45 44 resource on the \fBSBus.\fR
46 45 .sp
47 46 The first integer of each tuple specifies the slot number the card is plugged
48 47 into. The second integer of each 3-tuple specifies the offset in the slot
49 48 address space identified by the first element. The third integer of each
50 49 3-tuple specifies the size in bytes of the mappable resource.
51 50 .sp
52 51 The driver can refer to the elements of this array by index, and construct
53 52 kernel mappings to these addresses using \fBddi_map_regs\fR(9F). The index into
54 53 the array is passed as the \fIrnumber\fR argument of \fBddi_map_regs()\fR.
55 54 .sp
56 55 You can use the \fBddi_get*\fR and \fBddi_put*\fR family of functions to access
57 56 register space from a high-level interrupt context.
58 57 .RE
59 58
60 59 .sp
61 60 .ne 2
62 61 .na
63 62 \fB\fBinterrupts\fR\fR
64 63 .ad
65 64 .RS 14n
66 65 An arbitrary length array where each element of the array consists of a single
67 66 integer. Each array element describes a possible \fBSBus\fR interrupt level
68 67 that the device might generate.
69 68 .sp
70 69 The driver can refer to the elements of this array by index, and register
71 70 interrupt handlers with the system using \fBddi_add_intr\fR(9F). The index into
72 71 the array is passed as the \fIinumber\fR argument of \fBddi_add_intr()\fR.
73 72 .RE
74 73
75 74 .sp
76 75 .ne 2
77 76 .na
↓ open down ↓ |
56 lines elided |
↑ open up ↑ |
78 77 \fB\fBregisters\fR\fR
79 78 .ad
80 79 .RS 14n
81 80 An arbitrary length array where each element of the array consists of a 3-tuple
82 81 of integers. Each array element describes a logically contiguous mappable
83 82 resource on the \fBSBus.\fR
84 83 .sp
85 84 The first integer of each tuple should be set to \fB\(mi1\fR, specifying that
86 85 any SBus slot may be matched. The second integer of each 3-tuple specifies the
87 86 offset in the slot address space identified by the first element. The third
88 -integer of each 3-tuple specifies the size in bytes of the mappable resoure.
87 +integer of each 3-tuple specifies the size in bytes of the mappable resource.
89 88 .sp
90 89 The \fBregisters\fR property can only be used to augment an incompletely
91 90 specified \fBreg\fR property with information from a driver configuration file.
92 91 It may only be specified in a driver configuration file.
93 92 .RE
94 93
95 94 .sp
96 95 .LP
97 96 All \fBSBus\fR devices must provide \fBreg\fR properties to the system. The
98 97 first two integer elements of the \fBreg\fR property are used to construct the
99 98 address part of the device name under \fB/devices\fR.
100 99 .sp
101 100 .LP
102 101 Only devices that generate interrupts need to provide \fBinterrupts\fR
103 102 properties.
104 103 .sp
105 104 .LP
106 105 Occasionally, it may be necessary to override or augment the configuration
107 106 information supplied by the \fBSBus\fR device. This can be achieved by writing
108 107 a driver configuration file that describes a prototype device information
109 108 (devinfo) node specification, containing the additional properties required.
110 109 .sp
111 110 .LP
112 111 For the system to merge the information, certain conditions must be met. First,
113 112 the \fBname\fR property must be the same. Second, either the first two integers
114 113 (slot number and offset) of the two \fBreg\fR properties must be the same, or
115 114 the second integer (offset) of the \fBreg\fR and \fBregisters\fR properties
116 115 must be the same.
117 116 .sp
118 117 .LP
119 118 In the event that the \fBSBus\fR card has no \fBreg\fR property at all, the
120 119 self-identifying information cannot be used, so all the details of the card
121 120 must be specified in a driver configuration file.
122 121 .SH EXAMPLES
123 122 .LP
124 123 \fBExample 1 \fRA sample configuration file.
125 124 .sp
126 125 .LP
127 126 Here is a configuration file for an \fBSBus\fR card called \fBSUNW,netboard\fR.
128 127 The card already has a simple \fBFCode\fR \fBPROM\fR that creates \fBname\fR
129 128 and \fBreg\fR properties, and will have a complete set of properties for normal
130 129 use once the driver and firmware is complete.
131 130
132 131 .sp
133 132 .LP
134 133 In this example, we want to augment the properties given to us by the firmware.
135 134 We use the same \fBname\fR property, and use the \fBregisters\fR property to
136 135 match the firmware \fBreg\fR property. That way we don't have to worry about
137 136 which slot the card is really plugged into.
138 137
139 138 .sp
140 139 .LP
141 140 We want to add an \fBinterrupts\fR property while we are developing the
142 141 firmware and driver so that we can start to experiment with interrupts. The
143 142 device can generate interrupts at \fBSBus\fR level 3. Additionally, we want to
144 143 set a \fBdebug-level\fR property to 4.
145 144
146 145 .sp
147 146 .in +2
148 147 .nf
149 148 #
150 149 # Copyright (c) 1992, by Sun Microsystems, Inc.
↓ open down ↓ |
52 lines elided |
↑ open up ↑ |
151 150 #ident "@(#)SUNW,netboard.conf 1.4 92/03/10 SMI"
152 151 #
153 152 name="SUNW,netboard" class="sbus"
154 153 registers=-1,0x40000,64,-1,0x80000,1024
155 154 interrupts=3 debug-level=4;
156 155 .fi
157 156 .in -2
158 157 .sp
159 158
160 159 .SH ATTRIBUTES
161 -.sp
162 160 .LP
163 161 See \fBattributes\fR(5) for descriptions of the following attributes:
164 162 .sp
165 163
166 164 .sp
167 165 .TS
168 166 box;
169 167 c | c
170 168 l | l .
171 169 ATTRIBUTE TYPE ATTRIBUTE VALUE
172 170 _
173 171 Architecture SPARC
174 172 .TE
175 173
176 174 .SH SEE ALSO
177 -.sp
178 175 .LP
179 176 \fBdriver.conf\fR(4), \fBattributes\fR(5), \fBddi_add_intr\fR(9F),
180 177 \fBddi_map_regs\fR(9F), \fBddi_prop_op\fR(9F)
181 178 .sp
182 179 .LP
183 180 \fIWriting Device Drivers\fR
184 181 .SH WARNINGS
185 -.sp
186 182 .LP
187 183 The wildcarding mechanism of the \fBregisters\fR property matches every
188 184 instance of the particular device attached to the system. This may not always
189 185 be what is wanted.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX