David van Moolenbroek 4924d1a9b5 RS changes:
- add new "control" config directive, to let drivers restart drivers
  (by Jorrit Herder)
- fix bug causing system processes to be started twice sometimes
2009-12-02 09:54:50 +00:00

80 lines
1.8 KiB
C

#ifndef RS_H
#define RS_H
/*
minix/rs.h
Interface to the reincarnation server
*/
#include <minix/bitmap.h>
#define RSS_NR_IRQ 16
#define RSS_NR_IO 16
#define RSS_NR_PCI_ID 32
#define RSS_NR_PCI_CLASS 4
#define RSS_NR_SYSTEM 2
#define RSS_NR_CONTROL 8
/* Labels are copied over separately. */
struct rss_label
{
char *l_addr;
size_t l_len;
};
/* Arguments needed to start a new driver or server */
struct rs_start
{
unsigned rss_flags;
char *rss_cmd;
size_t rss_cmdlen;
uid_t rss_uid;
int rss_nice;
int rss_major;
long rss_period;
char *rss_script;
size_t rss_scriptlen;
int rss_nr_irq;
int rss_irq[RSS_NR_IRQ];
int rss_nr_io;
struct { unsigned base; unsigned len; } rss_io[RSS_NR_IO];
int rss_nr_pci_id;
struct { u16_t vid; u16_t did; } rss_pci_id[RSS_NR_PCI_ID];
int rss_nr_pci_class;
struct { u32_t class; u32_t mask; } rss_pci_class[RSS_NR_PCI_CLASS];
u32_t rss_system[RSS_NR_SYSTEM];
struct rss_label rss_label;
char *rss_ipc;
size_t rss_ipclen;
#define RSS_VM_CALL_SIZE BITMAP_CHUNKS(VM_NCALLS)
bitchunk_t rss_vm[RSS_VM_CALL_SIZE];
int rss_nr_control;
struct rss_label rss_control[RSS_NR_CONTROL];
};
#define RF_COPY 0x01 /* Copy the brinary into RS to make it possible
* to restart the driver without accessing FS
*/
#define RF_IPC_VALID 0x02 /* rss_ipc and rss_ipclen are valid */
#define RF_REUSE 0x04 /* Try to reuse previously copied binary */
#define RSP_LABEL_SIZE 16
#define RSP_NR_DEVICE 32
#define RSP_NR_CLASS 4
/* ACL information for access to PCI devices */
struct rs_pci
{
char rsp_label[RSP_LABEL_SIZE]; /* Name of the driver */
int rsp_endpoint;
int rsp_nr_device;
struct { u16_t vid; u16_t did; } rsp_device[RSP_NR_DEVICE];
int rsp_nr_class;
struct { u32_t class; u32_t mask; } rsp_class[RSP_NR_CLASS];
};
_PROTOTYPE( int minix_rs_lookup, (const char *name, endpoint_t *value));
#endif