updated package versions
[minix.git] / include / minix / rs.h
blobae784485af15604c6b18bd047d4c70f19c9da331
1 #ifndef RS_H
2 #define RS_H
4 /*
5 minix/rs.h
7 Interface to the reincarnation server
8 */
10 #include <minix/bitmap.h>
11 #include <minix/com.h>
13 /* RSS definitions. */
14 #define RSS_NR_IRQ 16
15 #define RSS_NR_IO 16
17 /* RSS flags. */
18 #define RSS_COPY 0x01 /* Copy the brinary into RS to make it possible
19 * to restart the driver without accessing FS
21 #define RSS_IPC_VALID 0x02 /* rss_ipc and rss_ipclen are valid */
22 #define RSS_REUSE 0x04 /* Try to reuse previously copied binary */
24 /* Common definitions. */
25 #define RS_SYS_CALL_MASK_SIZE 2
26 #define RS_NR_CONTROL 8
27 #define RS_NR_PCI_DEVICE 32
28 #define RS_NR_PCI_CLASS 4
29 #define RS_MAX_LABEL_LEN 16
31 /* Labels are copied over separately. */
32 struct rss_label
34 char *l_addr;
35 size_t l_len;
38 /* Arguments needed to start a new driver or server */
39 struct rs_start
41 unsigned rss_flags;
42 char *rss_cmd;
43 size_t rss_cmdlen;
44 uid_t rss_uid;
45 int rss_nice;
46 int rss_major;
47 long rss_period;
48 char *rss_script;
49 size_t rss_scriptlen;
50 int rss_nr_irq;
51 int rss_irq[RSS_NR_IRQ];
52 int rss_nr_io;
53 struct { unsigned base; unsigned len; } rss_io[RSS_NR_IO];
54 int rss_nr_pci_id;
55 struct { u16_t vid; u16_t did; } rss_pci_id[RS_NR_PCI_DEVICE];
56 int rss_nr_pci_class;
57 struct { u32_t class; u32_t mask; } rss_pci_class[RS_NR_PCI_CLASS];
58 u32_t rss_system[RS_SYS_CALL_MASK_SIZE];
59 struct rss_label rss_label;
60 char *rss_ipc;
61 size_t rss_ipclen;
62 bitchunk_t rss_vm[VM_CALL_MASK_SIZE];
63 int rss_nr_control;
64 struct rss_label rss_control[RS_NR_CONTROL];
67 /* ACL information for access to PCI devices */
68 struct rs_pci
70 char rsp_label[RS_MAX_LABEL_LEN];
71 int rsp_endpoint;
72 int rsp_nr_device;
73 struct { u16_t vid; u16_t did; } rsp_device[RS_NR_PCI_DEVICE];
74 int rsp_nr_class;
75 struct { u32_t class; u32_t mask; } rsp_class[RS_NR_PCI_CLASS];
78 /* Definition of a public entry of the system process table. */
79 struct rprocpub {
80 short in_use; /* set when the entry is in use */
81 unsigned sys_flags; /* sys flags */
82 endpoint_t endpoint; /* process endpoint number */
84 dev_t dev_nr; /* major device number */
85 int dev_style; /* device style */
86 long period; /* heartbeat period (or zero) */
88 char label[RS_MAX_LABEL_LEN]; /* label of this service */
89 char proc_name[RS_MAX_LABEL_LEN]; /* process name of this service */
91 bitchunk_t vm_call_mask[VM_CALL_MASK_SIZE]; /* vm call mask */
93 struct rs_pci pci_acl; /* pci acl */
96 _PROTOTYPE( int minix_rs_lookup, (const char *name, endpoint_t *value));
98 #endif