2005-04-21 16:53:53 +02:00
|
|
|
#include "syslib.h"
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* sys_umap *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int sys_umap(proc_ep, seg, vir_addr, bytes, phys_addr)
|
2009-09-22 23:42:02 +02:00
|
|
|
endpoint_t proc_ep; /* process number to do umap for */
|
2005-04-21 16:53:53 +02:00
|
|
|
int seg; /* T, D, or S segment */
|
|
|
|
vir_bytes vir_addr; /* address in bytes with segment*/
|
|
|
|
vir_bytes bytes; /* number of bytes to be copied */
|
|
|
|
phys_bytes *phys_addr; /* placeholder for result */
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
int result;
|
|
|
|
|
2009-09-22 23:42:02 +02:00
|
|
|
m.CP_SRC_ENDPT = proc_ep;
|
2005-04-21 16:53:53 +02:00
|
|
|
m.CP_SRC_SPACE = seg;
|
|
|
|
m.CP_SRC_ADDR = vir_addr;
|
|
|
|
m.CP_NR_BYTES = bytes;
|
|
|
|
|
2010-02-09 16:20:09 +01:00
|
|
|
result = _kernel_call(SYS_UMAP, &m);
|
2005-04-21 16:53:53 +02:00
|
|
|
*phys_addr = m.CP_DST_ADDR;
|
|
|
|
return(result);
|
|
|
|
}
|
|
|
|
|