Date: Wed, 22 Nov 2006 11:22:22 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 110377 for review Message-ID: <200611221122.kAMBMM8L028140@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110377 Change 110377 by gonzo@gonzo_hq on 2006/11/22 11:21:40 o Add copyin implementation. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/support.S#9 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/support.S#9 (text+ko) ==== @@ -284,10 +284,27 @@ * copyin(9) * <v0>int copyin(<a0>const void *useraddr, <a1>void *kernaddr, <a2>size_t len) */ -ENTRY(copyin) - break - jr ra - nop +NESTED(copyin, CALLFRAME_SIZ, ra) + subu sp, sp, CALLFRAME_SIZ + .mask 0x80000000, -4 + sw ra, CALLFRAME_RA(sp) + blt a0, zero, _C_LABEL(copyerr) + move v0, a0 # swap a0, a1 for call to memcpy + move a0, a1 + move a1, v0 + lw t2, pcpup + lw v1, PC_CURPCB(t2) + la v0, _C_LABEL(copyerr) + jal memcpy + sw v0, PCB_ONFAULT(v1) + + lw t2, pcpup + lw v1, PC_CURPCB(t2) + lw ra, CALLFRAME_RA(sp) + addu sp, sp, CALLFRAME_SIZ + sw zero, PCB_ONFAULT(v1) + j ra + move v0, zero END(copyin) /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611221122.kAMBMM8L028140>