Dynamic configuration in system.conf for boot system services.
This commit is contained in:
@@ -177,8 +177,9 @@
|
||||
#define CHECK_IRQ 0x040 /* check if IRQ can be used */
|
||||
#define CHECK_MEM 0x080 /* check if (VM) mem map request is allowed */
|
||||
#define ROOT_SYS_PROC 0x100 /* this is a root system process instance */
|
||||
#define LU_SYS_PROC 0x200 /* this is a live updated sys proc instance */
|
||||
#define RST_SYS_PROC 0x400 /* this is a restarted sys proc instance */
|
||||
#define VM_SYS_PROC 0x200 /* this is a vm system process instance */
|
||||
#define LU_SYS_PROC 0x400 /* this is a live updated sys proc instance */
|
||||
#define RST_SYS_PROC 0x800 /* this is a restarted sys proc instance */
|
||||
|
||||
/* Bits for device driver flags managed by RS and VFS. */
|
||||
#define DRV_FORCED 0x01 /* driver is mapped even if not alive yet */
|
||||
|
||||
@@ -6,6 +6,74 @@
|
||||
#include <minix/com.h>
|
||||
#include <minix/config.h>
|
||||
|
||||
/* Static privilege id definitions. */
|
||||
#define NR_STATIC_PRIV_IDS NR_BOOT_PROCS
|
||||
#define is_static_priv_id(id) (id >= 0 && id < NR_STATIC_PRIV_IDS)
|
||||
#define static_priv_id(n) (NR_TASKS + (n))
|
||||
|
||||
/* Unprivileged user processes all share the privilege structure of the
|
||||
* user processesess.
|
||||
* This id must be fixed because it is used to check send mask entries.
|
||||
*/
|
||||
#define USER_PRIV_ID static_priv_id(ROOT_USR_PROC_NR)
|
||||
/* Specifies a null privilege id.
|
||||
*/
|
||||
#define NULL_PRIV_ID (-1)
|
||||
|
||||
/* Allowed calls. */
|
||||
#define NO_C (-1) /* no calls allowed */
|
||||
#define ALL_C (-2) /* all calls allowed */
|
||||
#define NULL_C (-3) /* null call entry */
|
||||
|
||||
/*
|
||||
* Default privilege settings used in the system
|
||||
*/
|
||||
/* privilege flags */
|
||||
#define IDL_F (SYS_PROC | BILLABLE) /* idle task is not preemptible as we
|
||||
* don't want it to interfere with the
|
||||
* timer tick interrupt handler code.
|
||||
* Unlike other processes idle task is
|
||||
* handled in a special way and is
|
||||
* preempted always if timer tick occurs
|
||||
* and there is another runnable process
|
||||
*/
|
||||
#define TSK_F (SYS_PROC) /* other kernel tasks */
|
||||
#define SRV_F (SYS_PROC | PREEMPTIBLE) /* system services */
|
||||
#define DSRV_F (SRV_F | DYN_PRIV_ID) /* dynamic system services */
|
||||
#define RSYS_F (SRV_F | ROOT_SYS_PROC) /* root sys proc */
|
||||
#define VM_F (SYS_PROC | VM_SYS_PROC) /* vm */
|
||||
#define USR_F (BILLABLE | PREEMPTIBLE) /* user processes */
|
||||
#define IMM_F (ROOT_SYS_PROC | VM_SYS_PROC | PREEMPTIBLE) /* immutable */
|
||||
|
||||
/* allowed traps */
|
||||
#define CSK_T (1 << RECEIVE) /* clock and system */
|
||||
#define TSK_T 0 /* other kernel tasks */
|
||||
#define SRV_T (~0) /* system services */
|
||||
#define DSRV_T (~0) /* dynamic system services */
|
||||
#define USR_T (1 << SENDREC) /* user processes */
|
||||
|
||||
/* allowed targets */
|
||||
#define TSK_M 0 /* all kernel tasks */
|
||||
#define SRV_M (~0) /* system services */
|
||||
#define DSRV_M (~0) /* dynamic system services */
|
||||
#define USR_M (~0) /* user processes */
|
||||
|
||||
/* allowed kernel calls */
|
||||
#define TSK_KC NO_C /* all kernel tasks */
|
||||
#define SRV_KC ALL_C /* dynamic system services */
|
||||
#define DSRV_KC ALL_C /* default sys proc */
|
||||
#define USR_KC NO_C /* user processes */
|
||||
|
||||
/* allowed vm calls */
|
||||
#define SRV_VC ALL_C /* dynamic system services */
|
||||
#define DSRV_VC ALL_C /* default sys proc */
|
||||
#define USR_VC ALL_C /* user processes */
|
||||
|
||||
/* signal manager */
|
||||
#define SRV_SM ROOT_SYS_PROC_NR /* system services */
|
||||
#define DSRV_SM ROOT_SYS_PROC_NR /* dynamic system services */
|
||||
#define USR_SM PM_PROC_NR /* user processes */
|
||||
|
||||
/* scheduler */
|
||||
#define SRV_SCH KERNEL /* system services */
|
||||
#define DSRV_SCH SCHED_PROC_NR /* dynamic system services */
|
||||
|
||||
@@ -13,14 +13,19 @@ Interface to the reincarnation server
|
||||
/* RSS definitions. */
|
||||
#define RSS_NR_IRQ 16
|
||||
#define RSS_NR_IO 16
|
||||
#define RSS_IRQ_ALL (RSS_NR_IRQ+1)
|
||||
#define RSS_IO_ALL (RSS_NR_IO+1)
|
||||
#define RSS_IPC_ALL "IPC_ALL"
|
||||
#define RSS_IPC_ALL_SYS "IPC_ALL_SYS"
|
||||
|
||||
/* RSS flags. */
|
||||
#define RSS_COPY 0x01 /* keep an in-memory copy of the binary */
|
||||
#define RSS_IPC_VALID 0x02 /* rss_ipc and rss_ipclen are valid */
|
||||
#define RSS_REUSE 0x04 /* Try to reuse previously copied binary */
|
||||
#define RSS_NOBLOCK 0x08 /* unblock caller immediately */
|
||||
#define RSS_REPLICA 0x10 /* keep a replica of the service */
|
||||
#define RSS_SELF_LU 0x20 /* perform self update */
|
||||
#define RSS_SYS_BASIC_CALLS 0x40 /* include basic kernel calls */
|
||||
#define RSS_VM_BASIC_CALLS 0x80 /* include basic vm calls */
|
||||
|
||||
/* Common definitions. */
|
||||
#define RS_NR_CONTROL 8
|
||||
@@ -42,7 +47,10 @@ struct rs_start
|
||||
char *rss_cmd;
|
||||
size_t rss_cmdlen;
|
||||
uid_t rss_uid;
|
||||
int rss_nice; /* use rss_nice_encode and _decode */
|
||||
endpoint_t rss_sigmgr;
|
||||
endpoint_t rss_scheduler;
|
||||
unsigned rss_priority;
|
||||
unsigned rss_quantum;
|
||||
int rss_major;
|
||||
int rss_dev_style;
|
||||
long rss_period;
|
||||
@@ -96,9 +104,5 @@ struct rprocpub {
|
||||
};
|
||||
|
||||
_PROTOTYPE( int minix_rs_lookup, (const char *name, endpoint_t *value));
|
||||
_PROTOTYPE(int rss_nice_encode, (int *nice, endpoint_t scheduler,
|
||||
unsigned priority, unsigned quantum));
|
||||
_PROTOTYPE(int rss_nice_decode, (int nice, endpoint_t *scheduler,
|
||||
unsigned *priority, unsigned *quantum));
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user