From 2c685f34e034c9c52764068c07c7d99be02b1ec1 Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Fri, 13 Jan 2012 00:23:04 +0100 Subject: [PATCH] Cut PM out of the adddma/deldma/getdma call path --- common/include/minix/callnr.h | 10 --- common/include/minix/com.h | 3 - common/include/minix/vm.h | 12 +-- drivers/amddev/amddev.c | 15 ++-- etc/system.conf | 8 +- include/unistd.h | 7 -- lib/libc/other/Makefile.inc | 4 - lib/libc/other/_adddma.c | 21 ----- lib/libc/other/_deldma.c | 21 ----- lib/libc/other/_getdma.c | 25 ------ lib/libc/other/_vm_dmacalls.c | 62 ------------- lib/libc/syscall/Makefile.inc | 4 - lib/libc/syscall/adddma.S | 6 -- lib/libc/syscall/deldma.S | 6 -- lib/libc/syscall/getdma.S | 6 -- lib/libc/syscall/vm_dmacalls.S | 14 --- lib/libsys/Makefile | 1 + lib/{nbsd_libminlib => libsys}/vm_dmacalls.c | 13 +-- lib/nbsd_libminlib/Makefile | 6 +- lib/nbsd_libminlib/adddma.c | 20 ----- lib/nbsd_libminlib/deldma.c | 20 ----- lib/nbsd_libminlib/getdma.c | 24 ----- nbsd_include/unistd.h | 3 - servers/avfs/table.c | 6 +- servers/pm/Makefile | 2 +- servers/pm/dma.c | 92 -------------------- servers/pm/proto.h | 5 -- servers/pm/table.c | 6 +- servers/vfs/table.c | 6 +- servers/vm/alloc.c | 6 +- 30 files changed, 36 insertions(+), 398 deletions(-) delete mode 100644 lib/libc/other/_adddma.c delete mode 100644 lib/libc/other/_deldma.c delete mode 100644 lib/libc/other/_getdma.c delete mode 100644 lib/libc/other/_vm_dmacalls.c delete mode 100644 lib/libc/syscall/adddma.S delete mode 100644 lib/libc/syscall/deldma.S delete mode 100644 lib/libc/syscall/getdma.S delete mode 100644 lib/libc/syscall/vm_dmacalls.S rename lib/{nbsd_libminlib => libsys}/vm_dmacalls.c (70%) delete mode 100644 lib/nbsd_libminlib/adddma.c delete mode 100644 lib/nbsd_libminlib/deldma.c delete mode 100644 lib/nbsd_libminlib/getdma.c delete mode 100644 servers/pm/dma.c diff --git a/common/include/minix/callnr.h b/common/include/minix/callnr.h index 70d1b2203..2fec5d1d4 100644 --- a/common/include/minix/callnr.h +++ b/common/include/minix/callnr.h @@ -101,16 +101,6 @@ #define GETPROCNR 104 /* to PM */ #define ISSETUGID 106 /* to PM: ask if process is tainted */ #define GETEPINFO_O 107 /* to PM: get pid/uid/gid of an endpoint */ -#define ADDDMA 108 /* to PM: inform PM about a region of memory - * that is used for bus-master DMA - */ -#define DELDMA 109 /* to PM: inform PM that a region of memory - * that is no longer used for bus-master DMA - */ -#define GETDMA 110 /* to PM: ask PM for a region of memory - * that should not be used for bus-master DMA - * any longer - */ #define SRV_KILL 111 /* to PM: special kill call for RS */ #define GCOV_FLUSH 112 /* flush gcov data from server to gcov files */ diff --git a/common/include/minix/com.h b/common/include/minix/com.h index 7047ff6d0..1278c6018 100644 --- a/common/include/minix/com.h +++ b/common/include/minix/com.h @@ -929,7 +929,6 @@ * bus-master DMA */ #define VM_ADDDMA (VM_RQ_BASE+12) -# define VMAD_REQ m2_i2 # define VMAD_EP m2_i1 # define VMAD_START m2_l1 # define VMAD_SIZE m2_l2 @@ -938,7 +937,6 @@ * used for bus-master DMA */ #define VM_DELDMA (VM_RQ_BASE+13) -# define VMDD_REQ m2_i2 # define VMDD_EP m2_i1 # define VMDD_START m2_l1 # define VMDD_SIZE m2_l2 @@ -947,7 +945,6 @@ * be used for bus-master DMA any longer */ #define VM_GETDMA (VM_RQ_BASE+14) -# define VMGD_REQ m2_i2 # define VMGD_PROCP m2_i1 # define VMGD_BASEP m2_l1 # define VMGD_SIZEP m2_l2 diff --git a/common/include/minix/vm.h b/common/include/minix/vm.h index 6ce0d5c7e..c2d639da7 100644 --- a/common/include/minix/vm.h +++ b/common/include/minix/vm.h @@ -13,12 +13,12 @@ _PROTOTYPE( int vm_exec_newmem, (endpoint_t ep, struct exec_newmem *args, int args_bytes, char **ret_stack_top, int *ret_flags)); _PROTOTYPE( int vm_push_sig, (endpoint_t ep, vir_bytes *old_sp)); _PROTOTYPE( int vm_willexit, (endpoint_t ep)); -_PROTOTYPE( int vm_adddma, (endpoint_t req_e, endpoint_t proc_e, - phys_bytes start, phys_bytes size) ); -_PROTOTYPE( int vm_deldma, (endpoint_t req_e, endpoint_t proc_e, - phys_bytes start, phys_bytes size) ); -_PROTOTYPE( int vm_getdma, (endpoint_t req_e, endpoint_t *procp, - phys_bytes *basep, phys_bytes *sizep) ); +_PROTOTYPE( int vm_adddma, (endpoint_t proc_e, phys_bytes start, + phys_bytes size)); +_PROTOTYPE( int vm_deldma, (endpoint_t proc_e, phys_bytes start, + phys_bytes size)); +_PROTOTYPE( int vm_getdma, (endpoint_t *procp, phys_bytes *basep, + phys_bytes *sizep)); _PROTOTYPE( void *vm_map_phys, (endpoint_t who, void *physaddr, size_t len)); _PROTOTYPE( int vm_unmap_phys, (endpoint_t who, void *vaddr, size_t len)); diff --git a/drivers/amddev/amddev.c b/drivers/amddev/amddev.c index 30fb4b7fe..b76053b12 100644 --- a/drivers/amddev/amddev.c +++ b/drivers/amddev/amddev.c @@ -168,13 +168,13 @@ PRIVATE void sef_cb_signal_handler(int signo) for (;;) { - r= getdma(&proc_e, &base, &size); + r= vm_getdma(&proc_e, &base, &size); if (r == -1) { if (errno != -EAGAIN) { printf( - "amddev: getdma failed: %d\n", + "amddev: vm_getdma failed: %d\n", errno); } break; @@ -184,10 +184,10 @@ PRIVATE void sef_cb_signal_handler(int signo) "amddev: deleting 0x%lx@0x%lx for proc %d\n", size, base, proc_e); del_range(base, size); - r= deldma(proc_e, base, size); + r= vm_deldma(proc_e, base, size); if (r == -1) { - printf("amddev: deldma failed: %d\n", + printf("amddev: vm_deldma failed: %d\n", errno); break; } @@ -411,13 +411,12 @@ static int do_add4pci(const message *m) return r; } - r= adddma(proc, start, size); + r= vm_adddma(proc, start, size); if (r != 0) { r= -errno; - printf( - "amddev`do_add4pci: adddma failed for 0x%x@0x%lx, proc %d: %d\n", - size, start, proc, r); + printf("amddev`do_add4pci: vm_adddma failed for 0x%x@0x%lx, " + "proc %d: %d\n", size, start, proc, r); return r; } diff --git a/etc/system.conf b/etc/system.conf index e9ebbf49a..efa65b714 100644 --- a/etc/system.conf +++ b/etc/system.conf @@ -60,9 +60,6 @@ service pm EXEC_NEWMEM # 03 PUSH_SIG # 04 WILLEXIT # 05 - ADDDMA # 12 - DELDMA # 13 - GETDMA # 14 NOTIFY_SIG # 39 ; io NONE; # No I/O range allowed @@ -470,6 +467,11 @@ service amddev system UMAP_REMOTE # 17 ; + vm + ADDDMA # 12 + DELDMA # 13 + GETDMA # 14 + ; uid 0; }; diff --git a/include/unistd.h b/include/unistd.h index 53f59b079..1d1cdc812 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -190,13 +190,6 @@ _PROTOTYPE( int getpprocnr, (void) ); _PROTOTYPE( int _pm_findproc, (char *proc_name, int *proc_nr) ); _PROTOTYPE( int mapdriver, (char *label, int major, int style, int flags) ); -_PROTOTYPE(int adddma, (endpoint_t proc_e, - phys_bytes start, phys_bytes size) ); -_PROTOTYPE(int deldma, (endpoint_t proc_e, - phys_bytes start, phys_bytes size) ); -_PROTOTYPE(int getdma, (endpoint_t *procp, phys_bytes *basep, - phys_bytes *sizep) ); - _PROTOTYPE( pid_t getnpid, (endpoint_t proc_ep) ); _PROTOTYPE( uid_t getnuid, (endpoint_t proc_ep) ); _PROTOTYPE( gid_t getngid, (endpoint_t proc_ep) ); diff --git a/lib/libc/other/Makefile.inc b/lib/libc/other/Makefile.inc index 199b78455..6b9d1c7d3 100644 --- a/lib/libc/other/Makefile.inc +++ b/lib/libc/other/Makefile.inc @@ -6,12 +6,9 @@ CPPFLAGS.fsversion.c+=-I${.CURDIR}/../../servers SRCS+= \ __pm_findproc.c \ - _adddma.c \ _brk.c \ _cprofile.c \ - _deldma.c \ _getdents.c \ - _getdma.c \ _getnpid.c \ _getnucred.c \ _getnuid.c \ @@ -30,7 +27,6 @@ SRCS+= \ _sprofile.c \ _svrctl.c \ _sysuname.c \ - _vm_dmacalls.c \ _vm_memctl.c \ _vm_set_priv.c \ _vm_update.c \ diff --git a/lib/libc/other/_adddma.c b/lib/libc/other/_adddma.c deleted file mode 100644 index 651883e81..000000000 --- a/lib/libc/other/_adddma.c +++ /dev/null @@ -1,21 +0,0 @@ -/* adddma.c - */ - -#include -#define adddma _adddma -#include -#include - -int adddma(proc_e, start, size) -endpoint_t proc_e; -phys_bytes start; -phys_bytes size; -{ - message m; - - m.m2_i1= proc_e; - m.m2_l1= start; - m.m2_l2= size; - - return _syscall(PM_PROC_NR, ADDDMA, &m); -} diff --git a/lib/libc/other/_deldma.c b/lib/libc/other/_deldma.c deleted file mode 100644 index c5eceab86..000000000 --- a/lib/libc/other/_deldma.c +++ /dev/null @@ -1,21 +0,0 @@ -/* deldma.c - */ - -#include -#define deldma _deldma -#include -#include - -int deldma(proc_e, start, size) -endpoint_t proc_e; -phys_bytes start; -phys_bytes size; -{ - message m; - - m.m2_i1= proc_e; - m.m2_l1= start; - m.m2_l2= size; - - return _syscall(PM_PROC_NR, DELDMA, &m); -} diff --git a/lib/libc/other/_getdma.c b/lib/libc/other/_getdma.c deleted file mode 100644 index b0302fe2c..000000000 --- a/lib/libc/other/_getdma.c +++ /dev/null @@ -1,25 +0,0 @@ -/* getdma.c - */ - -#include -#define getdma _getdma -#include -#include - -int getdma(procp, basep, sizep) -endpoint_t *procp; -phys_bytes *basep; -phys_bytes *sizep; -{ - int r; - message m; - - r= _syscall(PM_PROC_NR, GETDMA, &m); - if (r == 0) - { - *procp= m.m2_i1; - *basep= m.m2_l1; - *sizep= m.m2_l2; - } - return r; -} diff --git a/lib/libc/other/_vm_dmacalls.c b/lib/libc/other/_vm_dmacalls.c deleted file mode 100644 index 17234088b..000000000 --- a/lib/libc/other/_vm_dmacalls.c +++ /dev/null @@ -1,62 +0,0 @@ - -#include -#define vm_adddma _vm_adddma -#define vm_deldma _vm_deldma -#define vm_getdma _vm_getdma -#include -#include -#include - -int vm_adddma(req_proc_e, proc_e, start, size) -endpoint_t req_proc_e; -endpoint_t proc_e; -phys_bytes start; -phys_bytes size; -{ - message m; - - m.VMAD_REQ= req_proc_e; - m.VMAD_EP= proc_e; - m.VMAD_START= start; - m.VMAD_SIZE= size; - - return _syscall(VM_PROC_NR, VM_ADDDMA, &m); -} - -int vm_deldma(req_proc_e, proc_e, start, size) -endpoint_t req_proc_e; -endpoint_t proc_e; -phys_bytes start; -phys_bytes size; -{ - message m; - - m.VMDD_REQ= proc_e; - m.VMDD_EP= proc_e; - m.VMDD_START= start; - m.VMDD_SIZE= size; - - return _syscall(VM_PROC_NR, VM_DELDMA, &m); -} - -int vm_getdma(req_proc_e, procp, basep, sizep) -endpoint_t req_proc_e; -endpoint_t *procp; -phys_bytes *basep; -phys_bytes *sizep; -{ - int r; - message m; - - m.VMGD_REQ = req_proc_e; - - r= _syscall(VM_PROC_NR, VM_GETDMA, &m); - if (r == 0) - { - *procp= m.VMGD_PROCP; - *basep= m.VMGD_BASEP; - *sizep= m.VMGD_SIZEP; - } - return r; -} - diff --git a/lib/libc/syscall/Makefile.inc b/lib/libc/syscall/Makefile.inc index 3852d1e5a..48782adf3 100644 --- a/lib/libc/syscall/Makefile.inc +++ b/lib/libc/syscall/Makefile.inc @@ -5,7 +5,6 @@ SRCS+= \ _exit.S \ _pm_findproc.S \ access.S \ - adddma.S \ alarm.S \ brk.S \ cfgetispeed.S \ @@ -20,7 +19,6 @@ SRCS+= \ closedir.S \ cprofile.S \ creat.S \ - deldma.S \ dup.S \ dup2.S \ execl.S \ @@ -39,7 +37,6 @@ SRCS+= \ fstatvfs.S \ getcwd.S \ getdents.S \ - getdma.S \ getegid.S \ geteuid.S \ getgid.S \ @@ -134,7 +131,6 @@ SRCS+= \ uname.S \ unlink.S \ utime.S \ - vm_dmacalls.S \ wait.S \ waitpid.S \ write.S diff --git a/lib/libc/syscall/adddma.S b/lib/libc/syscall/adddma.S deleted file mode 100644 index 37af0c957..000000000 --- a/lib/libc/syscall/adddma.S +++ /dev/null @@ -1,6 +0,0 @@ -#include - -IMPORT(_adddma) -ENTRY(adddma) - jmp _C_LABEL(_adddma) - diff --git a/lib/libc/syscall/deldma.S b/lib/libc/syscall/deldma.S deleted file mode 100644 index 98a452e0c..000000000 --- a/lib/libc/syscall/deldma.S +++ /dev/null @@ -1,6 +0,0 @@ -#include - -IMPORT(_deldma) -ENTRY(deldma) - jmp _C_LABEL(_deldma) - diff --git a/lib/libc/syscall/getdma.S b/lib/libc/syscall/getdma.S deleted file mode 100644 index 2439a5b2a..000000000 --- a/lib/libc/syscall/getdma.S +++ /dev/null @@ -1,6 +0,0 @@ -#include - -IMPORT(_getdma) -ENTRY(getdma) - jmp _C_LABEL(_getdma) - diff --git a/lib/libc/syscall/vm_dmacalls.S b/lib/libc/syscall/vm_dmacalls.S deleted file mode 100644 index fa3635cb0..000000000 --- a/lib/libc/syscall/vm_dmacalls.S +++ /dev/null @@ -1,14 +0,0 @@ -#include - -IMPORT(_vm_adddma) -ENTRY(vm_adddma) - jmp _C_LABEL(_vm_adddma) - -IMPORT(_vm_deldma) -ENTRY(vm_deldma) - jmp _C_LABEL(_vm_deldma) - -IMPORT(_vm_getdma) -ENTRY(vm_getdma) - jmp _C_LABEL(_vm_getdma) - diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile index 183359f7e..ea12a1741 100644 --- a/lib/libsys/Makefile +++ b/lib/libsys/Makefile @@ -116,6 +116,7 @@ SRCS= \ timing.c \ tsc_util.c \ vm_brk.c \ + vm_dmacalls.c \ vm_exec_newmem.c \ vm_exit.c \ vm_fork.c \ diff --git a/lib/nbsd_libminlib/vm_dmacalls.c b/lib/libsys/vm_dmacalls.c similarity index 70% rename from lib/nbsd_libminlib/vm_dmacalls.c rename to lib/libsys/vm_dmacalls.c index cc3dd5e69..bd7bf2dc3 100644 --- a/lib/nbsd_libminlib/vm_dmacalls.c +++ b/lib/libsys/vm_dmacalls.c @@ -4,15 +4,13 @@ #include #include -int vm_adddma(req_proc_e, proc_e, start, size) -endpoint_t req_proc_e; +int vm_adddma(proc_e, start, size) endpoint_t proc_e; phys_bytes start; phys_bytes size; { message m; - m.VMAD_REQ= req_proc_e; m.VMAD_EP= proc_e; m.VMAD_START= start; m.VMAD_SIZE= size; @@ -20,15 +18,13 @@ phys_bytes size; return _syscall(VM_PROC_NR, VM_ADDDMA, &m); } -int vm_deldma(req_proc_e, proc_e, start, size) -endpoint_t req_proc_e; +int vm_deldma(proc_e, start, size) endpoint_t proc_e; phys_bytes start; phys_bytes size; { message m; - m.VMDD_REQ= proc_e; m.VMDD_EP= proc_e; m.VMDD_START= start; m.VMDD_SIZE= size; @@ -36,8 +32,7 @@ phys_bytes size; return _syscall(VM_PROC_NR, VM_DELDMA, &m); } -int vm_getdma(req_proc_e, procp, basep, sizep) -endpoint_t req_proc_e; +int vm_getdma(procp, basep, sizep) endpoint_t *procp; phys_bytes *basep; phys_bytes *sizep; @@ -45,8 +40,6 @@ phys_bytes *sizep; int r; message m; - m.VMGD_REQ = req_proc_e; - r= _syscall(VM_PROC_NR, VM_GETDMA, &m); if (r == 0) { diff --git a/lib/nbsd_libminlib/Makefile b/lib/nbsd_libminlib/Makefile index 12bbfc39c..e4b7fdeef 100644 --- a/lib/nbsd_libminlib/Makefile +++ b/lib/nbsd_libminlib/Makefile @@ -26,10 +26,8 @@ SRCS+= servxcheck.c SRCS+= paramvalue.c # Minix servers/drivers syscall. -SRCS+= adddma.c getdma.c deldma.c getngid.c getnpid.c \ - getnprocnr.c getnucred.c getnuid.c getprocnr.c \ - mapdriver.c vm_dmacalls.c vm_memctl.c \ - vm_set_priv.c vm_query_exit.c vm_update.c +SRCS+= getngid.c getnpid.c getnprocnr.c getnucred.c getnuid.c getprocnr.c \ + mapdriver.c vm_memctl.c vm_set_priv.c vm_query_exit.c vm_update.c INCS+= tools.h diff --git a/lib/nbsd_libminlib/adddma.c b/lib/nbsd_libminlib/adddma.c deleted file mode 100644 index 3652626ec..000000000 --- a/lib/nbsd_libminlib/adddma.c +++ /dev/null @@ -1,20 +0,0 @@ -/* adddma.c - */ - -#include -#include -#include - -int adddma(proc_e, start, size) -endpoint_t proc_e; -phys_bytes start; -phys_bytes size; -{ - message m; - - m.m2_i1= proc_e; - m.m2_l1= start; - m.m2_l2= size; - - return _syscall(PM_PROC_NR, ADDDMA, &m); -} diff --git a/lib/nbsd_libminlib/deldma.c b/lib/nbsd_libminlib/deldma.c deleted file mode 100644 index 32301b46a..000000000 --- a/lib/nbsd_libminlib/deldma.c +++ /dev/null @@ -1,20 +0,0 @@ -/* deldma.c - */ - -#include -#include -#include - -int deldma(proc_e, start, size) -endpoint_t proc_e; -phys_bytes start; -phys_bytes size; -{ - message m; - - m.m2_i1= proc_e; - m.m2_l1= start; - m.m2_l2= size; - - return _syscall(PM_PROC_NR, DELDMA, &m); -} diff --git a/lib/nbsd_libminlib/getdma.c b/lib/nbsd_libminlib/getdma.c deleted file mode 100644 index 6588babf8..000000000 --- a/lib/nbsd_libminlib/getdma.c +++ /dev/null @@ -1,24 +0,0 @@ -/* getdma.c - */ - -#include -#include -#include - -int getdma(procp, basep, sizep) -endpoint_t *procp; -phys_bytes *basep; -phys_bytes *sizep; -{ - int r; - message m; - - r= _syscall(PM_PROC_NR, GETDMA, &m); - if (r == 0) - { - *procp= m.m2_i1; - *basep= m.m2_l1; - *sizep= m.m2_l2; - } - return r; -} diff --git a/nbsd_include/unistd.h b/nbsd_include/unistd.h index 0f16daa73..505f9ac23 100644 --- a/nbsd_include/unistd.h +++ b/nbsd_include/unistd.h @@ -315,9 +315,6 @@ int getnprocnr(pid_t pid); int getpprocnr(void); int _pm_findproc(char *proc_name, int *proc_nr); int mapdriver(char *label, int major, int style, int flags); -int adddma(endpoint_t proc_e, phys_bytes start, phys_bytes size); -int deldma(endpoint_t proc_e, phys_bytes start, phys_bytes size); -int getdma(endpoint_t *procp, phys_bytes *basep, phys_bytes *sizep); pid_t getnpid(endpoint_t proc_ep); uid_t getnuid(endpoint_t proc_ep); gid_t getngid(endpoint_t proc_ep); diff --git a/servers/avfs/table.c b/servers/avfs/table.c index 335c71546..67cd27089 100644 --- a/servers/avfs/table.c +++ b/servers/avfs/table.c @@ -123,9 +123,9 @@ PUBLIC _PROTOTYPE (int (*call_vec[]), (void) ) = { no_sys, /* 105 = unused */ no_sys, /* 106 = unused */ no_sys, /* 107 = (getepinfo) */ - no_sys, /* 108 = (adddma) */ - no_sys, /* 109 = (deldma) */ - no_sys, /* 110 = (getdma) */ + no_sys, /* 108 = unused */ + no_sys, /* 109 = unused */ + no_sys, /* 110 = unused */ no_sys, /* 111 = (srv_kill) */ do_gcov_flush, /* 112 = gcov_flush */ no_sys, /* 113 = (getsid) */ diff --git a/servers/pm/Makefile b/servers/pm/Makefile index ca9b16d38..d4ac76906 100644 --- a/servers/pm/Makefile +++ b/servers/pm/Makefile @@ -4,7 +4,7 @@ PROG= pm SRCS= main.c forkexit.c break.c exec.c time.c alarm.c \ signal.c utility.c table.c getset.c misc.c \ - profile.c dma.c schedule.c + profile.c schedule.c .if ${USE_MCONTEXT} != "no" SRCS+= mcontext.c diff --git a/servers/pm/dma.c b/servers/pm/dma.c deleted file mode 100644 index 476006431..000000000 --- a/servers/pm/dma.c +++ /dev/null @@ -1,92 +0,0 @@ - -#include "pm.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "mproc.h" - -/*===========================================================================* - * do_adddma * - *===========================================================================*/ -PUBLIC int do_adddma() -{ - endpoint_t req_proc_e, target_proc_e; - int proc_n, r; - phys_bytes base, size; - - if (mp->mp_effuid != SUPER_USER) - return EPERM; - - req_proc_e= m_in.m_source; - target_proc_e= m_in.m2_i1; - base= m_in.m2_l1; - size= m_in.m2_l2; - - if((r = vm_adddma(req_proc_e, target_proc_e, base, size)) != OK) { - printf("pm:do_adddma: vm_adddma failed (%d)\n", r); - return r; - } - - /* Find target process */ - if (pm_isokendpt(target_proc_e, &proc_n) != OK) - { - printf("pm:do_adddma: endpoint %d not found\n", target_proc_e); - return EINVAL; - } - - return OK; -} - -/*===========================================================================* - * do_deldma * - *===========================================================================*/ -PUBLIC int do_deldma() -{ - endpoint_t req_proc_e, target_proc_e; - phys_bytes base, size; - - if (mp->mp_effuid != SUPER_USER) - return EPERM; - - req_proc_e= m_in.m_source; - target_proc_e= m_in.m2_i1; - base= m_in.m2_l1; - size= m_in.m2_l2; - - return vm_deldma(req_proc_e, target_proc_e, base, size); -} - -/*===========================================================================* - * do_getdma * - *===========================================================================*/ -PUBLIC int do_getdma() -{ - endpoint_t req_proc_e, proc; - int r; - phys_bytes base, size; - - if (mp->mp_effuid != SUPER_USER) - return EPERM; - - req_proc_e= m_in.m_source; - - if((r=vm_getdma(req_proc_e, &proc, &base, &size)) != OK) - return r; - - printf("pm:do_getdma: setting reply to 0x%lx@0x%lx proc %d\n", - size, base, proc); - - mp->mp_reply.m2_i1= proc; - mp->mp_reply.m2_l1= base; - mp->mp_reply.m2_l2= size; - - return OK; -} - diff --git a/servers/pm/proto.h b/servers/pm/proto.h index f4c7647d1..ea16cd029 100644 --- a/servers/pm/proto.h +++ b/servers/pm/proto.h @@ -16,11 +16,6 @@ _PROTOTYPE( void check_vtimer, (int proc_nr, int sig) ); /* break.c */ _PROTOTYPE( int do_brk, (void) ); -/* dma.c */ -_PROTOTYPE( int do_adddma, (void) ); -_PROTOTYPE( int do_deldma, (void) ); -_PROTOTYPE( int do_getdma, (void) ); - /* exec.c */ _PROTOTYPE( int do_exec, (void) ); _PROTOTYPE( int do_exec_newmem, (void) ); diff --git a/servers/pm/table.c b/servers/pm/table.c index bb41df2ca..5df101508 100644 --- a/servers/pm/table.c +++ b/servers/pm/table.c @@ -119,9 +119,9 @@ _PROTOTYPE (int (*call_vec[]), (void) ) = { no_sys, /* 105 = unused */ do_get, /* 106 = issetugid */ do_getepinfo_o, /* 107 = getepinfo XXX: old implementation*/ - do_adddma, /* 108 = adddma */ - do_deldma, /* 109 = deldma */ - do_getdma, /* 110 = getdma */ + no_sys, /* 108 = unused */ + no_sys, /* 109 = unused */ + no_sys, /* 110 = unused */ do_srv_kill, /* 111 = srv_kill */ no_sys, /* 112 = gcov_flush */ do_get, /* 113 = getsid */ diff --git a/servers/vfs/table.c b/servers/vfs/table.c index e47e7111f..629d6501f 100644 --- a/servers/vfs/table.c +++ b/servers/vfs/table.c @@ -123,9 +123,9 @@ PUBLIC _PROTOTYPE (int (*call_vec[]), (void) ) = { no_sys, /* 105 = unused */ no_sys, /* 106 = unused */ no_sys, /* 107 = (getepinfo) */ - no_sys, /* 108 = (adddma) */ - no_sys, /* 109 = (deldma) */ - no_sys, /* 110 = (getdma) */ + no_sys, /* 108 = unused */ + no_sys, /* 109 = unused */ + no_sys, /* 110 = unused */ no_sys, /* 111 = (srv_kill) */ do_gcov_flush, /* 112 = gcov_flush */ no_sys, /* 113 = (getsid) */ diff --git a/servers/vm/alloc.c b/servers/vm/alloc.c index 2aa5f4972..570a389d9 100644 --- a/servers/vm/alloc.c +++ b/servers/vm/alloc.c @@ -622,12 +622,11 @@ PRIVATE struct dmatab *===========================================================================*/ PUBLIC int do_adddma(message *msg) { - endpoint_t req_proc_e, target_proc_e; + endpoint_t target_proc_e; int i, proc_n; phys_bytes base, size; struct vmproc *vmp; - req_proc_e= msg->VMAD_REQ; target_proc_e= msg->VMAD_EP; base= msg->VMAD_START; size= msg->VMAD_SIZE; @@ -675,11 +674,10 @@ PUBLIC int do_adddma(message *msg) *===========================================================================*/ PUBLIC int do_deldma(message *msg) { - endpoint_t req_proc_e, target_proc_e; + endpoint_t target_proc_e; int i, j; phys_bytes base, size; - req_proc_e= msg->VMDD_REQ; target_proc_e= msg->VMDD_EP; base= msg->VMDD_START; size= msg->VMDD_SIZE; -- 2.44.0