diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-04-18 19:22:24 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-04-18 19:22:24 +0000 |
commit | 88c1a45c7766cdc0921e9b16235fd3f48bcb81ac (patch) | |
tree | b760019e8b5055218e7d290b64bc0308b182efc7 /sys/arch/i386/include | |
parent | b66a90f056a003d62a99e7d226a0dc078f155cd7 (diff) |
Merge of NetBSD 960317
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r-- | sys/arch/i386/include/ansi.h | 2 | ||||
-rw-r--r-- | sys/arch/i386/include/bus.h | 95 | ||||
-rw-r--r-- | sys/arch/i386/include/disklabel.h | 7 | ||||
-rw-r--r-- | sys/arch/i386/include/gdt.h | 39 | ||||
-rw-r--r-- | sys/arch/i386/include/param.h | 11 | ||||
-rw-r--r-- | sys/arch/i386/include/pio.h | 2 | ||||
-rw-r--r-- | sys/arch/i386/include/vm86.h | 2 |
7 files changed, 150 insertions, 8 deletions
diff --git a/sys/arch/i386/include/ansi.h b/sys/arch/i386/include/ansi.h index 40efacc18e9..a0998d57569 100644 --- a/sys/arch/i386/include/ansi.h +++ b/sys/arch/i386/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.2 1996/04/17 05:19:01 mickey Exp $ */ +/* $OpenBSD: ansi.h,v 1.3 1996/04/18 19:21:31 niklas Exp $ */ /* $NetBSD: ansi.h,v 1.6 1996/03/16 01:31:50 jtc Exp $ */ /*- diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h new file mode 100644 index 00000000000..fcf4e90771b --- /dev/null +++ b/sys/arch/i386/include/bus.h @@ -0,0 +1,95 @@ +/* $OpenBSD: bus.h,v 1.1 1996/04/18 19:21:33 niklas Exp $ */ +/* $NetBSD: bus.h,v 1.1 1996/03/08 20:11:23 cgd Exp $ */ + +/* + * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Christopher G. Demetriou + * for the NetBSD Project. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _I386_BUS_H_ +#define _I386_BUS_H_ + +#include <machine/pio.h> + +/* + * I/O addresses (in bus space) + */ +typedef u_long bus_io_addr_t; +typedef u_long bus_io_size_t; + +/* + * Memory addresses (in bus space) + */ +typedef u_long bus_mem_addr_t; +typedef u_long bus_mem_size_t; + +/* + * Access methods for bus resources, I/O space, and memory space. + */ +typedef void *bus_chipset_tag_t; +typedef u_long bus_io_handle_t; +typedef caddr_t bus_mem_handle_t; + +#define bus_io_map(t, port, size, iohp) \ + (*iohp = port, 0) +#define bus_io_unmap(t, ioh, size) + +#define bus_io_read_1(t, h, o) inb((h) + (o)) +#define bus_io_read_2(t, h, o) inw((h) + (o)) +#define bus_io_read_4(t, h, o) inl((h) + (o)) +#if 0 /* Cause a link error for bus_io_read_8 */ +#define bus_io_read_8(t, h, o) !!! bus_io_read_8 unimplemented !!! +#endif + +#define bus_io_write_1(t, h, o, v) outb((h) + (o), (v)) +#define bus_io_write_2(t, h, o, v) outw((h) + (o), (v)) +#define bus_io_write_4(t, h, o, v) outl((h) + (o), (v)) +#if 0 /* Cause a link error for bus_io_write_8 */ +#define bus_io_write_8(t, h, o, v) !!! bus_io_write_8 unimplemented !!! +#endif + +int bus_mem_map __P((bus_chipset_tag_t t, bus_mem_addr_t bpa, + bus_mem_size_t size, int cacheable, bus_mem_handle_t *mhp)); +void bus_mem_unmap __P((bus_chipset_tag_t t, bus_mem_handle_t memh, + bus_mem_size_t size)); + +#define bus_mem_read_1(t, h, o) (*(volatile u_int8_t *)((h) + (o))) +#define bus_mem_read_2(t, h, o) (*(volatile u_int16_t *)((h) + (o))) +#define bus_mem_read_4(t, h, o) (*(volatile u_int32_t *)((h) + (o))) +#define bus_mem_read_8(t, h, o) (*(volatile u_int64_t *)((h) + (o))) + +#define bus_mem_write_1(t, h, o, v) \ + ((void)(*(volatile u_int8_t *)((h) + (o)) = (v))) +#define bus_mem_write_2(t, h, o, v) \ + ((void)(*(volatile u_int16_t *)((h) + (o)) = (v))) +#define bus_mem_write_4(t, h, o, v) \ + ((void)(*(volatile u_int32_t *)((h) + (o)) = (v))) +#define bus_mem_write_8(t, h, o, v) \ + ((void)(*(volatile u_int64_t *)((h) + (o)) = (v))) + +#endif /* _I386_BUS_H_ */ diff --git a/sys/arch/i386/include/disklabel.h b/sys/arch/i386/include/disklabel.h index 979cca54ce7..04ba88fe4e6 100644 --- a/sys/arch/i386/include/disklabel.h +++ b/sys/arch/i386/include/disklabel.h @@ -1,4 +1,5 @@ -/* $NetBSD: disklabel.h,v 1.2 1995/03/28 18:16:51 jtc Exp $ */ +/* $OpenBSD: disklabel.h,v 1.2 1996/04/18 19:21:36 niklas Exp $ */ +/* $NetBSD: disklabel.h,v 1.3 1996/03/09 20:52:54 ghudson Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -59,6 +60,10 @@ struct dos_partition { /* Known DOS partition types. */ #define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */ #define DOSPTYP_NETBSD DOSPTYP_386BSD /* NetBSD partition type (XXX) */ +#define DOSPTYP_FAT12 0x1 /* 12-bit FAT */ +#define DOSPTYP_FAT16S 0x4 /* 16-bit FAT, less than 32M */ +#define DOSPTYP_FAT16B 0x6 /* 16-bit FAT, more than 32M */ +#define DOSPTYP_FAT16C 0xe /* 16-bit FAT, CHS-mapped */ #include <sys/dkbad.h> struct cpu_disklabel { diff --git a/sys/arch/i386/include/gdt.h b/sys/arch/i386/include/gdt.h index 88d6d777430..ebb8d5b0d57 100644 --- a/sys/arch/i386/include/gdt.h +++ b/sys/arch/i386/include/gdt.h @@ -1,3 +1,42 @@ +/* $OpenBSD: gdt.h,v 1.2 1996/04/18 19:21:37 niklas Exp $ */ +/* $NetBSD: gdt.h,v 1.3 1996/02/27 22:32:11 jtc Exp $ */ + +/*- + * Copyright (c) 1996 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by John T. Kohl and Charles M. Hannum. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void tss_alloc __P((struct pcb *)); void tss_free __P((struct pcb *)); void ldt_alloc __P((struct pcb *, union descriptor *, size_t)); diff --git a/sys/arch/i386/include/param.h b/sys/arch/i386/include/param.h index a18a047cb29..7fdea524187 100644 --- a/sys/arch/i386/include/param.h +++ b/sys/arch/i386/include/param.h @@ -1,4 +1,5 @@ -/* $NetBSD: param.h,v 1.27 1996/02/01 22:30:47 mycroft Exp $ */ +/* $OpenBSD: param.h,v 1.3 1996/04/18 19:21:38 niklas Exp $ */ +/* $NetBSD: param.h,v 1.29 1996/03/04 05:04:26 cgd Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -50,9 +51,11 @@ #endif #endif -#define MACHINE "i386" -#define MACHINE_ARCH "i386" -#define MID_MACHINE MID_I386 +#define _MACHINE i386 +#define MACHINE "i386" +#define _MACHINE_ARCH i386 +#define MACHINE_ARCH "i386" +#define MID_MACHINE MID_I386 /* * Round p (pointer or byte index) up to a correctly-aligned value diff --git a/sys/arch/i386/include/pio.h b/sys/arch/i386/include/pio.h index d3614747cc9..b712e3afaeb 100644 --- a/sys/arch/i386/include/pio.h +++ b/sys/arch/i386/include/pio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pio.h,v 1.3 1996/04/17 05:19:03 mickey Exp $ */ +/* $OpenBSD: pio.h,v 1.4 1996/04/18 19:21:40 niklas Exp $ */ /* $NetBSD: pio.h,v 1.13 1996/03/08 20:15:23 cgd Exp $ */ /* diff --git a/sys/arch/i386/include/vm86.h b/sys/arch/i386/include/vm86.h index a996017ceba..67a584be27e 100644 --- a/sys/arch/i386/include/vm86.h +++ b/sys/arch/i386/include/vm86.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vm86.h,v 1.2 1996/04/17 05:19:04 mickey Exp $ */ +/* $OpenBSD: vm86.h,v 1.3 1996/04/18 19:21:42 niklas Exp $ */ /* $NetBSD: vm86.h,v 1.4 1996/04/11 10:07:25 mycroft Exp $ */ #define VM86_USE_VIF |