summaryrefslogtreecommitdiff
path: root/debian/patches/46_io_device.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/46_io_device.patch')
-rw-r--r--debian/patches/46_io_device.patch113
1 files changed, 0 insertions, 113 deletions
diff --git a/debian/patches/46_io_device.patch b/debian/patches/46_io_device.patch
deleted file mode 100644
index a3a599b..0000000
--- a/debian/patches/46_io_device.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-2006-01-07 Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- * i386/i386/iopb.c: Include <device/io_req.h> for io_req_t. New "io"
- device.
- (ioopen): New function.
- (ioclose): Likewise.
- (io_bitmap_set): Treat special (-1) bit list as "all ports".
- (io_bitmap_clear): Likewise.
-
-
-Index: i386/i386/iopb.c
-===================================================================
---- i386/i386/iopb.c.orig 2007-04-05 07:31:26.000000000 +0300
-+++ i386/i386/iopb.c 2007-04-05 07:31:31.000000000 +0300
-@@ -40,6 +40,7 @@
- #include <kern/thread.h>
-
- #include <device/dev_hdr.h>
-+#include <device/io_req.h>
-
- #include "io_port.h"
- #include "iopb.h"
-@@ -84,6 +85,32 @@ typedef struct io_use *io_use_t;
- decl_simple_lock_data(, iopb_lock)
-
- /*
-+ * Special "all I/O ports" device.
-+ */
-+mach_device_t io_device = 0;
-+
-+int ioopen(dev, flag, ior)
-+ int dev;
-+ int flag;
-+ io_req_t ior;
-+{
-+ io_device = ior->io_device;
-+
-+ io_port_create(io_device, (io_reg_t *)(-1));
-+ return (0);
-+}
-+
-+int
-+ioclose(dev, flags)
-+ int dev;
-+ int flags;
-+{
-+ io_port_destroy(io_device);
-+ io_device = 0;
-+ return 0;
-+}
-+
-+/*
- * Initialize the package.
- */
- void
-@@ -132,9 +159,12 @@ io_bitmap_set(
- {
- io_reg_t io_bit;
-
-- while ((io_bit = *bit_list++) != IO_REG_NULL) {
-- bp[io_bit>>3] &= ~(1 << (io_bit & 0x7));
-- }
-+ if (bit_list == (io_reg_t *)(-1))
-+ memset(bp, 0, IOPB_BYTES);
-+ else
-+ while ((io_bit = *bit_list++) != IO_REG_NULL) {
-+ bp[io_bit>>3] &= ~(1 << (io_bit & 0x7));
-+ }
- }
-
- /*
-@@ -147,9 +177,12 @@ io_bitmap_clear(
- {
- io_reg_t io_bit;
-
-- while ((io_bit = *bit_list++) != IO_REG_NULL) {
-- bp[io_bit>>3] |= (1 << (io_bit & 0x7));
-- }
-+ if (bit_list == (io_reg_t *)(-1))
-+ memset(bp, ~0, IOPB_BYTES);
-+ else
-+ while ((io_bit = *bit_list++) != IO_REG_NULL) {
-+ bp[io_bit>>3] |= (1 << (io_bit & 0x7));
-+ }
- }
-
- /*
-Index: i386/i386at/conf.c
-===================================================================
---- i386/i386at/conf.c.orig 2007-04-05 06:37:23.000000000 +0300
-+++ i386/i386at/conf.c 2007-04-05 07:31:31.000000000 +0300
-@@ -58,6 +58,9 @@ extern int kbdgetstat(), kbdsetstat();
- extern int mouseopen(), mouseclose(), mouseread(), mousegetstat();
- #define mousename "mouse"
-
-+extern int ioopen(), ioclose();
-+#define ioname "io"
-+
- extern int kmsgopen(), kmsgclose(), kmsgread(), kmsggetstat();
- #define kmsgname "kmsg"
-
-@@ -89,6 +92,11 @@ struct dev_ops dev_name_list[] =
- nodev, nulldev, nulldev, 0,
- nodev },
-
-+ { ioname, ioopen, ioclose, nodev,
-+ nodev, nodev, nodev, nodev,
-+ nodev, nulldev, nulldev, 0,
-+ nodev },
-+
- #if NCOM > 0
- { comname, comopen, comclose, comread,
- comwrite, comgetstat, comsetstat, nomap,