Deleted Added
full compact
cbus.h (18846) cbus.h (19122)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)isa.h 5.7 (Berkeley) 5/9/91
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)isa.h 5.7 (Berkeley) 5/9/91
37 * $Id: pc98.h,v 1.4 1996/09/12 11:09:54 asami Exp $
37 * $Id: pc98.h,v 1.5 1996/10/09 21:46:34 asami Exp $
38 */
39
40#ifndef _PC98_PC98_PC98_H_
41#define _PC98_PC98_PC98_H_
42
43/* BEWARE: Included in both assembler and C code */
44
45/*

--- 142 unchanged lines hidden (view full) ---

188#define OFS_epson_system_type 0x226
189
190#define M_NEC_PC98 0x0001
191#define M_EPSON_PC98 0x0002
192#define M_NOT_H98 0x0010
193#define M_H98 0x0020
194#define M_NOTE 0x0040
195#define M_NORMAL 0x1000
38 */
39
40#ifndef _PC98_PC98_PC98_H_
41#define _PC98_PC98_PC98_H_
42
43/* BEWARE: Included in both assembler and C code */
44
45/*

--- 142 unchanged lines hidden (view full) ---

188#define OFS_epson_system_type 0x226
189
190#define M_NEC_PC98 0x0001
191#define M_EPSON_PC98 0x0002
192#define M_NOT_H98 0x0010
193#define M_H98 0x0020
194#define M_NOTE 0x0040
195#define M_NORMAL 0x1000
196#define M_HIGHRESO 0x2000
197#define M_8M 0x8000
198
199#if defined(KERNEL) && !defined(LOCORE)
200/* BIOS parameter block */
201extern unsigned char pc98_system_parameter[]; /* in locore.c */
202#define PC98_SYSTEM_PARAMETER(x) pc98_system_parameter[(x)-0x400]
203#define BOOT_boothowto (*(unsigned long*)(&pc98_system_parameter[OFS_BOOT_boothowto]))
204#define BOOT_bootdev (*(unsigned long*)(&pc98_system_parameter[OFS_BOOT_bootdev]))

--- 4 unchanged lines hidden (view full) ---

209#define WD_BIOS_SEC(i) (pc98_system_parameter[OFS_WD_BIOS_SEC(i)])
210#define pc98_machine_type (*(unsigned long*)&pc98_system_parameter[OFS_pc98_machine_type])
211#define epson_machine_id (pc98_system_parameter[OFS_epson_machine_id])
212#define epson_bios_id (pc98_system_parameter[OFS_epson_bios_id])
213#define epson_system_type (pc98_system_parameter[OFS_epson_system_type])
214
215# define PC98_TYPE_CHECK(x) ((pc98_machine_type & (x)) == (x))
216
196#define M_8M 0x8000
197
198#if defined(KERNEL) && !defined(LOCORE)
199/* BIOS parameter block */
200extern unsigned char pc98_system_parameter[]; /* in locore.c */
201#define PC98_SYSTEM_PARAMETER(x) pc98_system_parameter[(x)-0x400]
202#define BOOT_boothowto (*(unsigned long*)(&pc98_system_parameter[OFS_BOOT_boothowto]))
203#define BOOT_bootdev (*(unsigned long*)(&pc98_system_parameter[OFS_BOOT_bootdev]))

--- 4 unchanged lines hidden (view full) ---

208#define WD_BIOS_SEC(i) (pc98_system_parameter[OFS_WD_BIOS_SEC(i)])
209#define pc98_machine_type (*(unsigned long*)&pc98_system_parameter[OFS_pc98_machine_type])
210#define epson_machine_id (pc98_system_parameter[OFS_epson_machine_id])
211#define epson_bios_id (pc98_system_parameter[OFS_epson_bios_id])
212#define epson_system_type (pc98_system_parameter[OFS_epson_system_type])
213
214# define PC98_TYPE_CHECK(x) ((pc98_machine_type & (x)) == (x))
215
217#include <machine/spl.h>
218
219static inline u_char
220epson_inb(u_int port)
221{
222 u_char data;
223
224 outb(0x43f, 0x42);
225 data = inb(port);
226 outb(0x43f, 0x40);
227 return (data);
228}
229
230static inline void
231epson_outb(u_int port, u_char data)
232{
233 outb(0x43f, 0x42);
234 outb(port,data);
235 outb(0x43f, 0x40);
236}
237
238static inline void
239epson_insw(u_int port, void *addr, size_t cnt)
240{
241 int s;
242
243 s = splbio();
244 outb(0x43f, 0x42);
245 disable_intr();
246 insw((u_int)port, (void *)addr, (size_t)cnt);
247 outb(0x43f, 0x40);
248 splx(s);
249}
250
251static inline void
252epson_outsw(u_int port, void *addr, size_t cnt)
253{
254 int s;
255
256 s = splbio();
257 outb(0x43f, 0x42);
258 disable_intr();
259 outsw((u_int)port, (void *)addr, (size_t)cnt);
260 outb(0x43f, 0x40);
261 splx(s);
262}
263#endif /* KERNEL */
264
265/*
266 * Obtained from NetBSD/pc98
267 */
268#define MADDRUNK -1
269#define IRQUNK 0
270#define DRQUNK -1
271
272#endif /* !_PC98_PC98_PC98_H_ */
216#endif /* KERNEL */
217
218/*
219 * Obtained from NetBSD/pc98
220 */
221#define MADDRUNK -1
222#define IRQUNK 0
223#define DRQUNK -1
224
225#endif /* !_PC98_PC98_PC98_H_ */