summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/bus.h26
-rw-r--r--sys/arch/i386/include/cpu.h3
-rw-r--r--sys/arch/i386/include/joystick.h23
-rw-r--r--sys/arch/i386/include/vm86.h17
4 files changed, 60 insertions, 9 deletions
diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h
index fcf4e90771b..09947ebf54e 100644
--- a/sys/arch/i386/include/bus.h
+++ b/sys/arch/i386/include/bus.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: bus.h,v 1.1 1996/04/18 19:21:33 niklas Exp $ */
-/* $NetBSD: bus.h,v 1.1 1996/03/08 20:11:23 cgd Exp $ */
+/* $OpenBSD: bus.h,v 1.2 1996/04/21 22:16:46 deraadt Exp $ */
+/* $NetBSD: bus.h,v 1.2 1996/04/05 23:59:37 thorpej Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -66,6 +66,17 @@ typedef caddr_t bus_mem_handle_t;
#define bus_io_read_8(t, h, o) !!! bus_io_read_8 unimplemented !!!
#endif
+#define bus_io_read_multi_1(t, h, o, a, c) \
+ insb((h) + (o), (a), (c))
+#define bus_io_read_multi_2(t, h, o, a, c) \
+ insw((h) + (o), (a), (c))
+#define bus_io_read_multi_4(t, h, o, a, c) \
+ insl((h) + (o), (a), (c))
+#if 0 /* Cause a link error for bus_io_read_multi_8 */
+#define bus_io_read_multi_8(t, h, o, a, c) \
+ !!! bus_io_read_multi_8 unimplemented !!!
+#endif
+
#define bus_io_write_1(t, h, o, v) outb((h) + (o), (v))
#define bus_io_write_2(t, h, o, v) outw((h) + (o), (v))
#define bus_io_write_4(t, h, o, v) outl((h) + (o), (v))
@@ -73,6 +84,17 @@ typedef caddr_t bus_mem_handle_t;
#define bus_io_write_8(t, h, o, v) !!! bus_io_write_8 unimplemented !!!
#endif
+#define bus_io_write_multi_1(t, h, o, a, c) \
+ outsb((h) + (o), (a), (c))
+#define bus_io_write_multi_2(t, h, o, a, c) \
+ outsw((h) + (o), (a), (c))
+#define bus_io_write_multi_4(t, h, o, a, c) \
+ outsl((h) + (o), (a), (c))
+#if 0 /* Cause a link error for bus_io_write_multi_8 */
+#define bus_io_write_multi_8(t, h, o, a, c) \
+ !!! bus_io_write_multi_8 unimplimented !!!
+#endif
+
int bus_mem_map __P((bus_chipset_tag_t t, bus_mem_addr_t bpa,
bus_mem_size_t size, int cacheable, bus_mem_handle_t *mhp));
void bus_mem_unmap __P((bus_chipset_tag_t t, bus_mem_handle_t memh,
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 00e3ed0de3c..373fc86995a 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.32 1995/12/24 01:08:02 mycroft Exp $ */
+/* $NetBSD: cpu.h,v 1.33 1996/03/29 00:23:28 mycroft Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -93,6 +93,7 @@ int want_resched; /* resched() was called */
* We need a machine-independent name for this.
*/
#define DELAY(x) delay(x)
+void delay __P((int));
#ifdef I586_CPU
/*
diff --git a/sys/arch/i386/include/joystick.h b/sys/arch/i386/include/joystick.h
index b73fa5c91d7..464777c97eb 100644
--- a/sys/arch/i386/include/joystick.h
+++ b/sys/arch/i386/include/joystick.h
@@ -1,3 +1,26 @@
+/* $NetBSD: joystick.h,v 1.1 1996/03/27 19:18:56 perry Exp $ */
+
+#ifndef _JOY_IOCTL_H_
+#define _JOY_IOCTL_H_
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+struct joystick {
+ int x;
+ int y;
+ int b1;
+ int b2;
+};
+
+#define JOY_SETTIMEOUT _IOW('J', 1, int) /* set timeout */
+#define JOY_GETTIMEOUT _IOR('J', 2, int) /* get timeout */
+#define JOY_SET_X_OFFSET _IOW('J', 3, int) /* set offset on X-axis */
+#define JOY_SET_Y_OFFSET _IOW('J', 4, int) /* set offset on X-axis */
+#define JOY_GET_X_OFFSET _IOR('J', 5, int) /* get offset on X-axis */
+#define JOY_GET_Y_OFFSET _IOR('J', 6, int) /* get offset on Y-axis */
+
+#endif /* _JOY_IOCTL_H_ */
#ifndef _JOY_IOCTL_H_
#define _JOY_IOCTL_H_
diff --git a/sys/arch/i386/include/vm86.h b/sys/arch/i386/include/vm86.h
index 67a584be27e..6adc36548a0 100644
--- a/sys/arch/i386/include/vm86.h
+++ b/sys/arch/i386/include/vm86.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: vm86.h,v 1.3 1996/04/18 19:21:42 niklas Exp $ */
-/* $NetBSD: vm86.h,v 1.4 1996/04/11 10:07:25 mycroft Exp $ */
+/* $OpenBSD: vm86.h,v 1.4 1996/04/21 22:16:48 deraadt Exp $ */
+/* $NetBSD: vm86.h,v 1.5 1996/04/12 05:57:45 mycroft Exp $ */
#define VM86_USE_VIF
@@ -52,6 +52,9 @@
#define VM86_SETDIRECT (~PSL_USERSTATIC)
#define VM86_GETDIRECT (VM86_SETDIRECT|PSL_MBO|PSL_MBZ)
+#define VM86_SETDIRECT (~PSL_USERSTATIC)
+#define VM86_GETDIRECT (VM86_SETDIRECT|PSL_MBO|PSL_MBZ)
+
struct vm86_regs {
struct sigcontext vmsc;
};
@@ -124,7 +127,8 @@ set_vflags(p, flags)
struct trapframe *tf = p->p_md.md_regs;
struct pcb *pcb = &p->p_addr->u_pcb;
- SETFLAGS(pcb->vm86_eflags, flags, pcb->vm86_flagmask | ~VM86_GETDIRECT);
+ flags &= ~pcb->vm86_flagmask;
+ SETFLAGS(pcb->vm86_eflags, flags, ~VM86_GETDIRECT);
SETFLAGS(tf->tf_eflags, flags, VM86_SETDIRECT);
#ifndef VM86_USE_VIF
if ((pcb->vm86_eflags & (PSL_I|PSL_VIP)) == (PSL_I|PSL_VIP))
@@ -142,7 +146,7 @@ get_vflags(p)
struct pcb *pcb = &p->p_addr->u_pcb;
int flags = 0;
- SETFLAGS(flags, pcb->vm86_eflags, pcb->vm86_flagmask | ~VM86_GETDIRECT);
+ SETFLAGS(flags, pcb->vm86_eflags, ~VM86_GETDIRECT);
SETFLAGS(flags, tf->tf_eflags, VM86_GETDIRECT);
return (flags);
}
@@ -155,7 +159,8 @@ set_vflags_short(p, flags)
struct trapframe *tf = p->p_md.md_regs;
struct pcb *pcb = &p->p_addr->u_pcb;
- SETFLAGS(pcb->vm86_eflags, flags, (pcb->vm86_flagmask | ~VM86_GETDIRECT) & 0xffff);
+ flags &= ~pcb->vm86_flagmask;
+ SETFLAGS(pcb->vm86_eflags, flags, ~VM86_GETDIRECT & 0xffff);
SETFLAGS(tf->tf_eflags, flags, VM86_SETDIRECT & 0xffff);
#ifndef VM86_USE_VIF
if ((pcb->vm86_eflags & (PSL_I|PSL_VIP)) == (PSL_I|PSL_VIP))
@@ -171,7 +176,7 @@ get_vflags_short(p)
struct pcb *pcb = &p->p_addr->u_pcb;
int flags = 0;
- SETFLAGS(flags, pcb->vm86_eflags, (pcb->vm86_flagmask | ~VM86_GETDIRECT) & 0xffff);
+ SETFLAGS(flags, pcb->vm86_eflags, ~VM86_GETDIRECT & 0xffff);
SETFLAGS(flags, tf->tf_eflags, VM86_GETDIRECT & 0xffff);
return (flags);
}