diff --git a/sys/i386/include/apm_bios.h b/sys/i386/include/apm_bios.h index ac75ddf41f9a..5f0bafa8f038 100644 --- a/sys/i386/include/apm_bios.h +++ b/sys/i386/include/apm_bios.h @@ -24,13 +24,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 @@ -53,19 +48,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/md_var.h b/sys/i386/include/md_var.h index b8b38bb0f561..9510854a653b 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -53,10 +53,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 char sigcode[]; extern int szsigcode; #ifdef COMPAT_FREEBSD4 diff --git a/sys/i386/include/pci_cfgreg.h b/sys/i386/include/pci_cfgreg.h index c0f322af1e91..b246993aa6d7 100644 --- a/sys/i386/include/pci_cfgreg.h +++ b/sys/i386/include/pci_cfgreg.h @@ -38,11 +38,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/pc98/include/apm_bios.h b/sys/pc98/include/apm_bios.h index 742631e5d984..261ae3726d91 100644 --- a/sys/pc98/include/apm_bios.h +++ b/sys/pc98/include/apm_bios.h @@ -1,6 +1,55 @@ /*- - * This file is in the public domain. + * Copyright (C) 2005 M. Warner Losh. 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. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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. + * + * $FreeBSD$ */ -/* $FreeBSD$ */ +#ifndef _PC98_INCLUDE_APM_BIOS_H_ +#define _PC98_INCLUDE_APM_BIOS_H_ + +/* + * PC98 machines implement APM bios in nearly the same was as i386 machines, + * so include the i386 version and note the changes here. + */ #include + +/* + * APM BIOS and interrupt are different on pc98 + */ +#undef APM_BIOS +#undef APM_INT +#define APM_BIOS 0x9a +#define APM_INT 0x1f + + +/* + * PC98 also has different GETPWSTATUS and DRVVERSION calls. I believe that + * these only work on newer APM BIOSes, but haven't confirmed that recently + */ +#undef APM_GETPWSTATUS +#undef APM_DRVVERSION +#define APM_GETPWSTATUS 0x3a +#define APM_DRVVERSION 0x3e + +#endif /* ! _PC98_INCLUDE_APM_BIOS_H_ */ diff --git a/sys/pc98/include/md_var.h b/sys/pc98/include/md_var.h index 1f674fe3614e..7d0fb7262651 100644 --- a/sys/pc98/include/md_var.h +++ b/sys/pc98/include/md_var.h @@ -1,6 +1,41 @@ /*- - * This file is in the public domain. + * Copyright (C) 2005 M. Warner Losh. 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. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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. + * + * $FreeBSD$ */ -/* $FreeBSD$ */ + +#ifndef _PC98_INCLUDE_MD_VAR_H_ +#define _PC98_INCLUDE_MD_VAR_H_ #include + +/* + * PC98 machines are based on Intel CPUs. Some add-in boards offer + * different CPUs than came with the processor. These CPUs sometimes + * require additional flushing before and/or after DMAs. + */ +extern int need_pre_dma_flush; +extern int need_post_dma_flush; + +#endif /* !_PC98_INCLUDE_MD_VAR_H_ */ diff --git a/sys/pc98/include/pci_cfgreg.h b/sys/pc98/include/pci_cfgreg.h index 9a54be3ba862..dc9207deb23a 100644 --- a/sys/pc98/include/pci_cfgreg.h +++ b/sys/pc98/include/pci_cfgreg.h @@ -1,6 +1,39 @@ /*- - * This file is in the public domain. + * Copyright (C) 2005 M. Warner Losh. 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. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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. + * + * $FreeBSD$ */ -/* $FreeBSD$ */ + +#ifndef _PC98_INCLUDE_PCI_CFGREG_H_ +#define _PC98_INCLUDE_PCI_CFGREG_H_ #include + +/* + * PC98 uses a non-standard CONF2_FORWARD port, so redefine it here. + */ +#undef CONF2_FORWARD_PORT +#define CONF2_FORWARD_PORT 0x0cf9 + +#endif /* !_PC98_INCLUDE_PCI_CFGREG_H_ */