root / lab4 / .minix-src / include / minix / dmap.h @ 14
History | View | Annotate | Download (6.27 KB)
1 | 13 | up20180614 | #ifndef _DMAP_H
|
---|---|---|---|
2 | #define _DMAP_H
|
||
3 | |||
4 | #include <minix/sys_config.h> |
||
5 | #include <minix/ipc.h> |
||
6 | |||
7 | /*===========================================================================*
|
||
8 | * Major and minor device numbers *
|
||
9 | *===========================================================================*/
|
||
10 | |||
11 | /* Major device numbers. */
|
||
12 | |||
13 | /* Note that NO_DEV is major 0, minor 0, and means "no device". In contrast,
|
||
14 | * NONE_MAJOR is used for file systems that do not have backing device (but are
|
||
15 | * mounted on device 'none'). For administrative purposes, these file systems
|
||
16 | * need to be assigned a pseudo device, and such pseudo devices are allocated
|
||
17 | * with major number NONE_MAJOR. Because of NO_DEV, the NONE_MAJOR devices
|
||
18 | * start from minor number 1. Otherwise, NONE_MAJOR is completely independent
|
||
19 | * from NO_DEV, and it should be possible to set NONE_MAJOR to a nonzero value!
|
||
20 | */
|
||
21 | #define NONE_MAJOR 0 /* 0 = pseudo device for 'none' FSes */ |
||
22 | #define MEMORY_MAJOR 1 /* 1 = /dev/mem (memory devices) */ |
||
23 | #define FLOPPY_MAJOR 2 /* 2 = /dev/fd0 (floppy disks) */ |
||
24 | /* 3 = /dev/c0 */
|
||
25 | #define TTY_MAJOR 4 /* 4 = /dev/tty00 (ttys) */ |
||
26 | #define CTTY_MAJOR 5 /* 5 = /dev/tty */ |
||
27 | #define PRINTER_MAJOR 6 /* 6 = /dev/lp (printer driver) */ |
||
28 | #define TCPIP_MAJOR 7 /* 7 = /dev/bpf (TCP/IP service) */ |
||
29 | /* 8 = /dev/c1 */
|
||
30 | #define PTY_MAJOR 9 /* 9 = /dev/ptyp0 (pty driver) */ |
||
31 | /* 10 = /dev/c2 */
|
||
32 | #define FILTER_MAJOR 11 /* 11 = /dev/filter (filter driver) */ |
||
33 | /* 12 = /dev/c3 */
|
||
34 | #define AUDIO_MAJOR 13 /* 13 = /dev/audio (audio driver) */ |
||
35 | #define FBD_MAJOR 14 /* 14 = /dev/fbd (faulty block dev)*/ |
||
36 | #define LOG_MAJOR 15 /* 15 = /dev/klog (log driver) */ |
||
37 | #define RANDOM_MAJOR 16 /* 16 = /dev/random (random driver) */ |
||
38 | #define HELLO_MAJOR 17 /* 17 = /dev/hello (hello driver) */ |
||
39 | /* 18 = (unused) */
|
||
40 | #define FB_MAJOR 19 /* 19 = /dev/fb0 (fb driver) */ |
||
41 | #define I2C0_MAJOR 20 /* 20 = /dev/i2c-1 (i2c-dev) */ |
||
42 | #define I2C1_MAJOR 21 /* 21 = /dev/i2c-2 (i2c-dev) */ |
||
43 | #define I2C2_MAJOR 22 /* 22 = /dev/i2c-3 (i2c-dev) */ |
||
44 | #define EEPROMB1S50_MAJOR 23 /* 23 = /dev/eepromb1s50 (cat24c256) */ |
||
45 | #define EEPROMB1S51_MAJOR 24 /* 24 = /dev/eepromb1s51 (cat24c256) */ |
||
46 | #define EEPROMB1S52_MAJOR 25 /* 25 = /dev/eepromb1s52 (cat24c256) */ |
||
47 | #define EEPROMB1S53_MAJOR 26 /* 26 = /dev/eepromb1s53 (cat24c256) */ |
||
48 | #define EEPROMB1S54_MAJOR 27 /* 27 = /dev/eepromb1s54 (cat24c256) */ |
||
49 | #define EEPROMB1S55_MAJOR 28 /* 28 = /dev/eepromb1s55 (cat24c256) */ |
||
50 | #define EEPROMB1S56_MAJOR 29 /* 29 = /dev/eepromb1s56 (cat24c256) */ |
||
51 | #define EEPROMB1S57_MAJOR 30 /* 30 = /dev/eepromb1s57 (cat24c256) */ |
||
52 | #define EEPROMB2S50_MAJOR 31 /* 31 = /dev/eepromb2s50 (cat24c256) */ |
||
53 | #define EEPROMB2S51_MAJOR 32 /* 32 = /dev/eepromb2s51 (cat24c256) */ |
||
54 | #define EEPROMB2S52_MAJOR 33 /* 33 = /dev/eepromb2s52 (cat24c256) */ |
||
55 | #define EEPROMB2S53_MAJOR 34 /* 34 = /dev/eepromb2s53 (cat24c256) */ |
||
56 | #define EEPROMB2S54_MAJOR 35 /* 35 = /dev/eepromb2s54 (cat24c256) */ |
||
57 | #define EEPROMB2S55_MAJOR 36 /* 36 = /dev/eepromb2s55 (cat24c256) */ |
||
58 | #define EEPROMB2S56_MAJOR 37 /* 37 = /dev/eepromb2s56 (cat24c256) */ |
||
59 | #define EEPROMB2S57_MAJOR 38 /* 38 = /dev/eepromb2s57 (cat24c256) */ |
||
60 | #define EEPROMB3S50_MAJOR 39 /* 39 = /dev/eepromb3s50 (cat24c256) */ |
||
61 | #define EEPROMB3S51_MAJOR 40 /* 40 = /dev/eepromb3s51 (cat24c256) */ |
||
62 | #define EEPROMB3S52_MAJOR 41 /* 41 = /dev/eepromb3s52 (cat24c256) */ |
||
63 | #define EEPROMB3S53_MAJOR 42 /* 42 = /dev/eepromb3s53 (cat24c256) */ |
||
64 | #define EEPROMB3S54_MAJOR 43 /* 43 = /dev/eepromb3s54 (cat24c256) */ |
||
65 | #define EEPROMB3S55_MAJOR 44 /* 44 = /dev/eepromb3s55 (cat24c256) */ |
||
66 | #define EEPROMB3S56_MAJOR 45 /* 45 = /dev/eepromb3s56 (cat24c256) */ |
||
67 | #define EEPROMB3S57_MAJOR 46 /* 46 = /dev/eepromb3s57 (cat24c256) */ |
||
68 | #define TSL2550B1S39_MAJOR 47 /* 47 = /dev/tsl2550b1s39 (tsl2550) */ |
||
69 | #define TSL2550B2S39_MAJOR 48 /* 48 = /dev/tsl2550b2s39 (tsl2550) */ |
||
70 | #define TSL2550B3S39_MAJOR 49 /* 49 = /dev/tsl2550b3s39 (tsl2550) */ |
||
71 | #define SHT21B1S40_MAJOR 50 /* 50 = /dev/sht21b1s40 (sht21) */ |
||
72 | #define SHT21B2S40_MAJOR 51 /* 51 = /dev/sht21b2s40 (sht21) */ |
||
73 | #define SHT21B3S40_MAJOR 52 /* 52 = /dev/sht21b3s40 (sht21) */ |
||
74 | #define BMP085B1S77_MAJOR 53 /* 53 = /dev/bmp085b1s77 (bmp085) */ |
||
75 | #define BMP085B2S77_MAJOR 54 /* 54 = /dev/bmp085b2s77 (bmp085) */ |
||
76 | #define BMP085B3S77_MAJOR 55 /* 55 = /dev/bmp085b3s77 (bmp085) */ |
||
77 | /* 56-63 = /dev/vnd[0-7] (vnd) */
|
||
78 | #define INPUT_MAJOR 64 /* 64 = /dev/input (input) */ |
||
79 | #define USB_BASE_MAJOR 65 /* 65-133 = USB major range */ |
||
80 | #define PCI_MAJOR 134 /* 134 = /dev/pci (pci) */ |
||
81 | |||
82 | #define NR_DEVICES 135 /* number of (major) devices */ |
||
83 | |||
84 | /* Minor device numbers for memory driver. */
|
||
85 | # define RAM_DEV_OLD 0 /* minor device for /dev/ram */ |
||
86 | # define MEM_DEV 1 /* minor device for /dev/mem */ |
||
87 | # define KMEM_DEV 2 /* minor device for /dev/kmem */ |
||
88 | # define NULL_DEV 3 /* minor device for /dev/null */ |
||
89 | # define BOOT_DEV 4 /* minor device for /dev/boot */ |
||
90 | # define ZERO_DEV 5 /* minor device for /dev/zero */ |
||
91 | # define IMGRD_DEV 6 /* minor device for /dev/imgrd */ |
||
92 | # define RAM_DEV_FIRST 7 /* first minor device for /dev/ram* */ |
||
93 | |||
94 | /* Minor device numbers for the TTY driver. */
|
||
95 | # define CONS_MINOR 0 /* console device */ |
||
96 | |||
97 | /* Minor device numbers for the PTY driver. */
|
||
98 | # define UNIX98_MINOR 256 /* Base number of UNIX98 PTYs, which |
||
99 | * are allocated in (master,slave)
|
||
100 | * pairs: 256=master#0, 257=slave#0,
|
||
101 | * 258=master#1, 259=slave#1, etc.
|
||
102 | * This logic is shared between the
|
||
103 | * PTY service and libc devname(3).
|
||
104 | */
|
||
105 | |||
106 | #define CTRLR(n) ((n)==0 ? 3 : (8 + 2*((n)-1))) /* magic formula */ |
||
107 | |||
108 | /* Minor device numbers for log driver. */
|
||
109 | # define IS_KLOG_DEV 0 /* minor device for /dev/klog */ |
||
110 | |||
111 | /* Full device numbers that are special to the boot monitor and FS. */
|
||
112 | # define DEV_RAM ((dev_t) 0x0100) /* device number of /dev/ram */ |
||
113 | # define DEV_IMGRD ((dev_t) 0x0106) /* device number of /dev/imgrd */ |
||
114 | |||
115 | #endif /* _DMAP_H */ |