subr_trap.c (ef73ae4b0ccbd4beded1e8cce7f528799a1ae5ed) subr_trap.c (558226eae7e05c8594cec9615927b3c3530ca889)
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 *

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

37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91
38 * $FreeBSD$
39 */
40
41/*
42 * 386 Trap and System call handling
43 */
44
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 *

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

37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91
38 * $FreeBSD$
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 ---