Deleted Added
full compact
trap.c (70861) trap.c (71257)
1/*-
2 * Copyright (C) 1994, David Greenman
3 * Copyright (c) 1990, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the University of Utah, and William Jolitz.
8 *

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

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91
1/*-
2 * Copyright (C) 1994, David Greenman
3 * Copyright (c) 1990, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the University of Utah, and William Jolitz.
8 *

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

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91
38 * $FreeBSD: head/sys/i386/i386/trap.c 70861 2001-01-10 04:43:51Z jake $
38 * $FreeBSD: head/sys/i386/i386/trap.c 71257 2001-01-19 13:19:02Z peter $
39 */
40
41/*
42 * 386 Trap and System call handling
43 */
44
39 */
40
41/*
42 * 386 Trap and System call handling
43 */
44
45#include "opt_clock.h"
45#include "opt_cpu.h"
46#include "opt_ddb.h"
47#include "opt_ktrace.h"
46#include "opt_cpu.h"
47#include "opt_ddb.h"
48#include "opt_ktrace.h"
48#include "opt_clock.h"
49#include "opt_npx.h"
49#include "opt_trap.h"
50
51#include <sys/param.h>
52#include <sys/bus.h>
53#include <sys/systm.h>
54#include <sys/proc.h>
55#include <sys/pioctl.h>
56#include <sys/ipl.h>

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

93#include <machine/clock.h>
94#endif
95
96#include <machine/vm86.h>
97
98#include <ddb/ddb.h>
99
100#include "isa.h"
50#include "opt_trap.h"
51
52#include <sys/param.h>
53#include <sys/bus.h>
54#include <sys/systm.h>
55#include <sys/proc.h>
56#include <sys/pioctl.h>
57#include <sys/ipl.h>

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

94#include <machine/clock.h>
95#endif
96
97#include <machine/vm86.h>
98
99#include <ddb/ddb.h>
100
101#include "isa.h"
101#include "npx.h"
102
103#include <sys/sysctl.h>
104
105int (*pmath_emulate) __P((struct trapframe *));
106
107extern void trap __P((struct trapframe frame));
108extern int trapwrite __P((unsigned addr));
109extern void syscall2 __P((struct trapframe frame));

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

404 break;
405
406 case T_BOUND: /* bounds check fault */
407 ucode = FPE_FLTSUB;
408 i = SIGFPE;
409 break;
410
411 case T_DNA:
102
103#include <sys/sysctl.h>
104
105int (*pmath_emulate) __P((struct trapframe *));
106
107extern void trap __P((struct trapframe frame));
108extern int trapwrite __P((unsigned addr));
109extern void syscall2 __P((struct trapframe frame));

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

404 break;
405
406 case T_BOUND: /* bounds check fault */
407 ucode = FPE_FLTSUB;
408 i = SIGFPE;
409 break;
410
411 case T_DNA:
412#if NNPX > 0
412#ifdef DEV_NPX
413 /* transparent fault (due to context switch "late") */
414 if (npxdna())
415 goto out;
416#endif
417 if (!pmath_emulate) {
418 i = SIGFPE;
419 ucode = FPE_FPU_NP_TRAP;
420 break;

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

438 /* kernel trap */
439
440 switch (type) {
441 case T_PAGEFLT: /* page fault */
442 (void) trap_pfault(&frame, FALSE, eva);
443 goto out;
444
445 case T_DNA:
413 /* transparent fault (due to context switch "late") */
414 if (npxdna())
415 goto out;
416#endif
417 if (!pmath_emulate) {
418 i = SIGFPE;
419 ucode = FPE_FPU_NP_TRAP;
420 break;

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

438 /* kernel trap */
439
440 switch (type) {
441 case T_PAGEFLT: /* page fault */
442 (void) trap_pfault(&frame, FALSE, eva);
443 goto out;
444
445 case T_DNA:
446#if NNPX > 0
446#ifdef DEV_NPX
447 /*
448 * The kernel is apparently using npx for copying.
449 * XXX this should be fatal unless the kernel has
450 * registered such use.
451 */
452 if (npxdna())
453 goto out;
454#endif

--- 857 unchanged lines hidden ---
447 /*
448 * The kernel is apparently using npx for copying.
449 * XXX this should be fatal unless the kernel has
450 * registered such use.
451 */
452 if (npxdna())
453 goto out;
454#endif

--- 857 unchanged lines hidden ---