VM: simplify slab allocator
[minix.git] / include / minix / rs.h
blobb47973c34291f325c45aa60e96d86e30fc5aa28a
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 #define SERVICE_LOGIN "service" /* passwd file entry for services */
15 /* RSS definitions. */
16 #define RSS_NR_IRQ 16
17 #define RSS_NR_IO 16
18 #define RSS_IRQ_ALL (RSS_NR_IRQ+1)
19 #define RSS_IO_ALL (RSS_NR_IO+1)
20 #define RSS_IPC_ALL "IPC_ALL"
21 #define RSS_IPC_ALL_SYS "IPC_ALL_SYS"
23 /* RSS flags. */
24 #define RSS_COPY 0x01 /* keep an in-memory copy of the binary */
25 #define RSS_REUSE 0x04 /* Try to reuse previously copied binary */
26 #define RSS_NOBLOCK 0x08 /* unblock caller immediately */
27 #define RSS_REPLICA 0x10 /* keep a replica of the service */
28 #define RSS_SELF_LU 0x20 /* perform self update */
29 #define RSS_SYS_BASIC_CALLS 0x40 /* include basic kernel calls */
30 #define RSS_VM_BASIC_CALLS 0x80 /* include basic vm calls */
32 /* Common definitions. */
33 #define RS_NR_CONTROL 8
34 #define RS_NR_PCI_DEVICE 32
35 #define RS_NR_PCI_CLASS 4
36 #define RS_MAX_LABEL_LEN 16
38 /* CPU special values */
39 #define RS_CPU_DEFAULT -1 /* use the default cpu or do not change the current one */
40 #define RS_CPU_BSP -2 /* use the bootstrap cpu */
42 /* Labels are copied over separately. */
43 struct rss_label
45 char *l_addr;
46 size_t l_len;
49 /* Arguments needed to start a new driver or server */
50 struct rs_start
52 unsigned rss_flags;
53 char *rss_cmd;
54 size_t rss_cmdlen;
55 uid_t rss_uid;
56 endpoint_t rss_sigmgr;
57 endpoint_t rss_scheduler;
58 int rss_priority;
59 int rss_quantum;
60 int rss_major;
61 int rss_dev_style;
62 long rss_period;
63 char *rss_script;
64 size_t rss_scriptlen;
65 int rss_nr_irq;
66 int rss_irq[RSS_NR_IRQ];
67 int rss_nr_io;
68 struct { unsigned base; unsigned len; } rss_io[RSS_NR_IO];
69 int rss_nr_pci_id;
70 struct { u16_t vid; u16_t did; } rss_pci_id[RS_NR_PCI_DEVICE];
71 int rss_nr_pci_class;
72 struct { u32_t pciclass; u32_t mask; } rss_pci_class[RS_NR_PCI_CLASS];
73 bitchunk_t rss_system[SYS_CALL_MASK_SIZE];
74 struct rss_label rss_label;
75 char *rss_ipc;
76 size_t rss_ipclen;
77 bitchunk_t rss_vm[VM_CALL_MASK_SIZE];
78 int rss_nr_control;
79 struct rss_label rss_control[RS_NR_CONTROL];
80 int devman_id;
82 * SMP specific data
84 * must be at the end of the structure for binary compatibility with
85 * non-smp sysytems
87 int rss_cpu;
90 /* ACL information for access to PCI devices */
91 struct rs_pci
93 char rsp_label[RS_MAX_LABEL_LEN];
94 int rsp_endpoint;
95 int rsp_nr_device;
96 struct { u16_t vid; u16_t did; } rsp_device[RS_NR_PCI_DEVICE];
97 int rsp_nr_class;
98 struct { u32_t pciclass; u32_t mask; } rsp_class[RS_NR_PCI_CLASS];
101 /* Definition of a public entry of the system process table. */
102 struct rprocpub {
103 short in_use; /* set when the entry is in use */
104 unsigned sys_flags; /* sys flags */
105 endpoint_t endpoint; /* process endpoint number */
107 int dev_flags; /* device flags */
108 dev_t dev_nr; /* major device number */
109 int dev_style; /* device style */
110 int dev_style2; /* device style for next major dev number */
112 char label[RS_MAX_LABEL_LEN]; /* label of this service */
113 char proc_name[RS_MAX_LABEL_LEN]; /* process name of this service */
115 bitchunk_t vm_call_mask[VM_CALL_MASK_SIZE]; /* vm call mask */
117 struct rs_pci pci_acl; /* pci acl */
118 int devman_id;
121 int minix_rs_lookup(const char *name, endpoint_t *value);
123 #endif