Move pc98 specific parts to the pc98 specific file.

This commit is contained in:
imp 2005-04-03 23:27:11 +00:00
parent 0eef91eae9
commit 8a1e88ee77
6 changed files with 123 additions and 27 deletions

View File

@ -24,13 +24,8 @@
#include <sys/ioccom.h>
/* 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

View File

@ -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

View File

@ -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

View File

@ -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 <i386/apm_bios.h>
/*
* 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_ */

View File

@ -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 <i386/md_var.h>
/*
* 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_ */

View File

@ -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 <i386/pci_cfgreg.h>
/*
* 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_ */