summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-12-09 20:40:43 +0000
committerphk <phk@FreeBSD.org>1995-12-09 20:40:43 +0000
commitb4ab7c240eb1933d38ac085773a6728b7a7c75bc (patch)
treec2d24df88e4c082a065172c7bf2cab8233d137e0 /sys
parent90cc40edfe0f0859120f3d58810216ff034d01b2 (diff)
downloadFreeBSD-src-b4ab7c240eb1933d38ac085773a6728b7a7c75bc.zip
FreeBSD-src-b4ab7c240eb1933d38ac085773a6728b7a7c75bc.tar.gz
Remove various unused symbols and procedures.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/cpu_switch.S4
-rw-r--r--sys/amd64/amd64/support.S204
-rw-r--r--sys/amd64/amd64/support.s204
-rw-r--r--sys/amd64/amd64/swtch.s4
-rw-r--r--sys/amd64/amd64/trap.c12
-rw-r--r--sys/i386/i386/support.s204
-rw-r--r--sys/i386/i386/swtch.s4
-rw-r--r--sys/i386/i386/trap.c12
-rw-r--r--sys/kern/subr_trap.c12
9 files changed, 27 insertions, 633 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index db95daa..72dc2ad 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.20 1995/02/17 02:22:42 phk Exp $
+ * $Id: swtch.s,v 1.21 1995/09/03 20:39:19 dyson Exp $
*/
#include "npx.h" /* for NNPX */
@@ -59,7 +59,7 @@
* queues.
*/
.data
- .globl _curpcb, _whichqs, _whichrtqs, _whichidqs
+ .globl _curpcb
_curpcb: .long 0 /* pointer to curproc's PCB area */
_whichqs: .long 0 /* which run queues have data */
_whichrtqs: .long 0 /* which realtime run queues have data */
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
index 8f67a1c..a93be8a 100644
--- a/sys/amd64/amd64/support.S
+++ b/sys/amd64/amd64/support.S
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: support.s,v 1.23 1995/10/05 10:32:30 phk Exp $
+ * $Id: support.s,v 1.24 1995/10/15 18:03:42 phk Exp $
*/
#include "assym.s" /* system definitions */
@@ -199,18 +199,6 @@ ENTRY(fillw)
popl %edi
ret
-/* filli(pat, base, cnt) */
-ENTRY(filli)
- pushl %edi
- movl 8(%esp),%eax
- movl 12(%esp),%edi
- movl 16(%esp),%ecx
- cld
- rep
- stosl
- popl %edi
- ret
-
ENTRY(bcopyb)
bcopyb:
pushl %esi
@@ -241,55 +229,6 @@ bcopyb:
cld
ret
-ENTRY(bcopyw)
-bcopyw:
- pushl %esi
- pushl %edi
- movl 12(%esp),%esi
- movl 16(%esp),%edi
- movl 20(%esp),%ecx
- cmpl %esi,%edi /* potentially overlapping? */
- jnb 1f
- shrl $1,%ecx /* copy by 16-bit words */
- cld /* nope, copy forwards */
- rep
- movsw
- adc %ecx,%ecx /* any bytes left? */
- rep
- movsb
- popl %edi
- popl %esi
- ret
-
- ALIGN_TEXT
-1:
- addl %ecx,%edi /* copy backwards */
- addl %ecx,%esi
- andl $1,%ecx /* any fractional bytes? */
- decl %edi
- decl %esi
- std
- rep
- movsb
- movl 20(%esp),%ecx /* copy remainder by 16-bit words */
- shrl $1,%ecx
- decl %esi
- decl %edi
- rep
- movsw
- popl %edi
- popl %esi
- cld
- ret
-
-ENTRY(bcopyx)
- movl 16(%esp),%eax
- cmpl $2,%eax
- je bcopyw /* not _bcopyw, to avoid multiple mcounts */
- cmpl $4,%eax
- je bcopy /* XXX the shared ret's break mexitcount */
- jmp bcopyb
-
/*
* (ov)bcopy(src, dst, cnt)
* ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
@@ -542,7 +481,6 @@ copyin_fault:
/*
* fu{byte,sword,word} : fetch a byte (sword, word) from user memory
*/
-ALTENTRY(fuiword)
ENTRY(fuword)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -566,19 +504,6 @@ ENTRY(fuswintr)
movl $-1,%eax
ret
-ENTRY(fusword)
- movl _curpcb,%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl 4(%esp),%edx
-
- cmpl $VM_MAXUSER_ADDRESS-2,%edx
- ja fusufault
-
- movzwl (%edx),%eax
- movl $0,PCB_ONFAULT(%ecx)
- ret
-
-ALTENTRY(fuibyte)
ENTRY(fubyte)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -602,7 +527,6 @@ fusufault:
/*
* su{byte,sword,word}: write a byte (word, longword) to user memory
*/
-ALTENTRY(suiword)
ENTRY(suword)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -730,120 +654,6 @@ ENTRY(subyte)
ret
/*
- * copyoutstr(from, to, maxlen, int *lencopied)
- * copy a string from from to to, stop when a 0 character is reached.
- * return ENAMETOOLONG if string is longer than maxlen, and
- * EFAULT on protection violations. If lencopied is non-zero,
- * return the actual length in *lencopied.
- */
-ENTRY(copyoutstr)
- pushl %esi
- pushl %edi
- movl _curpcb,%ecx
- movl $cpystrflt,PCB_ONFAULT(%ecx) /* XXX rename copyoutstr_fault */
-
- movl 12(%esp),%esi /* %esi = from */
- movl 16(%esp),%edi /* %edi = to */
- movl 20(%esp),%edx /* %edx = maxlen */
- cld
-
-#if defined(I386_CPU)
-
-#if defined(I486_CPU) || defined(I586_CPU)
- cmpl $CPUCLASS_386,_cpu_class
- jne 5f
-#endif /* I486_CPU || I586_CPU */
-
-1:
- /*
- * It suffices to check that the first byte is in user space, because
- * we look at a page at a time and the end address is on a page
- * boundary.
- */
- cmpl $VM_MAXUSER_ADDRESS-1,%edi
- ja cpystrflt
-
- movl %edi,%eax
- shrl $IDXSHIFT,%eax
- andb $0xfc,%al
- movb _PTmap(%eax),%al
- andb $7,%al
- cmpb $7,%al
- je 2f
-
- /* simulate trap */
- pushl %edx
- pushl %edi
- call _trapwrite
- cld
- popl %edi
- popl %edx
- testl %eax,%eax
- jnz cpystrflt
-
-2: /* copy up to end of this page */
- movl %edi,%eax
- andl $NBPG-1,%eax
- movl $NBPG,%ecx
- subl %eax,%ecx /* ecx = NBPG - (src % NBPG) */
- cmpl %ecx,%edx
- jae 3f
- movl %edx,%ecx /* ecx = min(ecx, edx) */
-3:
- testl %ecx,%ecx
- jz 4f
- decl %ecx
- decl %edx
- lodsb
- stosb
- orb %al,%al
- jnz 3b
-
- /* Success -- 0 byte reached */
- decl %edx
- xorl %eax,%eax
- jmp 6f
-
-4: /* next page */
- testl %edx,%edx
- jnz 1b
-
- /* edx is zero -- return ENAMETOOLONG */
- movl $ENAMETOOLONG,%eax
- jmp cpystrflt_x
-#endif /* I386_CPU */
-
-#if defined(I486_CPU) || defined(I586_CPU)
-5:
- incl %edx
-1:
- decl %edx
- jz 2f
- /*
- * XXX - would be faster to rewrite this function to use
- * strlen() and copyout().
- */
- cmpl $VM_MAXUSER_ADDRESS-1,%edi
- ja cpystrflt
-
- lodsb
- stosb
- orb %al,%al
- jnz 1b
-
- /* Success -- 0 byte reached */
- decl %edx
- xorl %eax,%eax
- jmp cpystrflt_x
-2:
- /* edx is zero -- return ENAMETOOLONG */
- movl $ENAMETOOLONG,%eax
- jmp cpystrflt_x
-
-#endif /* I486_CPU || I586_CPU */
-
-
-/*
* copyinstr(from, to, maxlen, int *lencopied)
* copy a string from from to to, stop when a 0 character is reached.
* return ENAMETOOLONG if string is longer than maxlen, and
@@ -956,18 +766,6 @@ ENTRY(copystr)
popl %esi
ret
-/*
- * Miscellaneous kernel support functions
- */
-ENTRY(ffs)
- bsfl 4(%esp),%eax
- jz 1f
- incl %eax
- ret
-1:
- xorl %eax,%eax
- ret
-
ENTRY(bcmp)
pushl %edi
pushl %esi
diff --git a/sys/amd64/amd64/support.s b/sys/amd64/amd64/support.s
index 8f67a1c..a93be8a 100644
--- a/sys/amd64/amd64/support.s
+++ b/sys/amd64/amd64/support.s
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: support.s,v 1.23 1995/10/05 10:32:30 phk Exp $
+ * $Id: support.s,v 1.24 1995/10/15 18:03:42 phk Exp $
*/
#include "assym.s" /* system definitions */
@@ -199,18 +199,6 @@ ENTRY(fillw)
popl %edi
ret
-/* filli(pat, base, cnt) */
-ENTRY(filli)
- pushl %edi
- movl 8(%esp),%eax
- movl 12(%esp),%edi
- movl 16(%esp),%ecx
- cld
- rep
- stosl
- popl %edi
- ret
-
ENTRY(bcopyb)
bcopyb:
pushl %esi
@@ -241,55 +229,6 @@ bcopyb:
cld
ret
-ENTRY(bcopyw)
-bcopyw:
- pushl %esi
- pushl %edi
- movl 12(%esp),%esi
- movl 16(%esp),%edi
- movl 20(%esp),%ecx
- cmpl %esi,%edi /* potentially overlapping? */
- jnb 1f
- shrl $1,%ecx /* copy by 16-bit words */
- cld /* nope, copy forwards */
- rep
- movsw
- adc %ecx,%ecx /* any bytes left? */
- rep
- movsb
- popl %edi
- popl %esi
- ret
-
- ALIGN_TEXT
-1:
- addl %ecx,%edi /* copy backwards */
- addl %ecx,%esi
- andl $1,%ecx /* any fractional bytes? */
- decl %edi
- decl %esi
- std
- rep
- movsb
- movl 20(%esp),%ecx /* copy remainder by 16-bit words */
- shrl $1,%ecx
- decl %esi
- decl %edi
- rep
- movsw
- popl %edi
- popl %esi
- cld
- ret
-
-ENTRY(bcopyx)
- movl 16(%esp),%eax
- cmpl $2,%eax
- je bcopyw /* not _bcopyw, to avoid multiple mcounts */
- cmpl $4,%eax
- je bcopy /* XXX the shared ret's break mexitcount */
- jmp bcopyb
-
/*
* (ov)bcopy(src, dst, cnt)
* ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
@@ -542,7 +481,6 @@ copyin_fault:
/*
* fu{byte,sword,word} : fetch a byte (sword, word) from user memory
*/
-ALTENTRY(fuiword)
ENTRY(fuword)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -566,19 +504,6 @@ ENTRY(fuswintr)
movl $-1,%eax
ret
-ENTRY(fusword)
- movl _curpcb,%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl 4(%esp),%edx
-
- cmpl $VM_MAXUSER_ADDRESS-2,%edx
- ja fusufault
-
- movzwl (%edx),%eax
- movl $0,PCB_ONFAULT(%ecx)
- ret
-
-ALTENTRY(fuibyte)
ENTRY(fubyte)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -602,7 +527,6 @@ fusufault:
/*
* su{byte,sword,word}: write a byte (word, longword) to user memory
*/
-ALTENTRY(suiword)
ENTRY(suword)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -730,120 +654,6 @@ ENTRY(subyte)
ret
/*
- * copyoutstr(from, to, maxlen, int *lencopied)
- * copy a string from from to to, stop when a 0 character is reached.
- * return ENAMETOOLONG if string is longer than maxlen, and
- * EFAULT on protection violations. If lencopied is non-zero,
- * return the actual length in *lencopied.
- */
-ENTRY(copyoutstr)
- pushl %esi
- pushl %edi
- movl _curpcb,%ecx
- movl $cpystrflt,PCB_ONFAULT(%ecx) /* XXX rename copyoutstr_fault */
-
- movl 12(%esp),%esi /* %esi = from */
- movl 16(%esp),%edi /* %edi = to */
- movl 20(%esp),%edx /* %edx = maxlen */
- cld
-
-#if defined(I386_CPU)
-
-#if defined(I486_CPU) || defined(I586_CPU)
- cmpl $CPUCLASS_386,_cpu_class
- jne 5f
-#endif /* I486_CPU || I586_CPU */
-
-1:
- /*
- * It suffices to check that the first byte is in user space, because
- * we look at a page at a time and the end address is on a page
- * boundary.
- */
- cmpl $VM_MAXUSER_ADDRESS-1,%edi
- ja cpystrflt
-
- movl %edi,%eax
- shrl $IDXSHIFT,%eax
- andb $0xfc,%al
- movb _PTmap(%eax),%al
- andb $7,%al
- cmpb $7,%al
- je 2f
-
- /* simulate trap */
- pushl %edx
- pushl %edi
- call _trapwrite
- cld
- popl %edi
- popl %edx
- testl %eax,%eax
- jnz cpystrflt
-
-2: /* copy up to end of this page */
- movl %edi,%eax
- andl $NBPG-1,%eax
- movl $NBPG,%ecx
- subl %eax,%ecx /* ecx = NBPG - (src % NBPG) */
- cmpl %ecx,%edx
- jae 3f
- movl %edx,%ecx /* ecx = min(ecx, edx) */
-3:
- testl %ecx,%ecx
- jz 4f
- decl %ecx
- decl %edx
- lodsb
- stosb
- orb %al,%al
- jnz 3b
-
- /* Success -- 0 byte reached */
- decl %edx
- xorl %eax,%eax
- jmp 6f
-
-4: /* next page */
- testl %edx,%edx
- jnz 1b
-
- /* edx is zero -- return ENAMETOOLONG */
- movl $ENAMETOOLONG,%eax
- jmp cpystrflt_x
-#endif /* I386_CPU */
-
-#if defined(I486_CPU) || defined(I586_CPU)
-5:
- incl %edx
-1:
- decl %edx
- jz 2f
- /*
- * XXX - would be faster to rewrite this function to use
- * strlen() and copyout().
- */
- cmpl $VM_MAXUSER_ADDRESS-1,%edi
- ja cpystrflt
-
- lodsb
- stosb
- orb %al,%al
- jnz 1b
-
- /* Success -- 0 byte reached */
- decl %edx
- xorl %eax,%eax
- jmp cpystrflt_x
-2:
- /* edx is zero -- return ENAMETOOLONG */
- movl $ENAMETOOLONG,%eax
- jmp cpystrflt_x
-
-#endif /* I486_CPU || I586_CPU */
-
-
-/*
* copyinstr(from, to, maxlen, int *lencopied)
* copy a string from from to to, stop when a 0 character is reached.
* return ENAMETOOLONG if string is longer than maxlen, and
@@ -956,18 +766,6 @@ ENTRY(copystr)
popl %esi
ret
-/*
- * Miscellaneous kernel support functions
- */
-ENTRY(ffs)
- bsfl 4(%esp),%eax
- jz 1f
- incl %eax
- ret
-1:
- xorl %eax,%eax
- ret
-
ENTRY(bcmp)
pushl %edi
pushl %esi
diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s
index db95daa..72dc2ad 100644
--- a/sys/amd64/amd64/swtch.s
+++ b/sys/amd64/amd64/swtch.s
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.20 1995/02/17 02:22:42 phk Exp $
+ * $Id: swtch.s,v 1.21 1995/09/03 20:39:19 dyson Exp $
*/
#include "npx.h" /* for NNPX */
@@ -59,7 +59,7 @@
* queues.
*/
.data
- .globl _curpcb, _whichqs, _whichrtqs, _whichidqs
+ .globl _curpcb
_curpcb: .long 0 /* pointer to curproc's PCB area */
_whichqs: .long 0 /* which run queues have data */
_whichrtqs: .long 0 /* which realtime run queues have data */
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 5c8a647..28c78d2 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.62 1995/10/28 15:38:32 phk Exp $
+ * $Id: trap.c,v 1.63 1995/12/07 12:45:39 davidg Exp $
*/
/*
@@ -87,13 +87,13 @@ extern int trapwrite __P((unsigned addr));
extern void syscall __P((struct trapframe frame));
extern void linux_syscall __P((struct trapframe frame));
-int trap_pfault __P((struct trapframe *, int));
-void trap_fatal __P((struct trapframe *));
+static int trap_pfault __P((struct trapframe *, int));
+static void trap_fatal __P((struct trapframe *));
extern inthand_t IDTVEC(syscall);
#define MAX_TRAP_MSG 27
-char *trap_msg[] = {
+static char *trap_msg[] = {
"", /* 0 unused */
"privileged instruction fault", /* 1 T_PRIVINFLT */
"", /* 2 unused */
@@ -457,7 +457,7 @@ out:
* to be made safe are the iBCS2 code and the process tracing/
* debugging code.
*/
-int
+static int
trap_pfault(frame, usermode)
struct trapframe *frame;
int usermode;
@@ -680,7 +680,7 @@ nogo:
return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);
}
-void
+static void
trap_fatal(frame)
struct trapframe *frame;
{
diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s
index 8f67a1c..a93be8a 100644
--- a/sys/i386/i386/support.s
+++ b/sys/i386/i386/support.s
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: support.s,v 1.23 1995/10/05 10:32:30 phk Exp $
+ * $Id: support.s,v 1.24 1995/10/15 18:03:42 phk Exp $
*/
#include "assym.s" /* system definitions */
@@ -199,18 +199,6 @@ ENTRY(fillw)
popl %edi
ret
-/* filli(pat, base, cnt) */
-ENTRY(filli)
- pushl %edi
- movl 8(%esp),%eax
- movl 12(%esp),%edi
- movl 16(%esp),%ecx
- cld
- rep
- stosl
- popl %edi
- ret
-
ENTRY(bcopyb)
bcopyb:
pushl %esi
@@ -241,55 +229,6 @@ bcopyb:
cld
ret
-ENTRY(bcopyw)
-bcopyw:
- pushl %esi
- pushl %edi
- movl 12(%esp),%esi
- movl 16(%esp),%edi
- movl 20(%esp),%ecx
- cmpl %esi,%edi /* potentially overlapping? */
- jnb 1f
- shrl $1,%ecx /* copy by 16-bit words */
- cld /* nope, copy forwards */
- rep
- movsw
- adc %ecx,%ecx /* any bytes left? */
- rep
- movsb
- popl %edi
- popl %esi
- ret
-
- ALIGN_TEXT
-1:
- addl %ecx,%edi /* copy backwards */
- addl %ecx,%esi
- andl $1,%ecx /* any fractional bytes? */
- decl %edi
- decl %esi
- std
- rep
- movsb
- movl 20(%esp),%ecx /* copy remainder by 16-bit words */
- shrl $1,%ecx
- decl %esi
- decl %edi
- rep
- movsw
- popl %edi
- popl %esi
- cld
- ret
-
-ENTRY(bcopyx)
- movl 16(%esp),%eax
- cmpl $2,%eax
- je bcopyw /* not _bcopyw, to avoid multiple mcounts */
- cmpl $4,%eax
- je bcopy /* XXX the shared ret's break mexitcount */
- jmp bcopyb
-
/*
* (ov)bcopy(src, dst, cnt)
* ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
@@ -542,7 +481,6 @@ copyin_fault:
/*
* fu{byte,sword,word} : fetch a byte (sword, word) from user memory
*/
-ALTENTRY(fuiword)
ENTRY(fuword)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -566,19 +504,6 @@ ENTRY(fuswintr)
movl $-1,%eax
ret
-ENTRY(fusword)
- movl _curpcb,%ecx
- movl $fusufault,PCB_ONFAULT(%ecx)
- movl 4(%esp),%edx
-
- cmpl $VM_MAXUSER_ADDRESS-2,%edx
- ja fusufault
-
- movzwl (%edx),%eax
- movl $0,PCB_ONFAULT(%ecx)
- ret
-
-ALTENTRY(fuibyte)
ENTRY(fubyte)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -602,7 +527,6 @@ fusufault:
/*
* su{byte,sword,word}: write a byte (word, longword) to user memory
*/
-ALTENTRY(suiword)
ENTRY(suword)
movl _curpcb,%ecx
movl $fusufault,PCB_ONFAULT(%ecx)
@@ -730,120 +654,6 @@ ENTRY(subyte)
ret
/*
- * copyoutstr(from, to, maxlen, int *lencopied)
- * copy a string from from to to, stop when a 0 character is reached.
- * return ENAMETOOLONG if string is longer than maxlen, and
- * EFAULT on protection violations. If lencopied is non-zero,
- * return the actual length in *lencopied.
- */
-ENTRY(copyoutstr)
- pushl %esi
- pushl %edi
- movl _curpcb,%ecx
- movl $cpystrflt,PCB_ONFAULT(%ecx) /* XXX rename copyoutstr_fault */
-
- movl 12(%esp),%esi /* %esi = from */
- movl 16(%esp),%edi /* %edi = to */
- movl 20(%esp),%edx /* %edx = maxlen */
- cld
-
-#if defined(I386_CPU)
-
-#if defined(I486_CPU) || defined(I586_CPU)
- cmpl $CPUCLASS_386,_cpu_class
- jne 5f
-#endif /* I486_CPU || I586_CPU */
-
-1:
- /*
- * It suffices to check that the first byte is in user space, because
- * we look at a page at a time and the end address is on a page
- * boundary.
- */
- cmpl $VM_MAXUSER_ADDRESS-1,%edi
- ja cpystrflt
-
- movl %edi,%eax
- shrl $IDXSHIFT,%eax
- andb $0xfc,%al
- movb _PTmap(%eax),%al
- andb $7,%al
- cmpb $7,%al
- je 2f
-
- /* simulate trap */
- pushl %edx
- pushl %edi
- call _trapwrite
- cld
- popl %edi
- popl %edx
- testl %eax,%eax
- jnz cpystrflt
-
-2: /* copy up to end of this page */
- movl %edi,%eax
- andl $NBPG-1,%eax
- movl $NBPG,%ecx
- subl %eax,%ecx /* ecx = NBPG - (src % NBPG) */
- cmpl %ecx,%edx
- jae 3f
- movl %edx,%ecx /* ecx = min(ecx, edx) */
-3:
- testl %ecx,%ecx
- jz 4f
- decl %ecx
- decl %edx
- lodsb
- stosb
- orb %al,%al
- jnz 3b
-
- /* Success -- 0 byte reached */
- decl %edx
- xorl %eax,%eax
- jmp 6f
-
-4: /* next page */
- testl %edx,%edx
- jnz 1b
-
- /* edx is zero -- return ENAMETOOLONG */
- movl $ENAMETOOLONG,%eax
- jmp cpystrflt_x
-#endif /* I386_CPU */
-
-#if defined(I486_CPU) || defined(I586_CPU)
-5:
- incl %edx
-1:
- decl %edx
- jz 2f
- /*
- * XXX - would be faster to rewrite this function to use
- * strlen() and copyout().
- */
- cmpl $VM_MAXUSER_ADDRESS-1,%edi
- ja cpystrflt
-
- lodsb
- stosb
- orb %al,%al
- jnz 1b
-
- /* Success -- 0 byte reached */
- decl %edx
- xorl %eax,%eax
- jmp cpystrflt_x
-2:
- /* edx is zero -- return ENAMETOOLONG */
- movl $ENAMETOOLONG,%eax
- jmp cpystrflt_x
-
-#endif /* I486_CPU || I586_CPU */
-
-
-/*
* copyinstr(from, to, maxlen, int *lencopied)
* copy a string from from to to, stop when a 0 character is reached.
* return ENAMETOOLONG if string is longer than maxlen, and
@@ -956,18 +766,6 @@ ENTRY(copystr)
popl %esi
ret
-/*
- * Miscellaneous kernel support functions
- */
-ENTRY(ffs)
- bsfl 4(%esp),%eax
- jz 1f
- incl %eax
- ret
-1:
- xorl %eax,%eax
- ret
-
ENTRY(bcmp)
pushl %edi
pushl %esi
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index db95daa..72dc2ad 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.20 1995/02/17 02:22:42 phk Exp $
+ * $Id: swtch.s,v 1.21 1995/09/03 20:39:19 dyson Exp $
*/
#include "npx.h" /* for NNPX */
@@ -59,7 +59,7 @@
* queues.
*/
.data
- .globl _curpcb, _whichqs, _whichrtqs, _whichidqs
+ .globl _curpcb
_curpcb: .long 0 /* pointer to curproc's PCB area */
_whichqs: .long 0 /* which run queues have data */
_whichrtqs: .long 0 /* which realtime run queues have data */
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index 5c8a647..28c78d2 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.62 1995/10/28 15:38:32 phk Exp $
+ * $Id: trap.c,v 1.63 1995/12/07 12:45:39 davidg Exp $
*/
/*
@@ -87,13 +87,13 @@ extern int trapwrite __P((unsigned addr));
extern void syscall __P((struct trapframe frame));
extern void linux_syscall __P((struct trapframe frame));
-int trap_pfault __P((struct trapframe *, int));
-void trap_fatal __P((struct trapframe *));
+static int trap_pfault __P((struct trapframe *, int));
+static void trap_fatal __P((struct trapframe *));
extern inthand_t IDTVEC(syscall);
#define MAX_TRAP_MSG 27
-char *trap_msg[] = {
+static char *trap_msg[] = {
"", /* 0 unused */
"privileged instruction fault", /* 1 T_PRIVINFLT */
"", /* 2 unused */
@@ -457,7 +457,7 @@ out:
* to be made safe are the iBCS2 code and the process tracing/
* debugging code.
*/
-int
+static int
trap_pfault(frame, usermode)
struct trapframe *frame;
int usermode;
@@ -680,7 +680,7 @@ nogo:
return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);
}
-void
+static void
trap_fatal(frame)
struct trapframe *frame;
{
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 5c8a647..28c78d2 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.62 1995/10/28 15:38:32 phk Exp $
+ * $Id: trap.c,v 1.63 1995/12/07 12:45:39 davidg Exp $
*/
/*
@@ -87,13 +87,13 @@ extern int trapwrite __P((unsigned addr));
extern void syscall __P((struct trapframe frame));
extern void linux_syscall __P((struct trapframe frame));
-int trap_pfault __P((struct trapframe *, int));
-void trap_fatal __P((struct trapframe *));
+static int trap_pfault __P((struct trapframe *, int));
+static void trap_fatal __P((struct trapframe *));
extern inthand_t IDTVEC(syscall);
#define MAX_TRAP_MSG 27
-char *trap_msg[] = {
+static char *trap_msg[] = {
"", /* 0 unused */
"privileged instruction fault", /* 1 T_PRIVINFLT */
"", /* 2 unused */
@@ -457,7 +457,7 @@ out:
* to be made safe are the iBCS2 code and the process tracing/
* debugging code.
*/
-int
+static int
trap_pfault(frame, usermode)
struct trapframe *frame;
int usermode;
@@ -680,7 +680,7 @@ nogo:
return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);
}
-void
+static void
trap_fatal(frame)
struct trapframe *frame;
{
OpenPOWER on IntegriCloud