1 #include "syslib.h" 2 3 /*===========================================================================* 4 * sys_umap_remote * 5 *===========================================================================*/ 6 int sys_umap_remote(proc_ep, grantee, seg, vir_addr, bytes, phys_addr) 7 endpoint_t proc_ep; /* process number to do umap for */ 8 endpoint_t grantee; /* process nr to check as grantee */ 9 int seg; /* T, D, or S segment */ 10 vir_bytes vir_addr; /* address in bytes with segment*/ 11 vir_bytes bytes; /* number of bytes to be copied */ 12 phys_bytes *phys_addr; /* placeholder for result */ 13 { 14 message m; 15 int result; 16 17 /* Note about the grantee parameter: 18 * - Is ignored for non-grant umap calls, but should be SELF to 19 * pass the sanity check in that case; 20 * - May be SELF to get the same behaviour as sys_umap, namely that the 21 * caller must be the grantee; 22 * - In all other cases, should be a valid endpoint (neither ANY nor NONE). 23 */ 24 25 m.m_lsys_krn_sys_umap.src_endpt = proc_ep; 26 m.m_lsys_krn_sys_umap.dst_endpt = grantee; 27 m.m_lsys_krn_sys_umap.segment = seg; 28 m.m_lsys_krn_sys_umap.src_addr = vir_addr; 29 m.m_lsys_krn_sys_umap.nr_bytes = bytes; 30 31 result = _kernel_call(SYS_UMAP_REMOTE, &m); 32 *phys_addr = m.m_krn_lsys_sys_umap.dst_addr; 33 return(result); 34 } 35 36