From cd1690b985b138473a097f574c9241e362c15a5c Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sun, 12 Jun 2005 20:55:14 +0000 Subject: [PATCH] Remove PC98 support. --- etc/Makefile | 3 +- sys/bus/isa/i386/isa.c | 104 +---- sys/bus/isa/i386/isa.h | 6 +- sys/bus/isa/isareg.h | 6 +- sys/bus/isa/isavar.h | 15 +- sys/bus/isa/pnp.c | 43 +- sys/bus/isa/pnpreg.h | 7 +- sys/i386/include/apm_bios.h | 15 +- sys/i386/include/bus.h | 10 +- sys/i386/include/bus_pc98.h | 518 ------------------------- sys/i386/include/clock.h | 4 +- sys/i386/include/md_var.h | 6 +- sys/i386/include/pc/display.h | 7 +- sys/i386/include/pci_cfgreg.h | 6 +- sys/platform/pc32/include/apm_bios.h | 15 +- sys/platform/pc32/include/bus.h | 10 +- sys/platform/pc32/include/bus_pc98.h | 518 ------------------------- sys/platform/pc32/include/clock.h | 4 +- sys/platform/pc32/include/md_var.h | 6 +- sys/platform/pc32/include/pc/display.h | 7 +- sys/platform/pc32/include/pci_cfgreg.h | 6 +- 21 files changed, 23 insertions(+), 1293 deletions(-) delete mode 100644 sys/i386/include/bus_pc98.h delete mode 100644 sys/platform/pc32/include/bus_pc98.h diff --git a/etc/Makefile b/etc/Makefile index 7e26779fc2..6601d6743c 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,6 +1,6 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD: src/etc/Makefile,v 1.219.2.38 2003/03/04 09:49:00 ru Exp $ -# $DragonFly: src/etc/Makefile,v 1.59 2005/05/30 00:54:46 swildner Exp $ +# $DragonFly: src/etc/Makefile,v 1.60 2005/06/12 20:55:14 swildner Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail @@ -250,6 +250,7 @@ upgrade_etc: preupgrade rm -rf ${DESTDIR}/usr/share/misc/pcvtfonts rm -rf ${DESTDIR}/usr/share/pcvt rm -f ${DESTDIR}/usr/share/man/{man,cat}1/battd.1.gz + rm -f ${DESTDIR}/usr/include/machine/bus_pc98.h ldconfig -R distribution: diff --git a/sys/bus/isa/i386/isa.c b/sys/bus/isa/i386/isa.c index 586bb2ef25..cd48d548e4 100644 --- a/sys/bus/isa/i386/isa.c +++ b/sys/bus/isa/i386/isa.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/isa.c,v 1.132.2.5 2002/03/03 05:42:50 nyan Exp $ - * $DragonFly: src/sys/bus/isa/i386/isa.c,v 1.6 2005/05/24 20:58:50 dillon Exp $ + * $DragonFly: src/sys/bus/isa/i386/isa.c,v 1.7 2005/06/12 20:55:14 swildner Exp $ */ /* @@ -134,115 +134,13 @@ isa_alloc_resource(device_t bus, device_t child, int type, int *rid, start, end, count, flags); } -#ifdef PC98 -/* - * Indirection support. The type of bus_space_handle_t is - * defined in sys/i386/include/bus_pc98.h. - */ -struct resource * -isa_alloc_resourcev(device_t child, int type, int *rid, - bus_addr_t *res, bus_size_t count, u_int flags) -{ - struct isa_device* idev = DEVTOISA(child); - struct resource_list *rl = &idev->id_resources; - - device_t bus = device_get_parent(child); - bus_addr_t start; - struct resource *re; - struct resource **bsre; - int i, j, k, linear_cnt, ressz, bsrid; - - start = bus_get_resource_start(child, type, *rid); - - linear_cnt = count; - ressz = 1; - for (i = 1; i < count; ++i) { - if (res[i] != res[i - 1] + 1) { - if (i < linear_cnt) - linear_cnt = i; - ++ressz; - } - } - - re = isa_alloc_resource(bus, child, type, rid, - start + res[0], start + res[linear_cnt - 1], - linear_cnt, flags); - if (re == NULL) - return NULL; - - bsre = malloc(sizeof(struct resource *) * ressz, M_DEVBUF, M_INTWAIT); - bsre[0] = re; - - for (i = linear_cnt, k = 1; i < count; i = j, k++) { - for (j = i + 1; j < count; j++) { - if (res[j] != res[j - 1] + 1) - break; - } - bsrid = *rid + k; - bsre[k] = isa_alloc_resource(bus, child, type, &bsrid, - start + res[i], start + res[j - 1], j - i, flags); - if (bsre[k] == NULL) { - for (k--; k >= 0; k--) - resource_list_release(rl, bus, child, type, - *rid + k, bsre[k]); - free(bsre, M_DEVBUF); - return NULL; - } - } - - re->r_bushandle->bsh_res = bsre; - re->r_bushandle->bsh_ressz = ressz; - - return re; -} - -int -isa_load_resourcev(struct resource *re, bus_addr_t *res, bus_size_t count) -{ - bus_addr_t start; - int i; - - if (count > re->r_bushandle->bsh_maxiatsz) { - printf("isa_load_resourcev: map size too large\n"); - return EINVAL; - } - - start = rman_get_start(re); - for (i = 0; i < re->r_bushandle->bsh_maxiatsz; i++) { - if (i < count) - re->r_bushandle->bsh_iat[i] = start + res[i]; - else - re->r_bushandle->bsh_iat[i] = start; - } - - re->r_bushandle->bsh_iatsz = count; - re->r_bushandle->bsh_bam = re->r_bustag->bs_ra; /* relocate access */ - - return 0; -} -#endif /* PC98 */ - int isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { struct isa_device* idev = DEVTOISA(child); struct resource_list *rl = &idev->id_resources; -#ifdef PC98 - /* - * Indirection support. The type of bus_space_handle_t is - * defined in sys/i386/include/bus_pc98.h. - */ - int i; - if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { - for (i = 1; i < r->r_bushandle->bsh_ressz; i++) - resource_list_release(rl, bus, child, type, rid + i, - r->r_bushandle->bsh_res[i]); - if (r->r_bushandle->bsh_res != NULL) - free(r->r_bushandle->bsh_res, M_DEVBUF); - } -#endif return resource_list_release(rl, bus, child, type, rid, r); } diff --git a/sys/bus/isa/i386/isa.h b/sys/bus/isa/i386/isa.h index 1bf15759cb..d83c5236cb 100644 --- a/sys/bus/isa/i386/isa.h +++ b/sys/bus/isa/i386/isa.h @@ -35,13 +35,9 @@ * * from: @(#)isa.h 5.7 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/isa/isa.h,v 1.23 1999/08/28 00:44:54 peter Exp $ - * $DragonFly: src/sys/bus/isa/i386/isa.h,v 1.3 2003/06/29 03:28:43 dillon Exp $ + * $DragonFly: src/sys/bus/isa/i386/isa.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ */ -#ifdef PC98 -#error isa.h is included from PC-9801 source -#endif - #ifndef _I386_ISA_ISA_H_ #define _I386_ISA_ISA_H_ diff --git a/sys/bus/isa/isareg.h b/sys/bus/isa/isareg.h index 83623a62a7..44a9fbdc8a 100644 --- a/sys/bus/isa/isareg.h +++ b/sys/bus/isa/isareg.h @@ -35,13 +35,9 @@ * * from: @(#)isa.h 5.7 (Berkeley) 5/9/91 * $FreeBSD: src/sys/isa/isareg.h,v 1.4.2.1 2000/07/18 20:39:05 dfr Exp $ - * $DragonFly: src/sys/bus/isa/isareg.h,v 1.3 2003/06/29 03:28:44 dillon Exp $ + * $DragonFly: src/sys/bus/isa/isareg.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ */ -#ifdef PC98 -#error isa.h is included from PC-9801 source -#endif - #ifndef _ISA_ISA_H_ #define _ISA_ISA_H_ diff --git a/sys/bus/isa/isavar.h b/sys/bus/isa/isavar.h index aa5d1c55d0..edc048b18b 100644 --- a/sys/bus/isa/isavar.h +++ b/sys/bus/isa/isavar.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/isa/isavar.h,v 1.16.2.2 2000/10/29 13:07:56 nyan Exp $ - * $DragonFly: src/sys/bus/isa/isavar.h,v 1.7 2004/07/17 10:47:27 hmp Exp $ + * $DragonFly: src/sys/bus/isa/isavar.h,v 1.8 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _ISA_ISAVAR_H_ @@ -175,19 +175,6 @@ extern int isa_dmastop (int chan); int isab_attach(device_t dev); -#ifdef PC98 -#include - -/* - * Allocate discontinuous resources for ISA bus. - */ -struct resource * -isa_alloc_resourcev(device_t child, int type, int *rid, - bus_addr_t *res, bus_size_t count, u_int flags); -int -isa_load_resourcev(struct resource *re, bus_addr_t *res, bus_size_t count); -#endif - #endif /* _KERNEL */ #endif /* !_ISA_ISAVAR_H_ */ diff --git a/sys/bus/isa/pnp.c b/sys/bus/isa/pnp.c index fd928f542f..44e0234565 100644 --- a/sys/bus/isa/pnp.c +++ b/sys/bus/isa/pnp.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/isa/pnp.c,v 1.5.2.1 2002/10/14 09:31:09 nyan Exp $ - * $DragonFly: src/sys/bus/isa/pnp.c,v 1.5 2004/04/07 05:54:32 dillon Exp $ + * $DragonFly: src/sys/bus/isa/pnp.c,v 1.6 2005/06/12 20:55:14 swildner Exp $ * from: pnp.c,v 1.11 1999/05/06 22:11:19 peter Exp */ @@ -99,17 +99,6 @@ struct pnp_quirk pnp_quirks[] = { { 0 } }; -#ifdef PC98 -/* Some NEC PnP cards have 9 bytes serial code. */ -static pnp_id necids[] = { - {0x4180a3b8, 0xffffffff, 0x00}, /* PC-9801CB-B04 (NEC8041) */ - {0x5181a3b8, 0xffffffff, 0x46}, /* PC-9821CB2-B04(NEC8151) */ - {0x5182a3b8, 0xffffffff, 0xb8}, /* PC-9801-XX (NEC8251) */ - {0x9181a3b8, 0xffffffff, 0x00}, /* PC-9801-120 (NEC8191) */ - {0, 0, 0} -}; -#endif - #if 0 /* * these entries are initialized using the autoconfig menu @@ -686,10 +675,6 @@ pnp_isolation_protocol(device_t parent) u_char *resources = 0; int space = 0; int error; -#ifdef PC98 - int n, necpnp; - u_char buffer[10]; -#endif /* * Put all cards into the Sleep state so that we can clear @@ -731,31 +716,7 @@ pnp_isolation_protocol(device_t parent) * logical devices on the card. */ pnp_write(PNP_SET_CSN, csn); -#ifdef PC98 - if (bootverbose) - printf("PnP Vendor ID = %x\n", id.vendor_id); - /* Check for NEC PnP (9 bytes serial). */ - for (n = necpnp = 0; necids[n].vendor_id; n++) { - if (id.vendor_id == necids[n].vendor_id) { - necpnp = 1; - break; - } - } - if (necpnp) { - if (bootverbose) - printf("It seems to NEC-PnP card (%s).\n", - pnp_eisaformat(id.vendor_id)); - /* Read dummy 9 bytes serial area. */ - pnp_get_resource_info(buffer, 9); - } else { - if (bootverbose) - printf("It seems to Normal-ISA-PnP card (%s).\n", - pnp_eisaformat(id.vendor_id)); - } - if (bootverbose) - printf("Reading PnP configuration for %s.\n", - pnp_eisaformat(id.vendor_id)); -#endif + error = pnp_read_resources(&resources, &space, &len); diff --git a/sys/bus/isa/pnpreg.h b/sys/bus/isa/pnpreg.h index cd6ad6ea1b..d10107e07e 100644 --- a/sys/bus/isa/pnpreg.h +++ b/sys/bus/isa/pnpreg.h @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/isa/pnpreg.h,v 1.3.2.1 2000/05/11 11:10:35 nyan Exp $ - * $DragonFly: src/sys/bus/isa/pnpreg.h,v 1.2 2003/06/17 04:28:40 dillon Exp $ + * $DragonFly: src/sys/bus/isa/pnpreg.h,v 1.3 2005/06/12 20:55:14 swildner Exp $ * from: pnp.h,v 1.7 1998/09/13 22:15:44 eivind Exp */ @@ -49,13 +49,8 @@ #endif /* Static ports to access PnP state machine */ -#ifdef PC98 -#define _PNP_ADDRESS 0x259 -#define _PNP_WRITE_DATA 0xa59 -#else #define _PNP_ADDRESS 0x279 #define _PNP_WRITE_DATA 0xa79 -#endif /* PnP Registers. Write to ADDRESS and then use WRITE/READ_DATA */ #define PNP_SET_RD_DATA 0x00 diff --git a/sys/i386/include/apm_bios.h b/sys/i386/include/apm_bios.h index 8f6028d6ac..cca1a3ebf2 100644 --- a/sys/i386/include/apm_bios.h +++ b/sys/i386/include/apm_bios.h @@ -13,7 +13,7 @@ * Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * * $FreeBSD: src/sys/i386/include/apm_bios.h,v 1.27.2.2 2002/04/12 16:47:00 bmah Exp $ - * $DragonFly: src/sys/i386/include/Attic/apm_bios.h,v 1.3 2003/08/26 21:42:18 rob Exp $ + * $DragonFly: src/sys/i386/include/Attic/apm_bios.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _MACHINE_APM_BIOS_H_ @@ -25,13 +25,8 @@ #include /* BIOS id */ -#ifdef PC98 -#define APM_BIOS 0x9a -#define APM_INT 0x1f -#else #define APM_BIOS 0x53 #define APM_INT 0x15 -#endif /* APM flags */ #define APM_16BIT_SUPPORT 0x01 @@ -54,19 +49,11 @@ #define APM_SETPWSTATE 0x07 #define APM_ENABLEDISABLEPM 0x08 #define APM_RESTOREDEFAULT 0x09 -#ifdef PC98 -#define APM_GETPWSTATUS 0x3a -#else #define APM_GETPWSTATUS 0x0a -#endif #define APM_GETPMEVENT 0x0b #define APM_GETPWSTATE 0x0c #define APM_ENABLEDISABLEDPM 0x0d -#ifdef PC98 -#define APM_DRVVERSION 0x3e -#else #define APM_DRVVERSION 0x0e -#endif #define APM_ENGAGEDISENGAGEPM 0x0f #define APM_GETCAPABILITIES 0x10 #define APM_RESUMETIMER 0x11 diff --git a/sys/i386/include/bus.h b/sys/i386/include/bus.h index e38d4e092d..0e0a5daa83 100644 --- a/sys/i386/include/bus.h +++ b/sys/i386/include/bus.h @@ -29,23 +29,17 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/bus.h,v 1.7.2.2 2002/03/03 05:42:50 nyan Exp $ - * $DragonFly: src/sys/i386/include/Attic/bus.h,v 1.4 2004/05/07 14:37:31 joerg Exp $ + * $DragonFly: src/sys/i386/include/Attic/bus.h,v 1.5 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _I386_BUS_H_ #define _I386_BUS_H_ -#ifdef PC98 -/* NEC PC-98 */ -#include "bus_pc98.h" -#else -/* IBM-PC */ #include "bus_at386.h" -#endif #include "bus_dma.h" /* - * Stream accesses are the same as normal accesses on i386/pc98; there are no + * Stream accesses are the same as normal accesses on i386; there are no * supported bus systems with an endianess different from the host one. */ #define bus_space_read_stream_1(t, h, o) bus_space_read_1((t), (h), (o)) diff --git a/sys/i386/include/bus_pc98.h b/sys/i386/include/bus_pc98.h deleted file mode 100644 index 6f9c3540e9..0000000000 --- a/sys/i386/include/bus_pc98.h +++ /dev/null @@ -1,518 +0,0 @@ -/* $FreeBSD: src/sys/i386/include/bus_pc98.h,v 1.8.2.5 2002/03/03 05:42:50 nyan Exp $ */ -/* $DragonFly: src/sys/i386/include/Attic/bus_pc98.h,v 1.4 2003/08/26 21:42:18 rob Exp $ */ -/* $NecBSD: busio.h,v 3.25.4.2.2.1 2000/06/12 03:53:08 honda Exp $ */ -/* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */ - -/* - * [NetBSD for NEC PC-98 series] - * Copyright (c) 1997, 1998 - * NetBSD/pc98 porting staff. All rights reserved. - * - * [Ported for FreeBSD] - * Copyright (c) 2001 - * TAKAHASHI Yoshihiro. 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. 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. - */ - -/* - * Copyright (c) 1997, 1998 - * Naofumi HONDA. All rights reserved. - * - * This module support generic bus address relocation mechanism. - * To reduce a function call overhead, we employ pascal call methods. - */ - -#ifndef _I386_BUS_PC98_H_ -#define _I386_BUS_PC98_H_ - -#include - -#include "cpufunc.h" - -/* - * Bus address and size types - */ -typedef u_int bus_addr_t; -typedef u_int bus_size_t; - -#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF -#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXSIZE (64 * 1024) /* Maximum supported size */ -#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF -#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFF - -#define BUS_SPACE_UNRESTRICTED (~0) - -#define BUS_SPACE_IAT_MAXSIZE 32 - -/* - * Access methods for bus resources and address space. - */ -struct resource; - -/* - * bus space tag - */ -#define _PASCAL_CALL (void) - -#define _BUS_SPACE_CALL_FUNCS_TAB(NAME,TYPE,BWN) \ - NAME##_space_read_##BWN##, \ - NAME##_space_read_multi_##BWN##, \ - NAME##_space_read_region_##BWN##, \ - NAME##_space_write_##BWN##, \ - NAME##_space_write_multi_##BWN##, \ - NAME##_space_write_region_##BWN##, \ - NAME##_space_set_multi_##BWN##, \ - NAME##_space_set_region_##BWN##, \ - NAME##_space_copy_region_##BWN - -#define _BUS_SPACE_CALL_FUNCS_PROTO(NAME,TYPE,BWN) \ - TYPE NAME##_space_read_##BWN _PASCAL_CALL; \ - void NAME##_space_read_multi_##BWN _PASCAL_CALL; \ - void NAME##_space_read_region_##BWN _PASCAL_CALL; \ - void NAME##_space_write_##BWN _PASCAL_CALL; \ - void NAME##_space_write_multi_##BWN _PASCAL_CALL; \ - void NAME##_space_write_region_##BWN _PASCAL_CALL; \ - void NAME##_space_set_multi_##BWN _PASCAL_CALL; \ - void NAME##_space_set_region_##BWN _PASCAL_CALL; \ - void NAME##_space_copy_region_##BWN _PASCAL_CALL; - -#define _BUS_SPACE_CALL_FUNCS(NAME,TYPE,BWN) \ - TYPE (*##NAME##_read_##BWN) _PASCAL_CALL; \ - void (*##NAME##_read_multi_##BWN) _PASCAL_CALL; \ - void (*##NAME##_read_region_##BWN) _PASCAL_CALL; \ - void (*##NAME##_write_##BWN) _PASCAL_CALL; \ - void (*##NAME##_write_multi_##BWN) _PASCAL_CALL; \ - void (*##NAME##_write_region_##BWN) _PASCAL_CALL; \ - void (*##NAME##_set_multi_##BWN) _PASCAL_CALL; \ - void (*##NAME##_set_region_##BWN) _PASCAL_CALL; \ - void (*##NAME##_copy_region_##BWN) _PASCAL_CALL; - -struct bus_space_access_methods { - /* 8 bits access methods */ - _BUS_SPACE_CALL_FUNCS(bs,u_int8_t,1) - - /* 16 bits access methods */ - _BUS_SPACE_CALL_FUNCS(bs,u_int16_t,2) - - /* 32 bits access methods */ - _BUS_SPACE_CALL_FUNCS(bs,u_int32_t,4) -}; - -struct bus_space_tag { -#define BUS_SPACE_IO 0 -#define BUS_SPACE_MEM 1 - u_int bs_tag; /* bus space flags */ - - struct bus_space_access_methods bs_da; /* direct access */ - struct bus_space_access_methods bs_ra; /* relocate access */ -#if 0 - struct bus_space_access_methods bs_ida; /* indexed direct access */ -#endif -}; -typedef struct bus_space_tag *bus_space_tag_t; - -/* - * Values for the i386 bus space tag, not to be used directly by MI code. - */ -extern struct bus_space_tag SBUS_io_space_tag; -extern struct bus_space_tag SBUS_mem_space_tag; - -#define I386_BUS_SPACE_IO (&SBUS_io_space_tag) -#define I386_BUS_SPACE_MEM (&SBUS_mem_space_tag) - -/* - * bus space handle - */ -struct bus_space_handle { - bus_addr_t bsh_base; - size_t bsh_sz; - - bus_addr_t bsh_iat[BUS_SPACE_IAT_MAXSIZE]; - size_t bsh_maxiatsz; - size_t bsh_iatsz; - - struct resource **bsh_res; - size_t bsh_ressz; - - struct bus_space_access_methods bsh_bam; -}; -typedef struct bus_space_handle *bus_space_handle_t; - -/* - * Allocate/Free bus_space_handle - */ -int i386_bus_space_handle_alloc(bus_space_tag_t t, bus_addr_t bpa, - bus_size_t size, bus_space_handle_t *bshp); -void i386_bus_space_handle_free(bus_space_tag_t t, bus_space_handle_t bsh, - size_t size); - -/* - * int bus_space_unmap (bus_space_tag_t t, - * bus_space_handle_t bsh, bus_size_t size); - * - * Unmap a region of bus space. - */ - -void i386_memio_unmap(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); - -#define bus_space_unmap(t, h, s) \ - i386_memio_unmap((t), (h), (s)) - -/* - * int bus_space_subregion (bus_space_tag_t t, - * bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, - * bus_space_handle_t *nbshp); - * - * Get a new handle for a subregion of an already-mapped area of bus space. - */ - -int i386_memio_subregion(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t offset, bus_size_t size, - bus_space_handle_t *nbshp); - -#define bus_space_subregion(t, h, o, s, nhp) \ - i386_memio_subregion((t), (h), (o), (s), (nhp)) - -/* - * int bus_space_free (bus_space_tag_t t, - * bus_space_handle_t bsh, bus_size_t size); - * - * Free a region of bus space. - */ - -void i386_memio_free(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); - -#define bus_space_free(t, h, s) \ - i386_memio_free((t), (h), (s)) - -/* - * Access methods for bus resources and address space. - */ -#define _BUS_ACCESS_METHODS_PROTO(TYPE,BWN) \ - static __inline TYPE bus_space_read_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t offset); \ - static __inline void bus_space_read_multi_##BWN \ - (bus_space_tag_t, bus_space_handle_t, \ - bus_size_t, TYPE *, size_t); \ - static __inline void bus_space_read_region_##BWN \ - (bus_space_tag_t, bus_space_handle_t, \ - bus_size_t, TYPE *, size_t); \ - static __inline void bus_space_write_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, TYPE); \ - static __inline void bus_space_write_multi_##BWN \ - (bus_space_tag_t, bus_space_handle_t, \ - bus_size_t, const TYPE *, size_t); \ - static __inline void bus_space_write_region_##BWN \ - (bus_space_tag_t, bus_space_handle_t, \ - bus_size_t, const TYPE *, size_t); \ - static __inline void bus_space_set_multi_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, TYPE, size_t);\ - static __inline void bus_space_set_region_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, TYPE, size_t);\ - static __inline void bus_space_copy_region_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ - bus_space_handle_t, bus_size_t, size_t); - -_BUS_ACCESS_METHODS_PROTO(u_int8_t,1) -_BUS_ACCESS_METHODS_PROTO(u_int16_t,2) -_BUS_ACCESS_METHODS_PROTO(u_int32_t,4) - -/* - * read methods - */ -#define _BUS_SPACE_READ(TYPE,BWN) \ -static __inline TYPE \ -bus_space_read_##BWN##(tag, bsh, offset) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ -{ \ - register TYPE result; \ - \ - __asm __volatile("call *%2" \ - :"=a" (result), \ - "=d" (offset) \ - :"o" (bsh->bsh_bam.bs_read_##BWN), \ - "b" (bsh), \ - "1" (offset) \ - ); \ - \ - return result; \ -} - -_BUS_SPACE_READ(u_int8_t,1) -_BUS_SPACE_READ(u_int16_t,2) -_BUS_SPACE_READ(u_int32_t,4) - -/* - * write methods - */ -#define _BUS_SPACE_WRITE(TYPE,BWN) \ -static __inline void \ -bus_space_write_##BWN##(tag, bsh, offset, val) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ -{ \ - \ - __asm __volatile("call *%1" \ - :"=d" (offset) \ - :"o" (bsh->bsh_bam.bs_write_##BWN), \ - "a" (val), \ - "b" (bsh), \ - "0" (offset) \ - ); \ -} - -_BUS_SPACE_WRITE(u_int8_t,1) -_BUS_SPACE_WRITE(u_int16_t,2) -_BUS_SPACE_WRITE(u_int32_t,4) - -/* - * multi read - */ -#define _BUS_SPACE_READ_MULTI(TYPE,BWN) \ -static __inline void \ -bus_space_read_multi_##BWN##(tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE *buf; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=d" (offset), \ - "=D" (buf) \ - :"o" (bsh->bsh_bam.bs_read_multi_##BWN), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset), \ - "2" (buf) \ - :"memory"); \ -} - -_BUS_SPACE_READ_MULTI(u_int8_t,1) -_BUS_SPACE_READ_MULTI(u_int16_t,2) -_BUS_SPACE_READ_MULTI(u_int32_t,4) - -/* - * multi write - */ -#define _BUS_SPACE_WRITE_MULTI(TYPE,BWN) \ -static __inline void \ -bus_space_write_multi_##BWN##(tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - const TYPE *buf; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=d" (offset), \ - "=S" (buf) \ - :"o" (bsh->bsh_bam.bs_write_multi_##BWN), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset), \ - "2" (buf) \ - ); \ -} - -_BUS_SPACE_WRITE_MULTI(u_int8_t,1) -_BUS_SPACE_WRITE_MULTI(u_int16_t,2) -_BUS_SPACE_WRITE_MULTI(u_int32_t,4) - -/* - * region read - */ -#define _BUS_SPACE_READ_REGION(TYPE,BWN) \ -static __inline void \ -bus_space_read_region_##BWN##(tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE *buf; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=d" (offset), \ - "=D" (buf) \ - :"o" (bsh->bsh_bam.bs_read_region_##BWN), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset), \ - "2" (buf) \ - :"memory"); \ -} - -_BUS_SPACE_READ_REGION(u_int8_t,1) -_BUS_SPACE_READ_REGION(u_int16_t,2) -_BUS_SPACE_READ_REGION(u_int32_t,4) - -/* - * region write - */ -#define _BUS_SPACE_WRITE_REGION(TYPE,BWN) \ -static __inline void \ -bus_space_write_region_##BWN##(tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - const TYPE *buf; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=d" (offset), \ - "=S" (buf) \ - :"o" (bsh->bsh_bam.bs_write_region_##BWN), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset), \ - "2" (buf) \ - ); \ -} - -_BUS_SPACE_WRITE_REGION(u_int8_t,1) -_BUS_SPACE_WRITE_REGION(u_int16_t,2) -_BUS_SPACE_WRITE_REGION(u_int32_t,4) - -/* - * multi set - */ -#define _BUS_SPACE_SET_MULTI(TYPE,BWN) \ -static __inline void \ -bus_space_set_multi_##BWN##(tag, bsh, offset, val, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%2" \ - :"=c" (cnt), \ - "=d" (offset) \ - :"o" (bsh->bsh_bam.bs_set_multi_##BWN), \ - "a" (val), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset) \ - ); \ -} - -_BUS_SPACE_SET_MULTI(u_int8_t,1) -_BUS_SPACE_SET_MULTI(u_int16_t,2) -_BUS_SPACE_SET_MULTI(u_int32_t,4) - -/* - * region set - */ -#define _BUS_SPACE_SET_REGION(TYPE,BWN) \ -static __inline void \ -bus_space_set_region_##BWN##(tag, bsh, offset, val, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%2" \ - :"=c" (cnt), \ - "=d" (offset) \ - :"o" (bsh->bsh_bam.bs_set_region_##BWN), \ - "a" (val), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset) \ - ); \ -} - -_BUS_SPACE_SET_REGION(u_int8_t,1) -_BUS_SPACE_SET_REGION(u_int16_t,2) -_BUS_SPACE_SET_REGION(u_int32_t,4) - -/* - * copy - */ -#define _BUS_SPACE_COPY_REGION(BWN) \ -static __inline void \ -bus_space_copy_region_##BWN##(tag, sbsh, src, dbsh, dst, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t sbsh; \ - bus_size_t src; \ - bus_space_handle_t dbsh; \ - bus_size_t dst; \ - size_t cnt; \ -{ \ - \ - if (dbsh->bsh_bam.bs_copy_region_1 != sbsh->bsh_bam.bs_copy_region_1) \ - panic("bus_space_copy_region: funcs mismatch (ENOSUPPORT)");\ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=S" (src), \ - "=D" (dst) \ - :"o" (dbsh->bsh_bam.bs_copy_region_##BWN), \ - "a" (sbsh), \ - "b" (dbsh), \ - "0" (cnt), \ - "1" (src), \ - "2" (dst) \ - ); \ -} - -_BUS_SPACE_COPY_REGION(1) -_BUS_SPACE_COPY_REGION(2) -_BUS_SPACE_COPY_REGION(4) - -/* - * Bus read/write barrier methods. - * - * void bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, - * bus_size_t offset, bus_size_t len, int flags); - * - * Note: the i386 does not currently require barriers, but we must - * provide the flags to MI code. - */ -#define bus_space_barrier(t, h, o, l, f) \ - ((void)((void)(t), (void)(h), (void)(o), (void)(l), (void)(f))) -#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ -#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ - -#endif /* _I386_BUS_PC98_H_ */ diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index 411751d4ee..4629f21370 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -4,7 +4,7 @@ * This file is in the public domain. * * $FreeBSD: src/sys/i386/include/clock.h,v 1.38.2.1 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/i386/include/Attic/clock.h,v 1.5 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/clock.h,v 1.6 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -31,9 +31,7 @@ extern int apic_8254_intr; * Driver to clock driver interface. */ -#ifndef PC98 int rtcin (int val); -#endif int acquire_timer2 (int mode); int release_timer2 (void); int sysbeep (int pitch, int period); diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index e5d5e89929..033bbbf2dc 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/md_var.h,v 1.35.2.4 2003/01/22 20:14:53 jhb Exp $ - * $DragonFly: src/sys/i386/include/Attic/md_var.h,v 1.13 2004/04/29 17:25:00 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/md_var.h,v 1.14 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -55,10 +55,6 @@ extern u_int cpu_procinfo; extern char cpu_vendor[]; extern u_int cyrix_did; extern char kstack[]; -#ifdef PC98 -extern int need_pre_dma_flush; -extern int need_post_dma_flush; -#endif extern int nfs_diskless_valid; extern void **ovbcopy_vector; extern char sigcode[]; diff --git a/sys/i386/include/pc/display.h b/sys/i386/include/pc/display.h index 5d439a8e6a..992377f837 100644 --- a/sys/i386/include/pc/display.h +++ b/sys/i386/include/pc/display.h @@ -2,7 +2,7 @@ * IBM PC display definitions * * $FreeBSD: src/sys/i386/include/pc/display.h,v 1.5.2.1 2001/12/17 10:31:05 nyan Exp $ - * $DragonFly: src/sys/i386/include/pc/Attic/display.h,v 1.2 2003/06/17 04:28:36 dillon Exp $ + * $DragonFly: src/sys/i386/include/pc/Attic/display.h,v 1.3 2005/06/12 20:55:14 swildner Exp $ */ /* Color attributes for foreground text */ @@ -38,12 +38,7 @@ /* Monochrome attributes for foreground text */ -#ifdef PC98 -/* PC-98 attributes for foreground text */ -#define FG_UNDERLINE 0x08 -#else #define FG_UNDERLINE 0x01 -#endif #define FG_INTENSE 0x08 /* Monochrome attributes for text background */ diff --git a/sys/i386/include/pci_cfgreg.h b/sys/i386/include/pci_cfgreg.h index 53a2f447e5..ad7540d935 100644 --- a/sys/i386/include/pci_cfgreg.h +++ b/sys/i386/include/pci_cfgreg.h @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/pci_cfgreg.h,v 1.4.2.1 2001/07/28 05:55:07 imp Exp $ - * $DragonFly: src/sys/i386/include/Attic/pci_cfgreg.h,v 1.3 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/pci_cfgreg.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ * */ @@ -42,11 +42,7 @@ #define CONF1_ENABLE_RES1 0x80000000ul #define CONF2_ENABLE_PORT 0x0cf8 -#ifdef PC98 -#define CONF2_FORWARD_PORT 0x0cf9 -#else #define CONF2_FORWARD_PORT 0x0cfa -#endif #define CONF2_ENABLE_CHK 0x0e #define CONF2_ENABLE_RES 0x0e diff --git a/sys/platform/pc32/include/apm_bios.h b/sys/platform/pc32/include/apm_bios.h index 2867f0662c..5366842026 100644 --- a/sys/platform/pc32/include/apm_bios.h +++ b/sys/platform/pc32/include/apm_bios.h @@ -13,7 +13,7 @@ * Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * * $FreeBSD: src/sys/i386/include/apm_bios.h,v 1.27.2.2 2002/04/12 16:47:00 bmah Exp $ - * $DragonFly: src/sys/platform/pc32/include/apm_bios.h,v 1.3 2003/08/26 21:42:18 rob Exp $ + * $DragonFly: src/sys/platform/pc32/include/apm_bios.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _MACHINE_APM_BIOS_H_ @@ -25,13 +25,8 @@ #include /* BIOS id */ -#ifdef PC98 -#define APM_BIOS 0x9a -#define APM_INT 0x1f -#else #define APM_BIOS 0x53 #define APM_INT 0x15 -#endif /* APM flags */ #define APM_16BIT_SUPPORT 0x01 @@ -54,19 +49,11 @@ #define APM_SETPWSTATE 0x07 #define APM_ENABLEDISABLEPM 0x08 #define APM_RESTOREDEFAULT 0x09 -#ifdef PC98 -#define APM_GETPWSTATUS 0x3a -#else #define APM_GETPWSTATUS 0x0a -#endif #define APM_GETPMEVENT 0x0b #define APM_GETPWSTATE 0x0c #define APM_ENABLEDISABLEDPM 0x0d -#ifdef PC98 -#define APM_DRVVERSION 0x3e -#else #define APM_DRVVERSION 0x0e -#endif #define APM_ENGAGEDISENGAGEPM 0x0f #define APM_GETCAPABILITIES 0x10 #define APM_RESUMETIMER 0x11 diff --git a/sys/platform/pc32/include/bus.h b/sys/platform/pc32/include/bus.h index c4fd35ce83..25cedea2a5 100644 --- a/sys/platform/pc32/include/bus.h +++ b/sys/platform/pc32/include/bus.h @@ -29,23 +29,17 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/bus.h,v 1.7.2.2 2002/03/03 05:42:50 nyan Exp $ - * $DragonFly: src/sys/platform/pc32/include/Attic/bus.h,v 1.4 2004/05/07 14:37:31 joerg Exp $ + * $DragonFly: src/sys/platform/pc32/include/Attic/bus.h,v 1.5 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _I386_BUS_H_ #define _I386_BUS_H_ -#ifdef PC98 -/* NEC PC-98 */ -#include "bus_pc98.h" -#else -/* IBM-PC */ #include "bus_at386.h" -#endif #include "bus_dma.h" /* - * Stream accesses are the same as normal accesses on i386/pc98; there are no + * Stream accesses are the same as normal accesses on i386; there are no * supported bus systems with an endianess different from the host one. */ #define bus_space_read_stream_1(t, h, o) bus_space_read_1((t), (h), (o)) diff --git a/sys/platform/pc32/include/bus_pc98.h b/sys/platform/pc32/include/bus_pc98.h deleted file mode 100644 index 0832996faa..0000000000 --- a/sys/platform/pc32/include/bus_pc98.h +++ /dev/null @@ -1,518 +0,0 @@ -/* $FreeBSD: src/sys/i386/include/bus_pc98.h,v 1.8.2.5 2002/03/03 05:42:50 nyan Exp $ */ -/* $DragonFly: src/sys/platform/pc32/include/Attic/bus_pc98.h,v 1.4 2003/08/26 21:42:18 rob Exp $ */ -/* $NecBSD: busio.h,v 3.25.4.2.2.1 2000/06/12 03:53:08 honda Exp $ */ -/* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */ - -/* - * [NetBSD for NEC PC-98 series] - * Copyright (c) 1997, 1998 - * NetBSD/pc98 porting staff. All rights reserved. - * - * [Ported for FreeBSD] - * Copyright (c) 2001 - * TAKAHASHI Yoshihiro. 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. 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. - */ - -/* - * Copyright (c) 1997, 1998 - * Naofumi HONDA. All rights reserved. - * - * This module support generic bus address relocation mechanism. - * To reduce a function call overhead, we employ pascal call methods. - */ - -#ifndef _I386_BUS_PC98_H_ -#define _I386_BUS_PC98_H_ - -#include - -#include "cpufunc.h" - -/* - * Bus address and size types - */ -typedef u_int bus_addr_t; -typedef u_int bus_size_t; - -#define BUS_SPACE_MAXSIZE_24BIT 0xFFFFFF -#define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXSIZE (64 * 1024) /* Maximum supported size */ -#define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF -#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF -#define BUS_SPACE_MAXADDR 0xFFFFFFFF - -#define BUS_SPACE_UNRESTRICTED (~0) - -#define BUS_SPACE_IAT_MAXSIZE 32 - -/* - * Access methods for bus resources and address space. - */ -struct resource; - -/* - * bus space tag - */ -#define _PASCAL_CALL (void) - -#define _BUS_SPACE_CALL_FUNCS_TAB(NAME,TYPE,BWN) \ - NAME##_space_read_##BWN##, \ - NAME##_space_read_multi_##BWN##, \ - NAME##_space_read_region_##BWN##, \ - NAME##_space_write_##BWN##, \ - NAME##_space_write_multi_##BWN##, \ - NAME##_space_write_region_##BWN##, \ - NAME##_space_set_multi_##BWN##, \ - NAME##_space_set_region_##BWN##, \ - NAME##_space_copy_region_##BWN - -#define _BUS_SPACE_CALL_FUNCS_PROTO(NAME,TYPE,BWN) \ - TYPE NAME##_space_read_##BWN _PASCAL_CALL; \ - void NAME##_space_read_multi_##BWN _PASCAL_CALL; \ - void NAME##_space_read_region_##BWN _PASCAL_CALL; \ - void NAME##_space_write_##BWN _PASCAL_CALL; \ - void NAME##_space_write_multi_##BWN _PASCAL_CALL; \ - void NAME##_space_write_region_##BWN _PASCAL_CALL; \ - void NAME##_space_set_multi_##BWN _PASCAL_CALL; \ - void NAME##_space_set_region_##BWN _PASCAL_CALL; \ - void NAME##_space_copy_region_##BWN _PASCAL_CALL; - -#define _BUS_SPACE_CALL_FUNCS(NAME,TYPE,BWN) \ - TYPE (*##NAME##_read_##BWN) _PASCAL_CALL; \ - void (*##NAME##_read_multi_##BWN) _PASCAL_CALL; \ - void (*##NAME##_read_region_##BWN) _PASCAL_CALL; \ - void (*##NAME##_write_##BWN) _PASCAL_CALL; \ - void (*##NAME##_write_multi_##BWN) _PASCAL_CALL; \ - void (*##NAME##_write_region_##BWN) _PASCAL_CALL; \ - void (*##NAME##_set_multi_##BWN) _PASCAL_CALL; \ - void (*##NAME##_set_region_##BWN) _PASCAL_CALL; \ - void (*##NAME##_copy_region_##BWN) _PASCAL_CALL; - -struct bus_space_access_methods { - /* 8 bits access methods */ - _BUS_SPACE_CALL_FUNCS(bs,u_int8_t,1) - - /* 16 bits access methods */ - _BUS_SPACE_CALL_FUNCS(bs,u_int16_t,2) - - /* 32 bits access methods */ - _BUS_SPACE_CALL_FUNCS(bs,u_int32_t,4) -}; - -struct bus_space_tag { -#define BUS_SPACE_IO 0 -#define BUS_SPACE_MEM 1 - u_int bs_tag; /* bus space flags */ - - struct bus_space_access_methods bs_da; /* direct access */ - struct bus_space_access_methods bs_ra; /* relocate access */ -#if 0 - struct bus_space_access_methods bs_ida; /* indexed direct access */ -#endif -}; -typedef struct bus_space_tag *bus_space_tag_t; - -/* - * Values for the i386 bus space tag, not to be used directly by MI code. - */ -extern struct bus_space_tag SBUS_io_space_tag; -extern struct bus_space_tag SBUS_mem_space_tag; - -#define I386_BUS_SPACE_IO (&SBUS_io_space_tag) -#define I386_BUS_SPACE_MEM (&SBUS_mem_space_tag) - -/* - * bus space handle - */ -struct bus_space_handle { - bus_addr_t bsh_base; - size_t bsh_sz; - - bus_addr_t bsh_iat[BUS_SPACE_IAT_MAXSIZE]; - size_t bsh_maxiatsz; - size_t bsh_iatsz; - - struct resource **bsh_res; - size_t bsh_ressz; - - struct bus_space_access_methods bsh_bam; -}; -typedef struct bus_space_handle *bus_space_handle_t; - -/* - * Allocate/Free bus_space_handle - */ -int i386_bus_space_handle_alloc(bus_space_tag_t t, bus_addr_t bpa, - bus_size_t size, bus_space_handle_t *bshp); -void i386_bus_space_handle_free(bus_space_tag_t t, bus_space_handle_t bsh, - size_t size); - -/* - * int bus_space_unmap (bus_space_tag_t t, - * bus_space_handle_t bsh, bus_size_t size); - * - * Unmap a region of bus space. - */ - -void i386_memio_unmap(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); - -#define bus_space_unmap(t, h, s) \ - i386_memio_unmap((t), (h), (s)) - -/* - * int bus_space_subregion (bus_space_tag_t t, - * bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, - * bus_space_handle_t *nbshp); - * - * Get a new handle for a subregion of an already-mapped area of bus space. - */ - -int i386_memio_subregion(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t offset, bus_size_t size, - bus_space_handle_t *nbshp); - -#define bus_space_subregion(t, h, o, s, nhp) \ - i386_memio_subregion((t), (h), (o), (s), (nhp)) - -/* - * int bus_space_free (bus_space_tag_t t, - * bus_space_handle_t bsh, bus_size_t size); - * - * Free a region of bus space. - */ - -void i386_memio_free(bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size); - -#define bus_space_free(t, h, s) \ - i386_memio_free((t), (h), (s)) - -/* - * Access methods for bus resources and address space. - */ -#define _BUS_ACCESS_METHODS_PROTO(TYPE,BWN) \ - static __inline TYPE bus_space_read_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t offset); \ - static __inline void bus_space_read_multi_##BWN \ - (bus_space_tag_t, bus_space_handle_t, \ - bus_size_t, TYPE *, size_t); \ - static __inline void bus_space_read_region_##BWN \ - (bus_space_tag_t, bus_space_handle_t, \ - bus_size_t, TYPE *, size_t); \ - static __inline void bus_space_write_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, TYPE); \ - static __inline void bus_space_write_multi_##BWN \ - (bus_space_tag_t, bus_space_handle_t, \ - bus_size_t, const TYPE *, size_t); \ - static __inline void bus_space_write_region_##BWN \ - (bus_space_tag_t, bus_space_handle_t, \ - bus_size_t, const TYPE *, size_t); \ - static __inline void bus_space_set_multi_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, TYPE, size_t);\ - static __inline void bus_space_set_region_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, TYPE, size_t);\ - static __inline void bus_space_copy_region_##BWN \ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ - bus_space_handle_t, bus_size_t, size_t); - -_BUS_ACCESS_METHODS_PROTO(u_int8_t,1) -_BUS_ACCESS_METHODS_PROTO(u_int16_t,2) -_BUS_ACCESS_METHODS_PROTO(u_int32_t,4) - -/* - * read methods - */ -#define _BUS_SPACE_READ(TYPE,BWN) \ -static __inline TYPE \ -bus_space_read_##BWN##(tag, bsh, offset) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ -{ \ - register TYPE result; \ - \ - __asm __volatile("call *%2" \ - :"=a" (result), \ - "=d" (offset) \ - :"o" (bsh->bsh_bam.bs_read_##BWN), \ - "b" (bsh), \ - "1" (offset) \ - ); \ - \ - return result; \ -} - -_BUS_SPACE_READ(u_int8_t,1) -_BUS_SPACE_READ(u_int16_t,2) -_BUS_SPACE_READ(u_int32_t,4) - -/* - * write methods - */ -#define _BUS_SPACE_WRITE(TYPE,BWN) \ -static __inline void \ -bus_space_write_##BWN##(tag, bsh, offset, val) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ -{ \ - \ - __asm __volatile("call *%1" \ - :"=d" (offset) \ - :"o" (bsh->bsh_bam.bs_write_##BWN), \ - "a" (val), \ - "b" (bsh), \ - "0" (offset) \ - ); \ -} - -_BUS_SPACE_WRITE(u_int8_t,1) -_BUS_SPACE_WRITE(u_int16_t,2) -_BUS_SPACE_WRITE(u_int32_t,4) - -/* - * multi read - */ -#define _BUS_SPACE_READ_MULTI(TYPE,BWN) \ -static __inline void \ -bus_space_read_multi_##BWN##(tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE *buf; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=d" (offset), \ - "=D" (buf) \ - :"o" (bsh->bsh_bam.bs_read_multi_##BWN), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset), \ - "2" (buf) \ - :"memory"); \ -} - -_BUS_SPACE_READ_MULTI(u_int8_t,1) -_BUS_SPACE_READ_MULTI(u_int16_t,2) -_BUS_SPACE_READ_MULTI(u_int32_t,4) - -/* - * multi write - */ -#define _BUS_SPACE_WRITE_MULTI(TYPE,BWN) \ -static __inline void \ -bus_space_write_multi_##BWN##(tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - const TYPE *buf; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=d" (offset), \ - "=S" (buf) \ - :"o" (bsh->bsh_bam.bs_write_multi_##BWN), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset), \ - "2" (buf) \ - ); \ -} - -_BUS_SPACE_WRITE_MULTI(u_int8_t,1) -_BUS_SPACE_WRITE_MULTI(u_int16_t,2) -_BUS_SPACE_WRITE_MULTI(u_int32_t,4) - -/* - * region read - */ -#define _BUS_SPACE_READ_REGION(TYPE,BWN) \ -static __inline void \ -bus_space_read_region_##BWN##(tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE *buf; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=d" (offset), \ - "=D" (buf) \ - :"o" (bsh->bsh_bam.bs_read_region_##BWN), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset), \ - "2" (buf) \ - :"memory"); \ -} - -_BUS_SPACE_READ_REGION(u_int8_t,1) -_BUS_SPACE_READ_REGION(u_int16_t,2) -_BUS_SPACE_READ_REGION(u_int32_t,4) - -/* - * region write - */ -#define _BUS_SPACE_WRITE_REGION(TYPE,BWN) \ -static __inline void \ -bus_space_write_region_##BWN##(tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - const TYPE *buf; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=d" (offset), \ - "=S" (buf) \ - :"o" (bsh->bsh_bam.bs_write_region_##BWN), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset), \ - "2" (buf) \ - ); \ -} - -_BUS_SPACE_WRITE_REGION(u_int8_t,1) -_BUS_SPACE_WRITE_REGION(u_int16_t,2) -_BUS_SPACE_WRITE_REGION(u_int32_t,4) - -/* - * multi set - */ -#define _BUS_SPACE_SET_MULTI(TYPE,BWN) \ -static __inline void \ -bus_space_set_multi_##BWN##(tag, bsh, offset, val, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%2" \ - :"=c" (cnt), \ - "=d" (offset) \ - :"o" (bsh->bsh_bam.bs_set_multi_##BWN), \ - "a" (val), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset) \ - ); \ -} - -_BUS_SPACE_SET_MULTI(u_int8_t,1) -_BUS_SPACE_SET_MULTI(u_int16_t,2) -_BUS_SPACE_SET_MULTI(u_int32_t,4) - -/* - * region set - */ -#define _BUS_SPACE_SET_REGION(TYPE,BWN) \ -static __inline void \ -bus_space_set_region_##BWN##(tag, bsh, offset, val, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ - size_t cnt; \ -{ \ - \ - __asm __volatile("call *%2" \ - :"=c" (cnt), \ - "=d" (offset) \ - :"o" (bsh->bsh_bam.bs_set_region_##BWN), \ - "a" (val), \ - "b" (bsh), \ - "0" (cnt), \ - "1" (offset) \ - ); \ -} - -_BUS_SPACE_SET_REGION(u_int8_t,1) -_BUS_SPACE_SET_REGION(u_int16_t,2) -_BUS_SPACE_SET_REGION(u_int32_t,4) - -/* - * copy - */ -#define _BUS_SPACE_COPY_REGION(BWN) \ -static __inline void \ -bus_space_copy_region_##BWN##(tag, sbsh, src, dbsh, dst, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t sbsh; \ - bus_size_t src; \ - bus_space_handle_t dbsh; \ - bus_size_t dst; \ - size_t cnt; \ -{ \ - \ - if (dbsh->bsh_bam.bs_copy_region_1 != sbsh->bsh_bam.bs_copy_region_1) \ - panic("bus_space_copy_region: funcs mismatch (ENOSUPPORT)");\ - \ - __asm __volatile("call *%3" \ - :"=c" (cnt), \ - "=S" (src), \ - "=D" (dst) \ - :"o" (dbsh->bsh_bam.bs_copy_region_##BWN), \ - "a" (sbsh), \ - "b" (dbsh), \ - "0" (cnt), \ - "1" (src), \ - "2" (dst) \ - ); \ -} - -_BUS_SPACE_COPY_REGION(1) -_BUS_SPACE_COPY_REGION(2) -_BUS_SPACE_COPY_REGION(4) - -/* - * Bus read/write barrier methods. - * - * void bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, - * bus_size_t offset, bus_size_t len, int flags); - * - * Note: the i386 does not currently require barriers, but we must - * provide the flags to MI code. - */ -#define bus_space_barrier(t, h, o, l, f) \ - ((void)((void)(t), (void)(h), (void)(o), (void)(l), (void)(f))) -#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ -#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ - -#endif /* _I386_BUS_PC98_H_ */ diff --git a/sys/platform/pc32/include/clock.h b/sys/platform/pc32/include/clock.h index 3767b4796d..adff0ca417 100644 --- a/sys/platform/pc32/include/clock.h +++ b/sys/platform/pc32/include/clock.h @@ -4,7 +4,7 @@ * This file is in the public domain. * * $FreeBSD: src/sys/i386/include/clock.h,v 1.38.2.1 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/include/clock.h,v 1.5 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/clock.h,v 1.6 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -31,9 +31,7 @@ extern int apic_8254_intr; * Driver to clock driver interface. */ -#ifndef PC98 int rtcin (int val); -#endif int acquire_timer2 (int mode); int release_timer2 (void); int sysbeep (int pitch, int period); diff --git a/sys/platform/pc32/include/md_var.h b/sys/platform/pc32/include/md_var.h index 5d705327e1..3c20be3593 100644 --- a/sys/platform/pc32/include/md_var.h +++ b/sys/platform/pc32/include/md_var.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/md_var.h,v 1.35.2.4 2003/01/22 20:14:53 jhb Exp $ - * $DragonFly: src/sys/platform/pc32/include/md_var.h,v 1.13 2004/04/29 17:25:00 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/md_var.h,v 1.14 2005/06/12 20:55:14 swildner Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -55,10 +55,6 @@ extern u_int cpu_procinfo; extern char cpu_vendor[]; extern u_int cyrix_did; extern char kstack[]; -#ifdef PC98 -extern int need_pre_dma_flush; -extern int need_post_dma_flush; -#endif extern int nfs_diskless_valid; extern void **ovbcopy_vector; extern char sigcode[]; diff --git a/sys/platform/pc32/include/pc/display.h b/sys/platform/pc32/include/pc/display.h index 753390535d..08d797a4e6 100644 --- a/sys/platform/pc32/include/pc/display.h +++ b/sys/platform/pc32/include/pc/display.h @@ -2,7 +2,7 @@ * IBM PC display definitions * * $FreeBSD: src/sys/i386/include/pc/display.h,v 1.5.2.1 2001/12/17 10:31:05 nyan Exp $ - * $DragonFly: src/sys/platform/pc32/include/pc/display.h,v 1.2 2003/06/17 04:28:36 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/pc/display.h,v 1.3 2005/06/12 20:55:14 swildner Exp $ */ /* Color attributes for foreground text */ @@ -38,12 +38,7 @@ /* Monochrome attributes for foreground text */ -#ifdef PC98 -/* PC-98 attributes for foreground text */ -#define FG_UNDERLINE 0x08 -#else #define FG_UNDERLINE 0x01 -#endif #define FG_INTENSE 0x08 /* Monochrome attributes for text background */ diff --git a/sys/platform/pc32/include/pci_cfgreg.h b/sys/platform/pc32/include/pci_cfgreg.h index 87817347ed..b985503283 100644 --- a/sys/platform/pc32/include/pci_cfgreg.h +++ b/sys/platform/pc32/include/pci_cfgreg.h @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/pci_cfgreg.h,v 1.4.2.1 2001/07/28 05:55:07 imp Exp $ - * $DragonFly: src/sys/platform/pc32/include/Attic/pci_cfgreg.h,v 1.3 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/Attic/pci_cfgreg.h,v 1.4 2005/06/12 20:55:14 swildner Exp $ * */ @@ -42,11 +42,7 @@ #define CONF1_ENABLE_RES1 0x80000000ul #define CONF2_ENABLE_PORT 0x0cf8 -#ifdef PC98 -#define CONF2_FORWARD_PORT 0x0cf9 -#else #define CONF2_FORWARD_PORT 0x0cfa -#endif #define CONF2_ENABLE_CHK 0x0e #define CONF2_ENABLE_RES 0x0e -- 2.41.0