3 /*===========================================================================*
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 */
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).
25 m
.CP_SRC_ENDPT
= proc_ep
;
26 m
.CP_DST_ENDPT
= grantee
;
28 m
.CP_SRC_ADDR
= vir_addr
;
29 m
.CP_NR_BYTES
= bytes
;
31 result
= _kernel_call(SYS_UMAP_REMOTE
, &m
);
32 *phys_addr
= m
.CP_DST_ADDR
;