1/*- 2 * Copyright (c) KATO Takenori, 1996. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer as 9 * the first lines of this file unmodified. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. The name of the author may not be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * 27 * $FreeBSD$ 28 */ 29 30#ifndef __PC98_PC98_PC98_MACHDEP_H__ 31#define __PC98_PC98_PC98_MACHDEP_H__ 32 33void pc98_init_dmac(void); 34unsigned int pc98_getmemsize(unsigned *, unsigned *); 35 36#define PC98_VECTOR_SIZE (0x400) 37#define PC98_SYSTEM_PARAMETER_SIZE (0x240) 38#define PC98_SAVE_AREA (0xa1000) 39 40#if defined(_KERNEL) && !defined(LOCORE) 41/* BIOS parameter block */ 42extern unsigned char pc98_system_parameter[]; /* in locore.c */ 43 44#define OFS_pc98_machine_type 0x220 45#define OFS_epson_machine_id 0x224 46#define OFS_epson_bios_id 0x225 47#define OFS_epson_system_type 0x226 48 49#define PC98_SYSTEM_PARAMETER(x) pc98_system_parameter[(x)-0x400] 50#define pc98_machine_type (*(unsigned long*)&pc98_system_parameter[OFS_pc98_machine_type]) 51#define epson_machine_id (pc98_system_parameter[OFS_epson_machine_id]) 52#define epson_bios_id (pc98_system_parameter[OFS_epson_bios_id]) 53#define epson_system_type (pc98_system_parameter[OFS_epson_system_type]) 54 55# define PC98_TYPE_CHECK(x) ((pc98_machine_type & (x)) == (x)) 56 57/* 58 * PC98 machine type 59 */ 60#define M_NEC_PC98 0x0001 61#define M_EPSON_PC98 0x0002 62#define M_NOT_H98 0x0010 63#define M_H98 0x0020 64#define M_NOTE 0x0040 65#define M_NORMAL 0x1000 66#define M_8M 0x8000 67 68/* 69 * EPSON machine list 70 */ 71#define EPSON_PC386_NOTE_A 0x20 72#define EPSON_PC386_NOTE_W 0x22 73#define EPSON_PC386_NOTE_AE 0x27 74#define EPSON_PC386_NOTE_WR 0x2a 75#define EPSON_PC486_GR 0x2b 76#define EPSON_PC486_P 0x30 77#define EPSON_PC486_GR_SUPER 0x31 78#define EPSON_PC486_GR_PLUS 0x32 79#define EPSON_PC486_HX 0x34 80#define EPSON_PC486_HG 0x35 81#define EPSON_PC486_SE 0x37 82#define EPSON_PC486_SR 0x38 83#define EPSON_PC486_HA 0x3b 84 85/* IDE HDD geometry conversion. */ 86#define AD_GEOM_ADJUST_NONE 0 /* Do nothing. */ 87#define AD_GEOM_ADJUST_COMPATIDE 1 /* PC-98 IDE BIOS. */ 88#define AD_GEOM_ADJUST_COMPATSCSI 2 /* PC-98 SCSI. */ 89#define AD_GEOM_ADJUST_COMPATCYL16 100 /* Compat Rev. 1.28. */ 90 91#define MEDIASIZE_4_3G (4351LL * 1024LL * 1024LL) /* 4351M */ 92#define MEDIASIZE_8G (8192LL * 1024LL * 1024LL) /* 8192M */ 93#define MEDIASIZE_29_5G (30239LL * 1024LL * 1024LL) /* 30239M */ 94#define MEDIASIZE_31_5G (32255LL * 1024 * 1024) /* 32255M */ 95#define MEDIASIZE_32G (32768LL * 1024LL * 1024LL) /* 32768M */ 96#define MEDIASIZE_60G (61440LL * 1024LL * 1024LL) /* 61440M */ 97#define MEDIASIZE_120G (122400LL * 1024LL * 1024LL) /* 122400M */ 98#define MEDIASIZE_127G (130558LL * 1024LL * 1024LL) /* 130558M */ 99 100#endif /* _KERNEL */ 101 102#endif /* __PC98_PC98_PC98_MACHDEP_H__ */ 103