From: Ben Gras Date: Mon, 8 Aug 2005 12:18:45 +0000 (+0000) Subject: . Allow drivers to to physcopy() (table.c) X-Git-Tag: v3.1.0~404 X-Git-Url: http://zhaoyanbai.com/repos/doc/html/static/gitweb.css?a=commitdiff_plain;h=b293e689a9d97396731d24f3f7816d38ed547bd0;p=minix.git . Allow drivers to to physcopy() (table.c) . Also allow receive() to be done from kernel processes, not just sendrec(). This is because receive()s can't harm the kernel processes, but are done from the CLOCK task (without sendrec()). --- diff --git a/kernel/proc.c b/kernel/proc.c index 0ac064492..8fab71827 100755 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -112,9 +112,10 @@ message *m_ptr; /* pointer to message in the caller's space */ * if the caller doesn't do receive(). */ if (! (priv(caller_ptr)->s_trap_mask & (1 << function)) || - (iskerneln(src_dst) && function != SENDREC)) { - kprintf("sys_call: trap not allowed, function %d, caller %d\n", - function, proc_nr(caller_ptr)); + (iskerneln(src_dst) && function != SENDREC && function != RECEIVE)) { + kprintf("sys_call: trap not allowed, function %d, caller %d, mask %x, src_dst %d\n", + function, proc_nr(caller_ptr), + priv(caller_ptr)->s_trap_mask, src_dst); return(ECALLDENIED); /* call denied by trap mask */ } diff --git a/kernel/table.c b/kernel/table.c index 93082917f..0b474c30c 100755 --- a/kernel/table.c +++ b/kernel/table.c @@ -83,7 +83,7 @@ PUBLIC char *t_stack[TOT_STACK_SPACE / sizeof(char *)]; #define FS_C (c(SYS_KILL) | c(SYS_VIRCOPY) | c(SYS_VIRVCOPY) | c(SYS_UMAP) \ | c(SYS_GETINFO) | c(SYS_EXIT) | c(SYS_TIMES) | c(SYS_SETALARM)) #define DRV_C (FS_C | c(SYS_SEGCTL) | c(SYS_IRQCTL) | c(SYS_INT86) \ - | c(SYS_DEVIO) | c(SYS_VDEVIO) | c(SYS_SDEVIO)) + | c(SYS_DEVIO) | c(SYS_VDEVIO) | c(SYS_SDEVIO) | c(SYS_PHYSCOPY) | c(SYS_PHYSVCOPY)) /* The system image table lists all programs that are part of the boot image. * The order of the entries here MUST agree with the order of the programs