diff --git a/include/minix/ipc.h b/include/minix/ipc.h index c703ad925..9f58b59d5 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -57,8 +57,6 @@ typedef struct { typedef struct { u8_t flags; void *addr; } mess_vmmcp_reply; typedef struct { - endpoint_t m_source; /* who sent the message */ - int m_type; /* what kind of message is it */ union { mess_1 m_m1; mess_2 m_m2; @@ -74,7 +72,10 @@ typedef struct { mess_vmmcp m_vmmcp; mess_vmmcp_reply m_vmmcp_reply; mess_vm_vfs_mmap m_vm_vfs; + u32_t size[14]; /* message payload may have 14 longs at most */ } m_u; + int m_type; /* what kind of message is it */ + endpoint_t m_source; /* who sent the message */ } message __aligned(16); /* The following defines provide names for useful members. */ diff --git a/kernel/arch/earm/klib.S b/kernel/arch/earm/klib.S index 0294be7dd..60b5046e3 100644 --- a/kernel/arch/earm/klib.S +++ b/kernel/arch/earm/klib.S @@ -18,8 +18,8 @@ /* * int copy_msg_from_user(message * user_mbuf, message * dst); * - * Copies a message of 36 bytes from user process space to a kernel buffer. This - * function assumes that the process address space is installed (cr3 loaded). + * Copies a message of 64 bytes from user process space to a kernel buffer. This + * function assumes that the process address space is installed (ttbr loaded). * * This function from the callers point of view either succeeds or returns an * error which gives the caller a chance to respond accordingly. In fact it @@ -36,9 +36,15 @@ ENTRY(copy_msg_from_user) mov r9, r0 /* load the destination pointer */ mov r10, r1 - /* do the copy */ - ldm r9, {r0-r8} - stm r10, {r0-r8} + /* do the copy, first 32 bytes */ + ldm r9, {r0-r7} + stm r10, {r0-r7} + + /* next 32 bytes */ + add r9, r9, #32 + add r10, r10, #32 + ldm r9, {r0-r7} + stm r10, {r0-r7} LABEL(__copy_msg_from_user_end) pop {r4-r10, lr} @@ -51,7 +57,7 @@ LABEL(__copy_msg_from_user_end) /* * void copy_msg_to_user(message * src, message * user_mbuf); * - * Copies a message of 36 bytes to user process space from a kernel buffer. + * Copies a message of 64 bytes to user process space from a kernel buffer. * * All the other copy_msg_from_user() comments apply here as well! */ @@ -61,9 +67,15 @@ ENTRY(copy_msg_to_user) mov r9, r0 /* load the destination pointer */ mov r10, r1 - /* do the copy */ - ldm r9, {r0-r8} - stm r10, {r0-r8} + /* do the copy, first 32 bytes */ + ldm r9, {r0-r7} + stm r10, {r0-r7} + + /* next 32 bytes */ + add r9, r9, #32 + add r10, r10, #32 + ldm r9, {r0-r7} + stm r10, {r0-r7} LABEL(__copy_msg_to_user_end) pop {r4-r10, lr} diff --git a/kernel/arch/i386/klib.S b/kernel/arch/i386/klib.S index 83663a759..0ad32da18 100644 --- a/kernel/arch/i386/klib.S +++ b/kernel/arch/i386/klib.S @@ -221,7 +221,7 @@ LABEL(phys_copy_fault_in_kernel) /* kernel can send us here */ /* * int copy_msg_from_user(message * user_mbuf, message * dst); * - * Copies a message of 36 bytes from user process space to a kernel buffer. This + * Copies a message of 64 bytes from user process space to a kernel buffer. This * function assumes that the process address space is installed (cr3 loaded). * * This function from the callers point of view either succeeds or returns an @@ -239,8 +239,8 @@ ENTRY(copy_msg_from_user) /* load the destination pointer */ mov 8(%esp), %edx -/* mov 0*4(%ecx), %eax - mov %eax, 0*4(%edx) */ + mov 0*4(%ecx), %eax + mov %eax, 0*4(%edx) mov 1*4(%ecx), %eax mov %eax, 1*4(%edx) mov 2*4(%ecx), %eax @@ -258,6 +258,21 @@ ENTRY(copy_msg_from_user) mov 8*4(%ecx), %eax mov %eax, 8*4(%edx) + mov 9*4(%ecx), %eax + mov %eax, 9*4(%edx) + mov 10*4(%ecx), %eax + mov %eax, 10*4(%edx) + mov 11*4(%ecx), %eax + mov %eax, 11*4(%edx) + mov 12*4(%ecx), %eax + mov %eax, 12*4(%edx) + mov 13*4(%ecx), %eax + mov %eax, 13*4(%edx) + mov 14*4(%ecx), %eax + mov %eax, 14*4(%edx) + mov 15*4(%ecx), %eax + mov %eax, 15*4(%edx) + LABEL(__copy_msg_from_user_end) movl $0, %eax ret @@ -268,7 +283,7 @@ LABEL(__copy_msg_from_user_end) /* * void copy_msg_to_user(message * src, message * user_mbuf); * - * Copies a message of 36 bytes to user process space from a kernel buffer. + * Copies a message of 64 bytes to user process space from a kernel buffer. * * All the other copy_msg_from_user() comments apply here as well! */ @@ -297,6 +312,22 @@ ENTRY(copy_msg_to_user) mov 8*4(%ecx), %eax mov %eax, 8*4(%edx) + + mov 9*4(%ecx), %eax + mov %eax, 9*4(%edx) + mov 10*4(%ecx), %eax + mov %eax, 10*4(%edx) + mov 11*4(%ecx), %eax + mov %eax, 11*4(%edx) + mov 12*4(%ecx), %eax + mov %eax, 12*4(%edx) + mov 13*4(%ecx), %eax + mov %eax, 13*4(%edx) + mov 14*4(%ecx), %eax + mov %eax, 14*4(%edx) + mov 15*4(%ecx), %eax + mov %eax, 15*4(%edx) + LABEL(__copy_msg_to_user_end) movl $0, %eax ret diff --git a/lib/libminc/Makefile b/lib/libminc/Makefile index d5491009a..750815acc 100644 --- a/lib/libminc/Makefile +++ b/lib/libminc/Makefile @@ -135,6 +135,10 @@ SRCS+= ${i} SRCS += __aeabi_ldivmod.S __aeabi_uldivmod.S .endif +.if (${MACHINE_ARCH} == "i386") +SRCS += setjmp.S +.endif + # Import from locale .for i in _def_time.c .PATH.c: ${LIBCDIR}/locale diff --git a/servers/vm/vfs.c b/servers/vm/vfs.c index 92b2fb6ff..d6a0be2f0 100644 --- a/servers/vm/vfs.c +++ b/servers/vm/vfs.c @@ -29,7 +29,7 @@ #include "region.h" #include "sanitycheck.h" -#define STATELEN 50 +#define STATELEN 70 static struct vfs_request_node { message reqmsg;