From 23fed0cc9eacca1142c66c34d265d52a0e3dd497 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 16 May 2017 20:53:43 +0000 Subject: Implement copyin32(9). ok mpi@, visa@ --- sys/arch/sparc64/sparc64/locore.s | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sys/arch/sparc64') diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index c0779d31cf7..4ed2061c2bf 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.185 2017/04/30 16:45:45 mpi Exp $ */ +/* $OpenBSD: locore.s,v 1.186 2017/05/16 20:53:42 kettenis Exp $ */ /* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */ /* @@ -5968,6 +5968,21 @@ Lcopyout_done: retl ! New instr clr %o0 ! return 0 +ENTRY(copyin32) + andcc %o0, 0x3, %g0 + bnz,pn %xcc, Lcopyfault + nop + GET_CPCB(%o3) + set Lcopyfault, %o4 + membar #Sync + stx %o4, [%o3 + PCB_ONFAULT] + lduwa [%o0] ASI_AIUS, %o2 + stw %o2, [%o1] + membar #Sync + stx %g0, [%o3 + PCB_ONFAULT] + retl + clr %o0 + ! Copyin or copyout fault. Clear cpcb->pcb_onfault and return EFAULT. ! Note that although we were in bcopy, there is no state to clean up; ! the only special thing is that we have to return to [g7 + 8] rather than -- cgit v1.2.3