116359Sasami/*- 216359Sasami * Copyright (c) 1990 The Regents of the University of California. 316359Sasami * All rights reserved. 416359Sasami * 516359Sasami * This code is derived from software contributed to Berkeley by 616359Sasami * William Jolitz. 716359Sasami * 816359Sasami * Redistribution and use in source and binary forms, with or without 916359Sasami * modification, are permitted provided that the following conditions 1016359Sasami * are met: 1116359Sasami * 1. Redistributions of source code must retain the above copyright 1216359Sasami * notice, this list of conditions and the following disclaimer. 1316359Sasami * 2. Redistributions in binary form must reproduce the above copyright 1416359Sasami * notice, this list of conditions and the following disclaimer in the 1516359Sasami * documentation and/or other materials provided with the distribution. 1616359Sasami * 4. Neither the name of the University nor the names of its contributors 1716359Sasami * may be used to endorse or promote products derived from this software 1816359Sasami * without specific prior written permission. 1916359Sasami * 2016359Sasami * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2116359Sasami * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2216359Sasami * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2316359Sasami * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2416359Sasami * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2516359Sasami * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2616359Sasami * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2716359Sasami * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2816359Sasami * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2916359Sasami * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3016359Sasami * SUCH DAMAGE. 3116359Sasami * 3216359Sasami * from: @(#)isa.h 5.7 (Berkeley) 5/9/91 3350477Speter * $FreeBSD$ 3416359Sasami */ 3516359Sasami 3616359Sasami#ifndef _PC98_PC98_PC98_H_ 3716359Sasami#define _PC98_PC98_PC98_H_ 3816359Sasami 3916359Sasami/* BEWARE: Included in both assembler and C code */ 4016359Sasami 4116359Sasami/* 4216359Sasami * PC98 Bus conventions 4316359Sasami * modified for PC9801 by A.Kojima F.Ukai M.Ishii 4416359Sasami * Kyoto University Microcomputer Club (KMC) 4516359Sasami */ 4616359Sasami 4716359Sasami/* 4816359Sasami * Input / Output Port Assignments 4916359Sasami */ 5018208Sasami#ifndef IO_ISABEGIN 5116359Sasami#define IO_ISABEGIN 0x000 /* 0x000 - Beginning of I/O Registers */ 5216359Sasami 5316359Sasami/* PC98 IO address ... very dirty (^_^; */ 5416359Sasami 5548217Skato#define IO_ICU1 0x000 /* 8259A Interrupt Controller #1 */ 5648217Skato#define IO_ICU2 0x008 /* 8259A Interrupt Controller #2 */ 5748217Skato#define IO_RTC 0x020 /* 4990A RTC */ 5848217Skato#define IO_SYSPORT 0x031 /* 8255A System Port */ 5948217Skato#define IO_KBD 0x041 /* 8251A Keyboard */ 6048217Skato#define IO_COM2 0x0B1 /* 8251A RS232C serial I/O (ext) */ 6148217Skato#define IO_COM3 0x0B9 /* 8251A RS232C serial I/O (ext) */ 6248217Skato#define IO_FDPORT 0x0BE /* FD I/F port (1M<->640K,EMTON) */ 6348217Skato#define IO_WD1_EPSON 0x80 /* 386note Hard disk controller */ 6418208Sasami#define IO_ISAEND 0xFFFF /* - 0x3FF End of I/O Registers */ 6518208Sasami#endif /* !IO_ISABEGIN */ 6616359Sasami 6716359Sasami/* 6816359Sasami * Input / Output Port Sizes - these are from several sources, and tend 6916359Sasami * to be the larger of what was found, ie COM ports can be 4, but some 7016359Sasami * boards do not fully decode the address, thus 8 ports are used. 7116359Sasami */ 7218208Sasami#ifndef IO_ISASIZES 7318208Sasami#define IO_ISASIZES 7416359Sasami 7516359Sasami#define IO_KBDSIZE 16 /* 8042 Keyboard controllers */ 7616359Sasami#define IO_LPTSIZE 8 /* LPT controllers, some use only 4 */ 7778815Snyan#define IO_LPTSIZE_EXTENDED 8 /* "Extended" LPT controllers */ 7878815Snyan#define IO_LPTSIZE_NORMAL 4 /* "Normal" LPT controllers */ 7916359Sasami 8018208Sasami#endif /* !IO_ISASIZES */ 8116359Sasami 8216359Sasami/* 8316359Sasami * Input / Output Memory Physical Addresses 8416359Sasami */ 8516359Sasami#ifndef IOM_BEGIN 8648217Skato#define IOM_BEGIN 0x0A0000 /* Start of I/O Memory "hole" */ 8748217Skato#define IOM_END 0x100000 /* End of I/O Memory "hole" */ 8816359Sasami#define IOM_SIZE (IOM_END - IOM_BEGIN) 8948217Skato#endif /* !IOM_BEGIN */ 9016359Sasami 9116359Sasami/* 9216359Sasami * RAM Physical Address Space (ignoring the above mentioned "hole") 9316359Sasami */ 9416359Sasami#ifndef RAM_BEGIN 9516359Sasami#define RAM_BEGIN 0x0000000 /* Start of RAM Memory */ 9616359Sasami#ifdef EPSON_BOUNCEDMA 9716359Sasami#define RAM_END 0x0f00000 /* End of EPSON GR?? RAM Memory */ 9816359Sasami#else 9916359Sasami#define RAM_END 0x1000000 /* End of RAM Memory */ 10016359Sasami#endif 10116359Sasami#define RAM_SIZE (RAM_END - RAM_BEGIN) 10218208Sasami#endif /* !RAM_BEGIN */ 10316359Sasami 10416359Sasami#endif /* !_PC98_PC98_PC98_H_ */ 105