summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-05-16 20:53:43 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-05-16 20:53:43 +0000
commit23fed0cc9eacca1142c66c34d265d52a0e3dd497 (patch)
tree371ed0105b9fe6b635b28fed50d8e49059c90c74 /sys/arch/sparc64
parent4ca1516fdbe0974306c0ae5c2da202d87c4e25a4 (diff)
Implement copyin32(9).
ok mpi@, visa@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/locore.s17
1 files changed, 16 insertions, 1 deletions
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