2 * Copyright (c) KATO Takenori, 1996. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
30 #ifndef __PC98_PC98_PC98_MACHDEP_H__
31 #define __PC98_PC98_PC98_MACHDEP_H__
33 void pc98_init_dmac(void);
34 unsigned int pc98_getmemsize(unsigned *, unsigned *);
36 struct ccb_calc_geometry;
37 int scsi_da_bios_params(struct ccb_calc_geometry *);
39 #define PC98_VECTOR_SIZE (0x400)
40 #define PC98_SYSTEM_PARAMETER_SIZE (0x240)
41 #define PC98_SAVE_AREA (0xa1000)
43 #if defined(_KERNEL) && !defined(LOCORE)
44 /* BIOS parameter block */
45 extern unsigned char pc98_system_parameter[]; /* in locore.c */
47 #define OFS_pc98_machine_type 0x220
48 #define OFS_epson_machine_id 0x224
49 #define OFS_epson_bios_id 0x225
50 #define OFS_epson_system_type 0x226
52 #define PC98_SYSTEM_PARAMETER(x) pc98_system_parameter[(x)-0x400]
53 #define pc98_machine_type (*(unsigned long*)&pc98_system_parameter[OFS_pc98_machine_type])
54 #define epson_machine_id (pc98_system_parameter[OFS_epson_machine_id])
55 #define epson_bios_id (pc98_system_parameter[OFS_epson_bios_id])
56 #define epson_system_type (pc98_system_parameter[OFS_epson_system_type])
58 # define PC98_TYPE_CHECK(x) ((pc98_machine_type & (x)) == (x))
63 #define M_NEC_PC98 0x0001
64 #define M_EPSON_PC98 0x0002
65 #define M_NOT_H98 0x0010
68 #define M_NORMAL 0x1000
74 #define EPSON_PC386_NOTE_A 0x20
75 #define EPSON_PC386_NOTE_W 0x22
76 #define EPSON_PC386_NOTE_AE 0x27
77 #define EPSON_PC386_NOTE_WR 0x2a
78 #define EPSON_PC486_GR 0x2b
79 #define EPSON_PC486_P 0x30
80 #define EPSON_PC486_GR_SUPER 0x31
81 #define EPSON_PC486_GR_PLUS 0x32
82 #define EPSON_PC486_HX 0x34
83 #define EPSON_PC486_HG 0x35
84 #define EPSON_PC486_SE 0x37
85 #define EPSON_PC486_SR 0x38
86 #define EPSON_PC486_HA 0x3b
90 #endif /* __PC98_PC98_PC98_MACHDEP_H__ */