Cut PM out of the adddma/deldma/getdma call path

This commit is contained in:
David van Moolenbroek
2012-01-13 00:23:04 +01:00
parent 8cb7ba7951
commit 2c685f34e0
30 changed files with 36 additions and 398 deletions

View File

@@ -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 \

View File

@@ -1,21 +0,0 @@
/* adddma.c
*/
#include <lib.h>
#define adddma _adddma
#include <unistd.h>
#include <stdarg.h>
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);
}

View File

@@ -1,21 +0,0 @@
/* deldma.c
*/
#include <lib.h>
#define deldma _deldma
#include <unistd.h>
#include <stdarg.h>
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);
}

View File

@@ -1,25 +0,0 @@
/* getdma.c
*/
#include <lib.h>
#define getdma _getdma
#include <unistd.h>
#include <stdarg.h>
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;
}

View File

@@ -1,62 +0,0 @@
#include <lib.h>
#define vm_adddma _vm_adddma
#define vm_deldma _vm_deldma
#define vm_getdma _vm_getdma
#include <minix/vm.h>
#include <unistd.h>
#include <stdarg.h>
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;
}

View File

@@ -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

View File

@@ -1,6 +0,0 @@
#include <machine/asm.h>
IMPORT(_adddma)
ENTRY(adddma)
jmp _C_LABEL(_adddma)

View File

@@ -1,6 +0,0 @@
#include <machine/asm.h>
IMPORT(_deldma)
ENTRY(deldma)
jmp _C_LABEL(_deldma)

View File

@@ -1,6 +0,0 @@
#include <machine/asm.h>
IMPORT(_getdma)
ENTRY(getdma)
jmp _C_LABEL(_getdma)

View File

@@ -1,14 +0,0 @@
#include <machine/asm.h>
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)

View File

@@ -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 \

View File

@@ -4,15 +4,13 @@
#include <unistd.h>
#include <stdarg.h>
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)
{

View File

@@ -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

View File

@@ -1,20 +0,0 @@
/* adddma.c
*/
#include <lib.h>
#include <unistd.h>
#include <stdarg.h>
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);
}

View File

@@ -1,20 +0,0 @@
/* deldma.c
*/
#include <lib.h>
#include <unistd.h>
#include <stdarg.h>
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);
}

View File

@@ -1,24 +0,0 @@
/* getdma.c
*/
#include <lib.h>
#include <unistd.h>
#include <stdarg.h>
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;
}