summaryrefslogtreecommitdiff
path: root/debian/patches/40_iopl_mmap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/40_iopl_mmap.patch')
-rw-r--r--debian/patches/40_iopl_mmap.patch108
1 files changed, 0 insertions, 108 deletions
diff --git a/debian/patches/40_iopl_mmap.patch b/debian/patches/40_iopl_mmap.patch
deleted file mode 100644
index cb49f96..0000000
--- a/debian/patches/40_iopl_mmap.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-Device for direct memory access (needed e.g. for Xorg).
-Upstream now has a mem device, so this patch should go away and be replaced by
-40_iopl_mem.patch when we upgrade the Debian snapshot.
-
-Index: b/i386/Makefrag.am
-===================================================================
---- a/i386/Makefrag.am
-+++ b/i386/Makefrag.am
-@@ -31,6 +31,7 @@ libkernel_a_SOURCES += \
- i386/i386at/immc.c \
- i386/i386at/int_init.c \
- i386/i386at/interrupt.S \
-+ i386/i386at/iopl.c \
- i386/i386at/kd.c \
- i386/i386at/kd.h \
- i386/i386at/kd_event.c \
-Index: b/i386/i386at/conf.c
---- a/i386/i386at/conf.c
-+++ b/i386/i386at/conf.c
-@@ -58,6 +58,10 @@ extern int kbdgetstat(), kbdsetstat();
- extern int mouseopen(), mouseclose(), mouseread(), mousegetstat();
- #define mousename "mouse"
-
-+extern vm_offset_t ioplmmap();
-+#define ioplname "iopl"
-+#define memname "mem"
-+
- extern int kmsgopen(), kmsgclose(), kmsgread(), kmsggetstat();
- #define kmsgname "kmsg"
-
-@@ -113,6 +117,16 @@ struct dev_ops dev_name_list[] =
- nodev, nulldev, nulldev, 0,
- nodev },
-
-+ { ioplname, nulldev, nulldev, nodev,
-+ nodev, nodev, nodev, ioplmmap,
-+ nodev, nulldev, nulldev, 0,
-+ nodev },
-+
-+ { memname, nulldev, nulldev, nodev,
-+ nodev, nodev, nodev, ioplmmap,
-+ nodev, nulldev, nulldev, 0,
-+ nodev },
-+
- #ifdef MACH_KMSG
- { kmsgname, kmsgopen, kmsgclose, kmsgread,
- nodev, kmsggetstat, nodev, nomap,
-Index: b/i386/i386at/iopl.c
-===================================================================
---- /dev/null
-+++ b/i386/i386at/iopl.c
-@@ -0,0 +1,56 @@
-+/*
-+ * Mach Operating System
-+ * Copyright (c) 1991,1990,1989 Carnegie Mellon University
-+ * All Rights Reserved.
-+ *
-+ * Permission to use, copy, modify and distribute this software and its
-+ * documentation is hereby granted, provided that both the copyright
-+ * notice and this permission notice appear in all copies of the
-+ * software, derivative works or modified versions, and any portions
-+ * thereof, and that both notices appear in supporting documentation.
-+ *
-+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
-+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
-+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
-+ *
-+ * Carnegie Mellon requests users of this software to return to
-+ *
-+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
-+ * School of Computer Science
-+ * Carnegie Mellon University
-+ * Pittsburgh PA 15213-3890
-+ *
-+ * any improvements or extensions that they make and grant Carnegie Mellon
-+ * the rights to redistribute these changes.
-+ */
-+
-+#include <device/io_req.h>
-+
-+/*ARGSUSED*/
-+int iopl_all = 1;
-+int
-+ioplmmap(dev, off, prot)
-+int dev;
-+vm_offset_t off;
-+vm_prot_t prot;
-+{
-+ extern vm_offset_t phys_last_addr;
-+
-+ if (iopl_all) {
-+ if (off == 0)
-+ return 0;
-+ else if (off < 0xa0000)
-+ return -1;
-+ else if (off >= 0x100000 && off <= phys_last_addr)
-+ return -1;
-+ else
-+ return i386_btop(off);
-+
-+ }
-+ if (off > 0x60000)
-+ return(-1);
-+
-+ /* Get page frame number for the page to be mapped. */
-+
-+ return(i386_btop(0xa0000 + off));
-+}