cbus.h (18208) | cbus.h (18265) |
---|---|
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.2 1996/09/03 10:23:48 asami Exp $ | 37 * $Id: pc98.h,v 1.3 1996/09/10 09:38:21 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/* --- 162 unchanged lines hidden (view full) --- 208#define WD_BIOS_HEAD(i) (pc98_system_parameter[OFS_WD_BIOS_HEAD(i)]) 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)) | 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/* --- 162 unchanged lines hidden (view full) --- 208#define WD_BIOS_HEAD(i) (pc98_system_parameter[OFS_WD_BIOS_HEAD(i)]) 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 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} |
|
216#endif /* KERNEL */ 217 218/* 219 * Obtained from NetBSD/pc98 220 */ 221#define MADDRUNK -1 222 223#endif /* !_PC98_PC98_PC98_H_ */ | 263#endif /* KERNEL */ 264 265/* 266 * Obtained from NetBSD/pc98 267 */ 268#define MADDRUNK -1 269 270#endif /* !_PC98_PC98_PC98_H_ */ |