Deleted Added
full compact
support.s (12990) support.s (13000)
1/*-
2 * Copyright (c) 1993 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*-
2 * Copyright (c) 1993 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $Id: support.s,v 1.26 1995/12/10 03:11:32 bde Exp $
33 * $Id: support.s,v 1.27 1995/12/23 16:46:31 davidg Exp $
34 */
35
36#include "assym.s" /* system definitions */
37#include "errno.h" /* error return codes */
38#include "machine/asmacros.h" /* miscellaneous asm macros */
39#include "machine/cputypes.h" /* types of CPUs */
40
41#define KDSEL 0x10 /* kernel data selector */

--- 308 unchanged lines hidden (view full) ---

350 * looks like there is an off by one error, and of course it caused an off
351 * by one error in several places.
352 */
353 cmpl $VM_MAXUSER_ADDRESS,%eax
354 ja copyout_fault
355
356#if defined(I386_CPU)
357
34 */
35
36#include "assym.s" /* system definitions */
37#include "errno.h" /* error return codes */
38#include "machine/asmacros.h" /* miscellaneous asm macros */
39#include "machine/cputypes.h" /* types of CPUs */
40
41#define KDSEL 0x10 /* kernel data selector */

--- 308 unchanged lines hidden (view full) ---

350 * looks like there is an off by one error, and of course it caused an off
351 * by one error in several places.
352 */
353 cmpl $VM_MAXUSER_ADDRESS,%eax
354 ja copyout_fault
355
356#if defined(I386_CPU)
357
358#if defined(I486_CPU) || defined(I586_CPU)
358#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
359 cmpl $CPUCLASS_386,_cpu_class
360 jne 3f
361#endif
362/*
363 * We have to check each PTE for user write permission.
364 * The checking may cause a page fault, so it is important to set
365 * up everything for return via copyout_fault before here.
366 */

--- 174 unchanged lines hidden (view full) ---

541 */
542ENTRY(suword)
543 movl _curpcb,%ecx
544 movl $fusufault,PCB_ONFAULT(%ecx)
545 movl 4(%esp),%edx
546
547#if defined(I386_CPU)
548
359 cmpl $CPUCLASS_386,_cpu_class
360 jne 3f
361#endif
362/*
363 * We have to check each PTE for user write permission.
364 * The checking may cause a page fault, so it is important to set
365 * up everything for return via copyout_fault before here.
366 */

--- 174 unchanged lines hidden (view full) ---

541 */
542ENTRY(suword)
543 movl _curpcb,%ecx
544 movl $fusufault,PCB_ONFAULT(%ecx)
545 movl 4(%esp),%edx
546
547#if defined(I386_CPU)
548
549#if defined(I486_CPU) || defined(I586_CPU)
549#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
550 cmpl $CPUCLASS_386,_cpu_class
551 jne 2f /* we only have to set the right segment selector */
550 cmpl $CPUCLASS_386,_cpu_class
551 jne 2f /* we only have to set the right segment selector */
552#endif /* I486_CPU || I586_CPU */
552#endif /* I486_CPU || I586_CPU || I686_CPU */
553
554 /* XXX - page boundary crossing is still not handled */
555 movl %edx,%eax
556 shrl $IDXSHIFT,%edx
557 andb $0xfc,%dl
558 movb _PTmap(%edx),%dl
559 andb $0x7,%dl /* must be VALID + USERACC + WRITE */
560 cmpb $0x7,%dl

--- 22 unchanged lines hidden (view full) ---

583
584ENTRY(susword)
585 movl _curpcb,%ecx
586 movl $fusufault,PCB_ONFAULT(%ecx)
587 movl 4(%esp),%edx
588
589#if defined(I386_CPU)
590
553
554 /* XXX - page boundary crossing is still not handled */
555 movl %edx,%eax
556 shrl $IDXSHIFT,%edx
557 andb $0xfc,%dl
558 movb _PTmap(%edx),%dl
559 andb $0x7,%dl /* must be VALID + USERACC + WRITE */
560 cmpb $0x7,%dl

--- 22 unchanged lines hidden (view full) ---

583
584ENTRY(susword)
585 movl _curpcb,%ecx
586 movl $fusufault,PCB_ONFAULT(%ecx)
587 movl 4(%esp),%edx
588
589#if defined(I386_CPU)
590
591#if defined(I486_CPU) || defined(I586_CPU)
591#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
592 cmpl $CPUCLASS_386,_cpu_class
593 jne 2f
592 cmpl $CPUCLASS_386,_cpu_class
593 jne 2f
594#endif /* I486_CPU || I586_CPU */
594#endif /* I486_CPU || I586_CPU || I686_CPU */
595
596 /* XXX - page boundary crossing is still not handled */
597 movl %edx,%eax
598 shrl $IDXSHIFT,%edx
599 andb $0xfc,%dl
600 movb _PTmap(%edx),%dl
601 andb $0x7,%dl /* must be VALID + USERACC + WRITE */
602 cmpb $0x7,%dl

--- 23 unchanged lines hidden (view full) ---

626ALTENTRY(suibyte)
627ENTRY(subyte)
628 movl _curpcb,%ecx
629 movl $fusufault,PCB_ONFAULT(%ecx)
630 movl 4(%esp),%edx
631
632#if defined(I386_CPU)
633
595
596 /* XXX - page boundary crossing is still not handled */
597 movl %edx,%eax
598 shrl $IDXSHIFT,%edx
599 andb $0xfc,%dl
600 movb _PTmap(%edx),%dl
601 andb $0x7,%dl /* must be VALID + USERACC + WRITE */
602 cmpb $0x7,%dl

--- 23 unchanged lines hidden (view full) ---

626ALTENTRY(suibyte)
627ENTRY(subyte)
628 movl _curpcb,%ecx
629 movl $fusufault,PCB_ONFAULT(%ecx)
630 movl 4(%esp),%edx
631
632#if defined(I386_CPU)
633
634#if defined(I486_CPU) || defined(I586_CPU)
634#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)
635 cmpl $CPUCLASS_386,_cpu_class
636 jne 2f
635 cmpl $CPUCLASS_386,_cpu_class
636 jne 2f
637#endif /* I486_CPU || I586_CPU */
637#endif /* I486_CPU || I586_CPU || I686_CPU */
638
639 movl %edx,%eax
640 shrl $IDXSHIFT,%edx
641 andb $0xfc,%dl
642 movb _PTmap(%edx),%dl
643 andb $0x7,%dl /* must be VALID + USERACC + WRITE */
644 cmpb $0x7,%dl
645 je 1f

--- 314 unchanged lines hidden ---
638
639 movl %edx,%eax
640 shrl $IDXSHIFT,%edx
641 andb $0xfc,%dl
642 movb _PTmap(%edx),%dl
643 andb $0x7,%dl /* must be VALID + USERACC + WRITE */
644 cmpb $0x7,%dl
645 je 1f

--- 314 unchanged lines hidden ---