subr_syscall.c (28872) | subr_syscall.c (29128) |
---|---|
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.108 1997/08/26 18:10:33 peter Exp $ | 38 * $Id: trap.c,v 1.109 1997/08/28 14:36:54 jlemon 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 sdtossd(&gdt[IDXSEL(frame->tf_cs & 0xffff)].sd, &softseg); 721 722 if (type <= MAX_TRAP_MSG) 723 printf("\n\nFatal trap %d: %s while in %s mode\n", 724 type, trap_msg[type], 725 frame->tf_eflags & PSL_VM ? "vm86" : 726 ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel"); 727#ifdef SMP | 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 sdtossd(&gdt[IDXSEL(frame->tf_cs & 0xffff)].sd, &softseg); 721 722 if (type <= MAX_TRAP_MSG) 723 printf("\n\nFatal trap %d: %s while in %s mode\n", 724 type, trap_msg[type], 725 frame->tf_eflags & PSL_VM ? "vm86" : 726 ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel"); 727#ifdef SMP |
728 printf("cpuid = %d\n", cpuid); 729 printf("lapic.id = %d\n", lapic.id); | 728 /* three seperate prints in case of a trap on an unmapped page */ 729 printf("mp_lock = %08x; ", mp_lock); 730 printf("cpuid = %d; ", cpuid); 731 printf("lapic.id = %08x\n", lapic.id); |
730#endif 731 if (type == T_PAGEFLT) { 732 printf("fault virtual address = 0x%x\n", eva); 733 printf("fault code = %s %s, %s\n", 734 code & PGEX_U ? "user" : "supervisor", 735 code & PGEX_W ? "write" : "read", 736 code & PGEX_P ? "protection violation" : "page not present"); 737 } --- 28 unchanged lines hidden (view full) --- 766 printf("current process = "); 767 if (curproc) { 768 printf("%lu (%s)\n", 769 (u_long)curproc->p_pid, curproc->p_comm ? 770 curproc->p_comm : ""); 771 } else { 772 printf("Idle\n"); 773 } | 732#endif 733 if (type == T_PAGEFLT) { 734 printf("fault virtual address = 0x%x\n", eva); 735 printf("fault code = %s %s, %s\n", 736 code & PGEX_U ? "user" : "supervisor", 737 code & PGEX_W ? "write" : "read", 738 code & PGEX_P ? "protection violation" : "page not present"); 739 } --- 28 unchanged lines hidden (view full) --- 768 printf("current process = "); 769 if (curproc) { 770 printf("%lu (%s)\n", 771 (u_long)curproc->p_pid, curproc->p_comm ? 772 curproc->p_comm : ""); 773 } else { 774 printf("Idle\n"); 775 } |
774#ifdef SMP 775 printf("mp_lock = %08x\n", mp_lock); 776#endif | |
777 printf("interrupt mask = "); 778 if ((cpl & net_imask) == net_imask) 779 printf("net "); 780 if ((cpl & tty_imask) == tty_imask) 781 printf("tty "); 782 if ((cpl & bio_imask) == bio_imask) 783 printf("bio "); 784 if (cpl == 0) --- 38 unchanged lines hidden (view full) --- 823void 824dblfault_handler() 825{ 826 printf("\nFatal double fault:\n"); 827 printf("eip = 0x%x\n", common_tss.tss_eip); 828 printf("esp = 0x%x\n", common_tss.tss_esp); 829 printf("ebp = 0x%x\n", common_tss.tss_ebp); 830#ifdef SMP | 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) --- 38 unchanged lines hidden (view full) --- 822void 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 |
831 printf("cpuid = %d\n", cpuid); 832 printf("lapic.id = %d\n", lapic.id); | 830 /* three seperate prints in case of a trap on an unmapped page */ 831 printf("mp_lock = %08x; ", mp_lock); 832 printf("cpuid = %d; ", cpuid); 833 printf("lapic.id = %08x\n", lapic.id); |
833#endif 834 panic("double fault"); 835} 836 837/* 838 * Compensate for 386 brain damage (missing URKR). 839 * This is a little simpler than the pagefault handler in trap() because 840 * it the page tables have already been faulted in and high addresses --- 183 unchanged lines hidden --- | 834#endif 835 panic("double fault"); 836} 837 838/* 839 * Compensate for 386 brain damage (missing URKR). 840 * This is a little simpler than the pagefault handler in trap() because 841 * it the page tables have already been faulted in and high addresses --- 183 unchanged lines hidden --- |