subr_trap.c (40d5099441391b6a117252779c6fb798c5189fcb) subr_trap.c (9a3b3e8bce8e8c8bbec663229e16bebb3cfc5d53)
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 * $Id: trap.c,v 1.106 1997/08/20 05:25:48 fsmp Exp $
38 * $Id: trap.c,v 1.107 1997/08/21 06:32:39 charnier Exp $
39 */
40
41/*
42 * 386 Trap and System call handling
43 */
44
45#include "opt_ktrace.h"
46#include "opt_ddb.h"

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

720
721 if (type <= MAX_TRAP_MSG)
722 printf("\n\nFatal trap %d: %s while in %s mode\n",
723 type, trap_msg[type],
724 frame->tf_eflags & PSL_VM ? "vm86" :
725 ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel");
726#ifdef SMP
727 printf("cpuid = %d\n", cpuid);
39 */
40
41/*
42 * 386 Trap and System call handling
43 */
44
45#include "opt_ktrace.h"
46#include "opt_ddb.h"

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

720
721 if (type <= MAX_TRAP_MSG)
722 printf("\n\nFatal trap %d: %s while in %s mode\n",
723 type, trap_msg[type],
724 frame->tf_eflags & PSL_VM ? "vm86" :
725 ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel");
726#ifdef SMP
727 printf("cpuid = %d\n", cpuid);
728 printf("lapic.id = %d\n", lapic.id);
728#endif
729 if (type == T_PAGEFLT) {
730 printf("fault virtual address = 0x%x\n", eva);
731 printf("fault code = %s %s, %s\n",
732 code & PGEX_U ? "user" : "supervisor",
733 code & PGEX_W ? "write" : "read",
734 code & PGEX_P ? "protection violation" : "page not present");
735 }

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

764 printf("current process = ");
765 if (curproc) {
766 printf("%lu (%s)\n",
767 (u_long)curproc->p_pid, curproc->p_comm ?
768 curproc->p_comm : "");
769 } else {
770 printf("Idle\n");
771 }
729#endif
730 if (type == T_PAGEFLT) {
731 printf("fault virtual address = 0x%x\n", eva);
732 printf("fault code = %s %s, %s\n",
733 code & PGEX_U ? "user" : "supervisor",
734 code & PGEX_W ? "write" : "read",
735 code & PGEX_P ? "protection violation" : "page not present");
736 }

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

765 printf("current process = ");
766 if (curproc) {
767 printf("%lu (%s)\n",
768 (u_long)curproc->p_pid, curproc->p_comm ?
769 curproc->p_comm : "");
770 } else {
771 printf("Idle\n");
772 }
773#ifdef SMP
774 printf("mp_lock = %08x\n", mp_lock);
775#endif
772 printf("interrupt mask = ");
773 if ((cpl & net_imask) == net_imask)
774 printf("net ");
775 if ((cpl & tty_imask) == tty_imask)
776 printf("tty ");
777 if ((cpl & bio_imask) == bio_imask)
778 printf("bio ");
779 if (cpl == 0)

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

819dblfault_handler()
820{
821 printf("\nFatal double fault:\n");
822 printf("eip = 0x%x\n", common_tss.tss_eip);
823 printf("esp = 0x%x\n", common_tss.tss_esp);
824 printf("ebp = 0x%x\n", common_tss.tss_ebp);
825#ifdef SMP
826 printf("cpuid = %d\n", cpuid);
776 printf("interrupt mask = ");
777 if ((cpl & net_imask) == net_imask)
778 printf("net ");
779 if ((cpl & tty_imask) == tty_imask)
780 printf("tty ");
781 if ((cpl & bio_imask) == bio_imask)
782 printf("bio ");
783 if (cpl == 0)

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

823dblfault_handler()
824{
825 printf("\nFatal double fault:\n");
826 printf("eip = 0x%x\n", common_tss.tss_eip);
827 printf("esp = 0x%x\n", common_tss.tss_esp);
828 printf("ebp = 0x%x\n", common_tss.tss_ebp);
829#ifdef SMP
830 printf("cpuid = %d\n", cpuid);
831 printf("lapic.id = %d\n", lapic.id);
827#endif
828 panic("double fault");
829}
830
831/*
832 * Compensate for 386 brain damage (missing URKR).
833 * This is a little simpler than the pagefault handler in trap() because
834 * it the page tables have already been faulted in and high addresses

--- 183 unchanged lines hidden ---
832#endif
833 panic("double fault");
834}
835
836/*
837 * Compensate for 386 brain damage (missing URKR).
838 * This is a little simpler than the pagefault handler in trap() because
839 * it the page tables have already been faulted in and high addresses

--- 183 unchanged lines hidden ---