drop from segments physcopy/vircopy invocations

. sys_vircopy always uses D for both src and dst
	. sys_physcopy uses PHYS_SEG if and only if corresponding
	  endpoint is NONE, so we can derive the mode (PHYS_SEG or D)
	  from the endpoint arg in the kernel, dropping the seg args
	. fields in msg still filled in for backwards compatability,
	  using same NONE-logic in the library
This commit is contained in:
Ben Gras
2012-06-16 17:29:37 +00:00
parent 0e35eb0c6b
commit 0fb2f83da9
17 changed files with 62 additions and 64 deletions

View File

@@ -432,14 +432,18 @@
#define IOP_ENDPT m2_l1 /* target endpoint */
/* Field names for _UMAP, _VIRCOPY, _PHYSCOPY. */
#define CP_SRC_SPACE m5_s1 /* T or D space (stack is also D) */
#define CP_SRC_ENDPT m5_i1 /* process to copy from */
#define CP_SRC_ADDR m5_l1 /* address where data come from */
#define CP_DST_SPACE m5_s2 /* T or D space (stack is also D) */
#define CP_DST_ENDPT m5_i2 /* process to copy to */
#define CP_DST_ADDR m5_l2 /* address where data go to */
#define CP_NR_BYTES m5_l3 /* number of bytes to copy */
#define UMAP_SEG m5_s1
/* only used for backwards compatability */
#define CP_SRC_SPACE_OBSOLETE m5_s1 /* T or D space (stack is also D) */
#define CP_DST_SPACE_OBSOLETE m5_s2 /* T or D space (stack is also D) */
/* Field names for SYS_VUMAP. */
#define VUMAP_ENDPT m10_i1 /* grant owner, or SELF for local addresses */
#define VUMAP_VADDR m10_l1 /* address of virtual (input) vector */

View File

@@ -131,19 +131,14 @@ int sys_vtimer(endpoint_t proc_nr, int which, clock_t *newval, clock_t
int sys_irqctl(int request, int irq_vec, int policy, int *irq_hook_id);
/* Shorthands for sys_vircopy() and sys_physcopy() system calls. */
#define sys_datacopy(src_proc, src_vir, dst_proc, dst_vir, bytes) \
sys_vircopy(src_proc, D, src_vir, dst_proc, D, dst_vir, bytes)
#define sys_textcopy(src_proc, src_vir, dst_proc, dst_vir, bytes) \
sys_vircopy(src_proc, T, src_vir, dst_proc, T, dst_vir, bytes)
#define sys_stackcopy(src_proc, src_vir, dst_proc, dst_vir, bytes) \
sys_vircopy(src_proc, S, src_vir, dst_proc, S, dst_vir, bytes)
int sys_vircopy(endpoint_t src_proc, int src_s, vir_bytes src_v,
endpoint_t dst_proc, int dst_seg, vir_bytes dst_vir, phys_bytes bytes);
#define sys_datacopy sys_vircopy
int sys_vircopy(endpoint_t src_proc, vir_bytes src_v,
endpoint_t dst_proc, vir_bytes dst_vir, phys_bytes bytes);
#define sys_abscopy(src_phys, dst_phys, bytes) \
sys_physcopy(NONE, PHYS_SEG, src_phys, NONE, PHYS_SEG, dst_phys, bytes)
int sys_physcopy(endpoint_t src_proc, int src_seg, vir_bytes src_vir,
endpoint_t dst_proc, int dst_seg, vir_bytes dst_vir, phys_bytes bytes);
sys_physcopy(NONE, src_phys, NONE, dst_phys, bytes)
int sys_physcopy(endpoint_t src_proc, vir_bytes src_vir,
endpoint_t dst_proc, vir_bytes dst_vir, phys_bytes bytes);
/* Grant-based copy functions. */