Home | History | Annotate | Line # | Download | only in doc
      1 /*	$NetBSD: majors+minors,v 1.2 2022/04/07 20:23:44 andvar Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 19941198 Mark Brinicombe.
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  * 3. All advertising materials mentioning features or use of this software
     16  *    must display the following acknowledgement:
     17  *	This product includes software developed by Mark Brinicombe
     18  *	for the NetBSD Project.
     19  * 4. The name of the company nor the name of the author may be used to
     20  *    endorse or promote products derived from this software without specific
     21  *    prior written permission.
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
     24  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     25  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     26  * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
     27  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     29  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  * SUCH DAMAGE.
     34  *
     35  * list of all allocated major numbers
     36  *
     37  * Created      : 17/09/94
     38  */
     39 
     40 List of allocated and reserved major and minor numbers
     41 
     42 The block and character major numbers are ALWAYS allocated together to the
     43 same device driver even if the driver does not require both.
     44 
     45  0 B 	- reserved
     46  0 C	- memory device
     47 	  minor = 0 - /dev/mem
     48 	  minor = 1 - /dev/kmem
     49 	  minor = 2 - /dev/null
     50 	  minor = 3 - /dev/zero
     51  1 B	- swap device
     52  1 C	- pseudo swap device
     53 	  minor = 0 - /dev/drum
     54  2 B	- reserved
     55  2 C	- console device
     56 	  minor = 0 - /dev/console
     57  3 B	- reserved
     58  3 C	- controlling terminal
     59 	  minor = 0 - /dev/tty
     60  4 B	- reserved
     61  4 C	- virtual console
     62 	  /dev/ttyv{unit}
     63 	  unit = minor
     64  5 B	- reserved
     65  5 C	- kernel log device
     66 	  minor = 0 - /dev/klog
     67  6 B	- reserved
     68  6 C	- pseudo tty master
     69 	  /dev/pty{class}{unit}
     70 	  unit = minor % 16
     71 	  minor / 16 = 0 - class = p
     72 	  minor / 16 = 1 - class = q
     73 	  minor / 16 = 2 - class = r
     74 	  minor / 16 = 3 - class = s
     75 	  minor / 16 = 4 - class = t
     76  7 B	- reserved
     77  7 C	- pseudo tty slave
     78 	  /dev/tty{class}{unit}
     79 	  unit = minor % 16
     80 	  minor / 16 = 0 - class = p
     81 	  minor / 16 = 1 - class = q
     82 	  minor / 16 = 2 - class = r
     83 	  minor / 16 = 3 - class = s
     84 	  minor / 16 = 4 - class = t
     85  8 B	- reserved
     86  8 C	- parallel printer
     87 	  /dev/lp{class}{unit}
     88 	  unit = minor & 0x1f
     89 	  minor & 0x80 = 0x00 - class = t - interrupt driver
     90 	  minor & 0x80 = 0x80 - class = a - polling driver
     91 	  e.g.
     92 	    0 - /dev/lpt0
     93 	  128 - /dev/lpa0
     94  9 B	- reserved
     95  9 C	- quadrature mouse
     96 	  minor = 0 - /dev/quadmouse
     97 10 B	- reserved
     98 10 C	- beep device
     99 	  minor = 0 - /dev/beep
    100 11 B	- reserved
    101 11 C	- keyboard device
    102 	  minor = 0 - /dev/kbd
    103 12 B	- reserved
    104 12 C	- serial port
    105 	  /dev/tty0{unit}
    106 	  unit = minor
    107 13 B	- reserver
    108 13 C	- reserved
    109 14 B	- reserved
    110 14 C	- reserved
    111 15 B	- reserved
    112 15 C	- reserved
    113 16 B	- ST506/ESDI/IDE disk
    114 	  /dev/wd{unit}{partition}
    115 	  partition = minor % 8
    116 	  unit = minor / 8
    117 16 C	- ST506/ESDI/IDE disk
    118 	  /dev/rwd{unit}{partition}
    119 	  partition = minor % 8
    120 	  unit = minor / 8
    121 17 B	- floppy disk
    122 	  /dev/fd{unit}{partition}
    123 	  partition = minor % 8
    124 	  unit = minor / 8
    125 17 C	- floppy disk
    126 	  /dev/rfd{unit}{partition}
    127 	  partition = minor % 8
    128 	  unit = minor / 8
    129 18 B	- ram disk
    130 	  /dev/rd{unit}{partition}
    131 	  partition = minor % 8
    132 	  unit = minor / 8
    133 18 C	- ram disk
    134 	  /dev/rrd{unit}{partition}
    135 	  partition = minor % 8
    136 	  unit = minor / 8
    137 19 B	- vnode disk driver
    138 	  /dev/vnd{unit}{partition}
    139 	  partition = minor % 8
    140 	  unit = minor / 8
    141 19 C	- vnode disk driver
    142 	  /dev/rvnd{unit}{partition}
    143 	  partition = minor % 8
    144 	  unit = minor / 8
    145 20 B	- reserved (ATAPI CDROM)
    146 	  /dev/acd{unit}{partition}
    147 	  partition = minor % 8
    148 	  unit = minor / 8
    149 20 C	- reserved (ATAPI CDROM)
    150 	  /dev/racd{unit}{partition}
    151 	  partition = minor % 8
    152 	  unit = minor / 8
    153 21 B	- concatenated disk driver
    154 	  /dev/ccd{unit}{partition}
    155 	  partition = minor % 8
    156 	  unit = minor / 8
    157 21 C	- concatenated disk driver
    158 	  /dev/rccd{unit}{partition}
    159 	  partition = minor % 8
    160 	  unit = minor / 8
    161 22 B	- reserved
    162 22 C	- reserved
    163 23 B	- reserved
    164 23 C	- reserved
    165 24 B	- SCSI disk
    166 	  /dev/sd{unit}{partition}
    167 	  partition = minor % 8
    168 	  unit = minor / 8
    169 24 C	- SCSI disk
    170 	  /dev/rsd{unit}{partition}
    171 	  partition = minor % 8
    172 	  unit = minor / 8
    173 25 B	- SCSI tape
    174 25 C	- SCSI tape
    175 26 B	- SCSI cdrom
    176 	  /dev/cd{unit}{partition}
    177 	  partition = minor % 8
    178 	  unit = minor / 8
    179 26 C	- SCSI cdrom
    180 	  /dev/rcd{unit}{partition}
    181 	  partition = minor % 8
    182 	  unit = minor / 8
    183 27 B	- reserved
    184 27 C	- SCSI autochanger
    185 	  /dev/ch{unit}
    186 	  unit = minor
    187 28 B	- reserved
    188 28 C	- SCSI unknown device
    189 	  /dev/uk{unit}
    190 	  unit = minor
    191 29 B	- reserved
    192 29 C	- SCSI scanner device
    193 	  /dev/ss{unit}
    194 	  unit = minor
    195 30 B	- reserved
    196 30 C	- reserved
    197 31 B	- reserved
    198 31 C	- reserved
    199 32 B	- reserved
    200 32 C	- Berkeley packet filter
    201 	  /dev/bpf{unit}
    202 	  unit = minor
    203 	  minor = 0 - /dev/bpf0
    204 	  minor = 1 - /dev/bpf1
    205 	  minor = 2 - /dev/bpf2
    206 	  minor = 3 - /dev/bpf3
    207 33 B	- reserved
    208 33 C	- network tunnel
    209 	  /dev/tun{unit}
    210 	  unit = minor
    211 	  minor = 0 - /dev/tun0
    212 	  minor = 1 - /dev/tun1
    213 	  minor = 2 - /dev/tun2
    214 34 B	- reserved
    215 34 C	- file descriptor pseudo-device
    216 	  minor = 0 - /dev/stdin
    217 	  minor = 1 - /dev/stdout
    218 	  minor = 2 - /dev/stderr
    219 35 B	- reserved
    220 35 C	- loadable module driver
    221 	  minor = 0 - /dev/lkm
    222 36 B	- reserved
    223 36 C	- generic audio device
    224 37 B	- reserved
    225 37 C	- vidcconsole device
    226 	  minor = 0 - /dev/vidcconsole
    227 38 B	- reserved
    228 38 C	- cpu/hydra
    229 	  minor = 0 - /dev/cpu0
    230 39 B	- reserved
    231 39 C	- reserved
    232 40 B	- reserved
    233 40 C	- PS2 mouse
    234 	  minor = 0 - /dev/pms
    235 41 B	- reserved
    236 41 C	- reserved
    237 42 B	- reserved
    238 42 C	- IIC device
    239 43 B	- reserved
    240 43 C	- RTC device
    241 44 B	- reserved
    242 44 C	- reserved (generic video)
    243 		   (/dev/gfx{unit})
    244 		   (unit = minor)
    245 45 B	- reserved
    246 45 C	- reserved (virtual console)
    247 		   (/dev/ttyg{unit})
    248 		   (unit = minor)
    249 46 B	- reserved
    250 46 C	- ip-filter
    251 47	- reserved
    252 48 B	- reserved
    253 48 C	- S/PDIF
    254 49 B	- reserved
    255 49 C	- ofrom
    256 50 B	- reserved
    257 50 C	- smart card (/dev/scr)
    258 51 B	- reserved
    259 51 C	- reserved
    260 52 B	- reserved
    261 52 C	- random device
    262 53 B	- reserved
    263 53 C	- FIQ profiler
    264 54 B	- reserved
    265 54 C	- Footbridge diag serial
    266 	  minor = 0 - /dev/fcom
    267 55 B	- reserved
    268 55 C	- reserved for bypass device
    269 56 B	- reserved
    270 56 C	- ISA jostick
    271 57 B	- reserved
    272 57 C	- MIDI I/O
    273 58 B	- reserved
    274 58 C	- Sequencer I/O
    275 59 B	- reserved
    276 59 C	- reserved for CODA
    277 60 B	- reserved
    278 60 C	- wsdisplay device
    279 61 B	- reserved
    280 61 C	- wskbd device
    281 62 B	- reserved
    282 62 C	- wsmouse device
    283 63 B	- reserved
    284 63 C	- reserved
    285 64 B	- reserved
    286 64 C	- USB controller
    287 65 B	- reserved
    288 65 C	- USB HID
    289 66 B	- reserved
    290 66 C	- USB printer
    291 67 B	- reserved
    292 67 C	- reserved
    293 68 B	- reserved
    294 68 C	- reserved
    295 69 B	- reserved
    296 69 C	- reserved
    297 
    298 70+ free for allocation
    299