summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-02-28 14:38:48 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-02-28 14:38:48 +0000
commit4a18d31c793e18d173c77ad603c5bcd157d95097 (patch)
tree6d9febaa360c73e9493625aacfa0e8a448d39da3 /sys/arch/i386
parent5b23d4ff0c22b915fd5713948674bb8cd9ac34d6 (diff)
Small changes from NetBSD (including /usr/include dependencies, and so).
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/conf.c6
-rw-r--r--sys/arch/i386/i386/db_disasm.c6
-rw-r--r--sys/arch/i386/i386/dkbad.c8
-rw-r--r--sys/arch/i386/i386/gdt.c4
-rw-r--r--sys/arch/i386/i386/machdep.c6
-rw-r--r--sys/arch/i386/i386/math_emulate.c4
-rw-r--r--sys/arch/i386/i386/microtime.s3
-rw-r--r--sys/arch/i386/i386/ns_cksum.c6
-rw-r--r--sys/arch/i386/i386/trap.c5
-rw-r--r--sys/arch/i386/i386/vm_machdep.c5
10 files changed, 30 insertions, 23 deletions
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c
index bae181a7131..91e73d2ebcb 100644
--- a/sys/arch/i386/i386/conf.c
+++ b/sys/arch/i386/i386/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.7 1996/02/26 10:26:48 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.8 1996/02/28 14:38:38 mickey Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
@@ -58,8 +58,6 @@ bdev_decl(wt);
bdev_decl(sd);
#include "st.h"
bdev_decl(st);
-#include "ss.h"
-cdev_decl(ss);
#include "cd.h"
bdev_decl(cd);
#include "mcd.h"
@@ -161,6 +159,8 @@ cdev_decl(scd);
cdev_decl(pc);
cdev_decl(sd);
cdev_decl(st);
+#include "ss.h"
+cdev_decl(ss);
cdev_decl(cd);
#include "lpt.h"
cdev_decl(lpt);
diff --git a/sys/arch/i386/i386/db_disasm.c b/sys/arch/i386/i386/db_disasm.c
index b486627cd98..8e467cbd16c 100644
--- a/sys/arch/i386/i386/db_disasm.c
+++ b/sys/arch/i386/i386/db_disasm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.9 1995/02/05 13:59:38 mycroft Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.2 1996/02/28 14:38:40 mickey Exp $ */
/*
* Mach Operating System
@@ -31,8 +31,8 @@
/*
* Instruction disassembler.
*/
-#include "param.h"
-#include "proc.h"
+#include <sys/param.h>
+#include <sys/proc.h>
#include <machine/db_machdep.h>
#include <ddb/db_access.h>
diff --git a/sys/arch/i386/i386/dkbad.c b/sys/arch/i386/i386/dkbad.c
index 67befd23652..fcffbf05185 100644
--- a/sys/arch/i386/i386/dkbad.c
+++ b/sys/arch/i386/i386/dkbad.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dkbad.c,v 1.3 1994/10/27 04:15:19 cgd Exp $ */
+/* $OpenBSD: dkbad.c,v 1.2 1996/02/28 14:38:41 mickey Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -40,9 +40,9 @@
#ifndef NOBADSECT
-#include "sys/param.h"
-#include "sys/buf.h"
-#include "sys/dkbad.h"
+#include <sys/param.h>
+#include <sys/buf.h>
+#include <sys/dkbad.h>
/*
* Search the bad sector table looking for
diff --git a/sys/arch/i386/i386/gdt.c b/sys/arch/i386/i386/gdt.c
index 19d720e6397..5fc57423379 100644
--- a/sys/arch/i386/i386/gdt.c
+++ b/sys/arch/i386/i386/gdt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gdt.c,v 1.5 1995/11/17 06:47:27 jtc Exp $ */
+/* $OpenBSD: gdt.c,v 1.3 1996/02/28 14:38:41 mickey Exp $ */
/*
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -103,6 +103,7 @@ 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) {
@@ -124,6 +125,7 @@ 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/machdep.c b/sys/arch/i386/i386/machdep.c
index 9139f31dfd8..654e9287d7c 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.185 1996/01/08 20:12:20 mycroft Exp $ */
+/* $OpenBSD: machdep.c,v 1.6 1996/02/28 14:38:42 mickey Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
@@ -457,6 +457,7 @@ identifycpu()
/*
* machine dependent system variables.
*/
+int
cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
int *name;
u_int namelen;
@@ -913,6 +914,7 @@ dumpsys()
* /sys/i386/i386/microtime.s is used. The other code only works
* for HZ=100.
*/
+void
microtime(tvp)
register struct timeval *tvp;
{
@@ -1350,7 +1352,7 @@ pmap_next_page(addrp)
return TRUE;
}
-u_int
+int
pmap_page_index(pa)
vm_offset_t pa;
{
diff --git a/sys/arch/i386/i386/math_emulate.c b/sys/arch/i386/i386/math_emulate.c
index 9984daee242..5ab7f7f0df9 100644
--- a/sys/arch/i386/i386/math_emulate.c
+++ b/sys/arch/i386/i386/math_emulate.c
@@ -1,4 +1,4 @@
-/* $NetBSD: math_emulate.c,v 1.15 1995/10/10 04:45:30 mycroft Exp $ */
+/* $OpenBSD: math_emulate.c,v 1.2 1996/02/28 14:38:43 mickey Exp $ */
/*
* expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj
@@ -909,8 +909,6 @@ void fmul(const temp_real * src1, const temp_real * src2, temp_real * result)
* temporary real division routine.
*/
-#include "i386/i386/math_emu.h"
-
static void shift_left(int * c)
{
__asm__ __volatile__("movl (%0),%%eax ; addl %%eax,(%0)\n\t"
diff --git a/sys/arch/i386/i386/microtime.s b/sys/arch/i386/i386/microtime.s
index fc2f33ab268..70fda8671b0 100644
--- a/sys/arch/i386/i386/microtime.s
+++ b/sys/arch/i386/i386/microtime.s
@@ -1,4 +1,4 @@
-/* $NetBSD: microtime.s,v 1.16 1995/04/17 12:06:47 cgd Exp $ */
+/* $OpenBSD: microtime.s,v 1.3 1996/02/28 14:38:45 mickey Exp $ */
/*-
* Copyright (c) 1993 The Regents of the University of California.
@@ -61,6 +61,7 @@ ENTRY(microtime)
outb %al,$TIMER_MODE # latch timer 0's counter
# Read counter value into ecx, LSB first
+ xorl %ecx,%ecx
inb $TIMER_CNTR0,%al
movb %al,%cl
inb $TIMER_CNTR0,%al
diff --git a/sys/arch/i386/i386/ns_cksum.c b/sys/arch/i386/i386/ns_cksum.c
index 3899fbaf869..1678196f428 100644
--- a/sys/arch/i386/i386/ns_cksum.c
+++ b/sys/arch/i386/i386/ns_cksum.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_cksum.c,v 1.3 1994/10/27 04:15:39 cgd Exp $ */
+/* $OpenBSD: ns_cksum.c,v 1.2 1996/02/28 14:38:46 mickey Exp $ */
/*
* Copyright (c) 1982, 1988 Regents of the University of California.
@@ -35,8 +35,8 @@
* @(#)ns_cksum.c 7.7 (Berkeley) 4/29/91
*/
-#include "sys/param.h"
-#include "sys/mbuf.h"
+#include <sys/param.h>
+#include <sys/mbuf.h>
/*
* Checksum routine for Network Systems Protocol Packets (Big-Endian).
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c
index c929d7eb178..fe4b2824829 100644
--- a/sys/arch/i386/i386/trap.c
+++ b/sys/arch/i386/i386/trap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.92 1996/01/08 13:51:38 mycroft Exp $ */
+/* $OpenBSD: trap.c,v 1.5 1996/02/28 14:38:46 mickey Exp $ */
#undef DEBUG
#define DEBUG
@@ -412,7 +412,8 @@ trap(frame)
map, va, ftype, rv);
goto we_re_toast;
}
- trapsignal(p, SIGSEGV, T_PAGEFLT);
+ trapsignal(p, (rv == KERN_PROTECTION_FAILURE)
+ ? SIGBUS : SIGSEGV, T_PAGEFLT);
break;
}
diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c
index 7c3582a3d3d..107646d86a8 100644
--- a/sys/arch/i386/i386/vm_machdep.c
+++ b/sys/arch/i386/i386/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.57 1995/12/26 16:59:47 mycroft Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.6 1996/02/28 14:38:47 mickey Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -303,6 +303,7 @@ pagemove(from, to, size)
/*
* Convert kernel VA to physical address
*/
+int
kvtop(addr)
register caddr_t addr;
{
@@ -334,6 +335,7 @@ extern vm_map_t phys_map;
* All requests are (re)mapped into kernel VA space via the useriomap
* (a name with only slightly more meaning than "kernelmap")
*/
+void
vmapbuf(bp, len)
struct buf *bp;
vm_size_t len;
@@ -365,6 +367,7 @@ vmapbuf(bp, len)
* Free the io map PTEs associated with this IO operation.
* We also invalidate the TLB entries and restore the original b_addr.
*/
+void
vunmapbuf(bp, len)
struct buf *bp;
vm_size_t len;