bigger message
Change-Id: Ie770140c55799bdc3bb8f0ad6994d59938155a1a
This commit is contained in:
parent
7120f34ec1
commit
25719b5d92
4 changed files with 58 additions and 14 deletions
|
@ -12,8 +12,8 @@
|
||||||
#define M1 1
|
#define M1 1
|
||||||
#define M3 3
|
#define M3 3
|
||||||
#define M4 4
|
#define M4 4
|
||||||
#define M3_STRING 16 /* legacy m3_ca1 size (must not be changed) */
|
#define M3_STRING 44 /* legacy m3_ca1 size (must not be changed) */
|
||||||
#define M3_LONG_STRING 16 /* current m3_ca1 size (may be increased) */
|
#define M3_LONG_STRING 44 /* current m3_ca1 size (may be increased) */
|
||||||
|
|
||||||
typedef struct {int m1i1, m1i2, m1i3; char *m1p1, *m1p2, *m1p3, *m1p4;} mess_1;
|
typedef struct {int m1i1, m1i2, m1i3; char *m1p1, *m1p2, *m1p3, *m1p4;} mess_1;
|
||||||
typedef struct {int m2i1, m2i2, m2i3; long m2l1, m2l2; char *m2p1;
|
typedef struct {int m2i1, m2i2, m2i3; long m2l1, m2l2; char *m2p1;
|
||||||
|
@ -74,6 +74,7 @@ typedef struct {
|
||||||
mess_vmmcp m_vmmcp;
|
mess_vmmcp m_vmmcp;
|
||||||
mess_vmmcp_reply m_vmmcp_reply;
|
mess_vmmcp_reply m_vmmcp_reply;
|
||||||
mess_vm_vfs_mmap m_vm_vfs;
|
mess_vm_vfs_mmap m_vm_vfs;
|
||||||
|
u32_t size[14]; /* message payload may have 14 longs at most */
|
||||||
} m_u;
|
} m_u;
|
||||||
} message __aligned(16);
|
} message __aligned(16);
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
/*
|
/*
|
||||||
* int copy_msg_from_user(message * user_mbuf, message * dst);
|
* 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).
|
* function assumes that the process address space is installed (ttbr loaded).
|
||||||
*
|
*
|
||||||
* This function from the callers point of view either succeeds or returns an
|
* 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
|
* 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
|
mov r9, r0
|
||||||
/* load the destination pointer */
|
/* load the destination pointer */
|
||||||
mov r10, r1
|
mov r10, r1
|
||||||
/* do the copy */
|
/* do the copy, first 32 bytes */
|
||||||
ldm r9, {r0-r8}
|
ldm r9, {r0-r7}
|
||||||
stm r10, {r0-r8}
|
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)
|
LABEL(__copy_msg_from_user_end)
|
||||||
pop {r4-r10, lr}
|
pop {r4-r10, lr}
|
||||||
|
@ -51,7 +57,7 @@ LABEL(__copy_msg_from_user_end)
|
||||||
/*
|
/*
|
||||||
* void copy_msg_to_user(message * src, message * user_mbuf);
|
* 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!
|
* All the other copy_msg_from_user() comments apply here as well!
|
||||||
*/
|
*/
|
||||||
|
@ -61,9 +67,15 @@ ENTRY(copy_msg_to_user)
|
||||||
mov r9, r0
|
mov r9, r0
|
||||||
/* load the destination pointer */
|
/* load the destination pointer */
|
||||||
mov r10, r1
|
mov r10, r1
|
||||||
/* do the copy */
|
/* do the copy, first 32 bytes */
|
||||||
ldm r9, {r0-r8}
|
ldm r9, {r0-r7}
|
||||||
stm r10, {r0-r8}
|
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)
|
LABEL(__copy_msg_to_user_end)
|
||||||
pop {r4-r10, lr}
|
pop {r4-r10, lr}
|
||||||
|
|
|
@ -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);
|
* 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).
|
* function assumes that the process address space is installed (cr3 loaded).
|
||||||
*
|
*
|
||||||
* This function from the callers point of view either succeeds or returns an
|
* This function from the callers point of view either succeeds or returns an
|
||||||
|
@ -258,6 +258,21 @@ ENTRY(copy_msg_from_user)
|
||||||
mov 8*4(%ecx), %eax
|
mov 8*4(%ecx), %eax
|
||||||
mov %eax, 8*4(%edx)
|
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)
|
LABEL(__copy_msg_from_user_end)
|
||||||
movl $0, %eax
|
movl $0, %eax
|
||||||
ret
|
ret
|
||||||
|
@ -268,7 +283,7 @@ LABEL(__copy_msg_from_user_end)
|
||||||
/*
|
/*
|
||||||
* void copy_msg_to_user(message * src, message * user_mbuf);
|
* 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!
|
* 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 8*4(%ecx), %eax
|
||||||
mov %eax, 8*4(%edx)
|
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)
|
LABEL(__copy_msg_to_user_end)
|
||||||
movl $0, %eax
|
movl $0, %eax
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
#include "sanitycheck.h"
|
#include "sanitycheck.h"
|
||||||
|
|
||||||
#define STATELEN 50
|
#define STATELEN 70
|
||||||
|
|
||||||
static struct vfs_request_node {
|
static struct vfs_request_node {
|
||||||
message reqmsg;
|
message reqmsg;
|
||||||
|
|
Loading…
Reference in a new issue