diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-03-11 11:16:51 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-03-11 11:16:51 +0000 |
commit | 8bac3df8ddd2f4ae7dd7eb669a82db56e09d0968 (patch) | |
tree | 1be9d4fa61c829ff90305cb4c90f18b9017343f3 /sys/arch | |
parent | 6fb003425ef619cb30447d98c97795e0c09b597b (diff) |
Debbuger changed towards the latest Mach.
Some minor changes for Linux ;) emulation.
Small bug fixes from NetBSD.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/db_disasm.c | 31 | ||||
-rw-r--r-- | sys/arch/i386/i386/db_interface.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/i386/db_trace.c | 7 | ||||
-rw-r--r-- | sys/arch/i386/i386/gdt.c | 5 | ||||
-rw-r--r-- | sys/arch/i386/i386/linux_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 10 |
6 files changed, 45 insertions, 22 deletions
diff --git a/sys/arch/i386/i386/db_disasm.c b/sys/arch/i386/i386/db_disasm.c index 8e467cbd16c..22b4df8706f 100644 --- a/sys/arch/i386/i386/db_disasm.c +++ b/sys/arch/i386/i386/db_disasm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_disasm.c,v 1.2 1996/02/28 14:38:40 mickey Exp $ */ +/* $OpenBSD: db_disasm.c,v 1.3 1996/03/11 11:16:40 mickey Exp $ */ /* * Mach Operating System @@ -11,7 +11,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,10 +22,10 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * - * Id: db_disasm.c,v 2.3 91/02/05 17:11:03 mrt (CMU) + * Id: db_disasm.c,v 2.6 92/01/03 20:05:00 dbg (CMU) */ /* @@ -281,6 +281,25 @@ struct inst db_inst_0fcx[] = { /*cf*/ { "bswap", FALSE, LONG, op1(Ri), 0 }, }; +struct inst db_inst_0fdx[] = { +/*c0*/ { "cmpxchg",TRUE, BYTE, op2(R, E), 0 }, +/*c1*/ { "cmpxchg",TRUE, LONG, op2(R, E), 0 }, +/*c2*/ { "", FALSE, NONE, 0, 0 }, +/*c3*/ { "", FALSE, NONE, 0, 0 }, +/*c4*/ { "", FALSE, NONE, 0, 0 }, +/*c5*/ { "", FALSE, NONE, 0, 0 }, +/*c6*/ { "", FALSE, NONE, 0, 0 }, +/*c7*/ { "", FALSE, NONE, 0, 0 }, +/*c8*/ { "", FALSE, NONE, 0, 0 }, +/*c9*/ { "", FALSE, NONE, 0, 0 }, +/*ca*/ { "", FALSE, NONE, 0, 0 }, +/*cb*/ { "", FALSE, NONE, 0, 0 }, +/*cc*/ { "", FALSE, NONE, 0, 0 }, +/*cd*/ { "", FALSE, NONE, 0, 0 }, +/*ce*/ { "", FALSE, NONE, 0, 0 }, +/*cf*/ { "", FALSE, NONE, 0, 0 }, +}; + struct inst *db_inst_0f[] = { db_inst_0f0x, 0, @@ -295,7 +314,7 @@ struct inst *db_inst_0f[] = { db_inst_0fax, db_inst_0fbx, db_inst_0fcx, - 0, + db_inst_0fdx, 0, 0 }; diff --git a/sys/arch/i386/i386/db_interface.c b/sys/arch/i386/i386/db_interface.c index cb652d436e0..9c632b7a239 100644 --- a/sys/arch/i386/i386/db_interface.c +++ b/sys/arch/i386/i386/db_interface.c @@ -1,3 +1,4 @@ +/* $OpenBSD: db_interface.c,v 1.2 1996/03/11 11:16:42 mickey Exp $ */ /* $NetBSD: db_interface.c,v 1.18 1995/10/10 04:45:03 mycroft Exp $ */ /* @@ -11,7 +12,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +23,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. * * db_interface.c,v 2.4 1991/02/05 17:11:13 mrt (CMU) */ @@ -35,13 +36,12 @@ #include <sys/proc.h> #include <sys/reboot.h> #include <sys/systm.h> /* just for boothowto --eichin */ -#include <setjmp.h> #include <vm/vm.h> #include <machine/db_machdep.h> -extern jmp_buf *db_recover; +extern label_t *db_recover; int db_active = 0; diff --git a/sys/arch/i386/i386/db_trace.c b/sys/arch/i386/i386/db_trace.c index 377392cd9a0..7ea0e5a9a10 100644 --- a/sys/arch/i386/i386/db_trace.c +++ b/sys/arch/i386/i386/db_trace.c @@ -1,3 +1,4 @@ +/* $OpenBSD: db_trace.c,v 1.2 1996/03/11 11:16:44 mickey Exp $ */ /* $NetBSD: db_trace.c,v 1.17 1995/10/11 04:19:35 mycroft Exp $ */ /* @@ -11,7 +12,7 @@ * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * @@ -22,8 +23,8 @@ * Carnegie Mellon University * Pittsburgh PA 15213-3890 * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. */ #include <sys/param.h> diff --git a/sys/arch/i386/i386/gdt.c b/sys/arch/i386/i386/gdt.c index 5fc57423379..6b3818082e5 100644 --- a/sys/arch/i386/i386/gdt.c +++ b/sys/arch/i386/i386/gdt.c @@ -1,4 +1,5 @@ -/* $OpenBSD: gdt.c,v 1.3 1996/02/28 14:38:41 mickey Exp $ */ +/* $OpenBSD: gdt.c,v 1.4 1996/03/11 11:16:46 mickey Exp $ */ +/* $NetBSD: gdt.c,v 1.5 1995/11/17 06:47:27 jtc Exp $ */ /* * Copyright (c) 1995 Charles M. Hannum. All rights reserved. @@ -103,7 +104,6 @@ gdt_compact() int slot = NGDT, oslot; for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { - PHOLD(p); pcb = &p->p_addr->u_pcb; oslot = IDXSEL(pcb->pcb_tss_sel); if (oslot >= gdt_count) { @@ -125,7 +125,6 @@ gdt_compact() dynamic_gdt[oslot].gd.gd_type = SDT_SYSNULL; pcb->pcb_ldt_sel = GSEL(slot, SEL_KPL); } - PRELE(p); } for (; slot < gdt_count; slot++) if (dynamic_gdt[slot].gd.gd_type == SDT_SYSNULL) diff --git a/sys/arch/i386/i386/linux_machdep.c b/sys/arch/i386/i386/linux_machdep.c index 27b1616907b..b38e48cf9ed 100644 --- a/sys/arch/i386/i386/linux_machdep.c +++ b/sys/arch/i386/i386/linux_machdep.c @@ -1,3 +1,4 @@ +/* $OpenBSD: linux_machdep.c,v 1.3 1996/03/11 11:16:48 mickey Exp $ */ /* $NetBSD: linux_machdep.c,v 1.24 1996/01/04 22:21:57 jtc Exp $ */ /* @@ -502,6 +503,9 @@ linux_machdepioctl(p, v, retval) break; #endif default: +#ifdef DIAGNOSTIC + printf("linux_machdepioctl: invalid ioctl %08x\n", com); +#endif return EINVAL; } SCARG(&bia, com) = com; diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 051e811cc43..b20bc98824d 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.7 1996/03/03 03:02:34 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.8 1996/03/11 11:16:50 mickey Exp $ */ /* $NetBSD: machdep.c,v 1.191 1996/03/01 21:49:49 scottr Exp $ */ /*- @@ -703,8 +703,8 @@ boot(howto) extern int cold; if (cold) { - printf("hit reset please"); - for(;;); + howto |= RB_HALT; + goto haltsys; } boothowto = howto; if ((howto&RB_NOSYNC) == 0 && waittime < 0) { @@ -717,8 +717,9 @@ boot(howto) resettodr(); } splhigh(); +haltsys: + doshutdownhooks(); if (howto & RB_HALT) { - doshutdownhooks(); printf("\n"); printf("The operating system has halted.\n"); printf("Please press any key to reboot.\n\n"); @@ -729,7 +730,6 @@ boot(howto) dumppcb.pcb_cr3 = rcr3(); dumpsys(); } - doshutdownhooks(); } printf("rebooting...\n"); cpu_reset(); |