} mess_lsys_krn_sys_abort;
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_abort);
+typedef struct {
+ endpoint_t src_endpt;
+ vir_bytes src_addr;
+ endpoint_t dst_endpt;
+ vir_bytes dst_addr;
+ phys_bytes nr_bytes;
+ int flags;
+
+ uint8_t padding[32];
+} mess_lsys_krn_sys_copy;
+_ASSERT_MSG_SIZE(mess_lsys_krn_sys_copy);
+
typedef struct {
endpoint_t endpt;
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
mess_lsys_krn_schedule m_lsys_krn_schedule;
mess_lsys_krn_sys_abort m_lsys_krn_sys_abort;
+ mess_lsys_krn_sys_copy m_lsys_krn_sys_copy;
mess_lsys_krn_sys_iopenable m_lsys_krn_sys_iopenable;
mess_lsys_krn_sys_irqctl m_lsys_krn_sys_irqctl;
mess_lsys_krn_sys_memset m_lsys_krn_sys_memset;
* m_type: SYS_VIRCOPY, SYS_PHYSCOPY
*
* The parameters for this kernel call are:
- * m5_l1: CP_SRC_ADDR source offset within segment
- * m5_i1: CP_SRC_ENDPT source process number
- * m5_l2: CP_DST_ADDR destination offset within segment
- * m5_i2: CP_DST_ENDPT destination process number
- * m5_l3: CP_NR_BYTES number of bytes to copy
+ * m_lsys_krn_sys_copy.src_addr source offset within segment
+ * m_lsys_krn_sys_copy.src_endpt source process number
+ * m_lsys_krn_sys_copy.dst_addr destination offset within segment
+ * m_lsys_krn_sys_copy.dst_endpt destination process number
+ * m_lsys_krn_sys_copy.nr_bytes number of bytes to copy
+ * m_lsys_krn_sys_copy.flags
*/
#include "kernel/system.h"
printf(
"do_copy: got request from %d (source %d, destination %d)\n",
caller->p_endpoint,
- m_ptr->CP_SRC_ENDPT,
- m_ptr->CP_DST_ENDPT);
+ m_ptr->m_lsys_krn_sys_copy.src_endpt,
+ m_ptr->m_lsys_krn_sys_copy.dst_endpt);
}
}
#endif
/* Dismember the command message. */
- vir_addr[_SRC_].proc_nr_e = m_ptr->CP_SRC_ENDPT;
- vir_addr[_DST_].proc_nr_e = m_ptr->CP_DST_ENDPT;
+ vir_addr[_SRC_].proc_nr_e = m_ptr->m_lsys_krn_sys_copy.src_endpt;
+ vir_addr[_DST_].proc_nr_e = m_ptr->m_lsys_krn_sys_copy.dst_endpt;
- vir_addr[_SRC_].offset = (vir_bytes) m_ptr->CP_SRC_ADDR;
- vir_addr[_DST_].offset = (vir_bytes) m_ptr->CP_DST_ADDR;
- bytes = (phys_bytes) m_ptr->CP_NR_BYTES;
+ vir_addr[_SRC_].offset = m_ptr->m_lsys_krn_sys_copy.src_addr;
+ vir_addr[_DST_].offset = m_ptr->m_lsys_krn_sys_copy.dst_addr;
+ bytes = m_ptr->m_lsys_krn_sys_copy.nr_bytes;
/* Now do some checks for both the source and destination virtual address.
* This is done once for _SRC_, then once for _DST_.
if (bytes != (phys_bytes) (vir_bytes) bytes) return(E2BIG);
/* Now try to make the actual virtual copy. */
- if(m_ptr->CP_FLAGS & CP_FLAG_TRY) {
+ if(m_ptr->m_lsys_krn_sys_copy.flags & CP_FLAG_TRY) {
int r;
assert(caller->p_endpoint == VFS_PROC_NR);
r = virtual_copy(&vir_addr[_SRC_], &vir_addr[_DST_], bytes);
}
}
#endif /* (USE_VIRCOPY || USE_PHYSCOPY) */
-
message copy_mess;
if (bytes == 0L) return(OK);
- copy_mess.CP_SRC_ENDPT = src_proc;
- copy_mess.CP_SRC_ADDR = (long) src_vir;
- copy_mess.CP_DST_ENDPT = dst_proc;
- copy_mess.CP_DST_ADDR = (long) dst_vir;
- copy_mess.CP_NR_BYTES = (long) bytes;
- copy_mess.CP_FLAGS = flags;
+ copy_mess.m_lsys_krn_sys_copy.src_endpt = src_proc;
+ copy_mess.m_lsys_krn_sys_copy.src_addr = src_vir;
+ copy_mess.m_lsys_krn_sys_copy.dst_endpt = dst_proc;
+ copy_mess.m_lsys_krn_sys_copy.dst_addr = dst_vir;
+ copy_mess.m_lsys_krn_sys_copy.nr_bytes = bytes;
+ copy_mess.m_lsys_krn_sys_copy.flags = flags;
return(_kernel_call(SYS_PHYSCOPY, ©_mess));
}
if (bytes == 0L) return(OK);
memset(©_mess, 0, sizeof(copy_mess));
- copy_mess.CP_SRC_ENDPT = src_proc;
- copy_mess.CP_SRC_ADDR = (long) src_vir;
- copy_mess.CP_DST_ENDPT = dst_proc;
- copy_mess.CP_DST_ADDR = (long) dst_vir;
- copy_mess.CP_NR_BYTES = (long) bytes;
- copy_mess.CP_FLAGS = flags;
+ copy_mess.m_lsys_krn_sys_copy.src_endpt = src_proc;
+ copy_mess.m_lsys_krn_sys_copy.src_addr = src_vir;
+ copy_mess.m_lsys_krn_sys_copy.dst_endpt = dst_proc;
+ copy_mess.m_lsys_krn_sys_copy.dst_addr = dst_vir;
+ copy_mess.m_lsys_krn_sys_copy.nr_bytes = bytes;
+ copy_mess.m_lsys_krn_sys_copy.flags = flags;
return(_kernel_call(SYS_VIRCOPY, ©_mess));
}