diff options
| author | Guillem Jover <guillem@debian.org> | 2006-01-08 18:12:25 +0000 |
|---|---|---|
| committer | Guillem Jover <guillem@debian.org> | 2006-01-08 18:12:25 +0000 |
| commit | 45faef2722453c583ee8e281a1d903c5324e163c (patch) | |
| tree | c6c002d93816317eeb53d3b54f778c89933b1d9c /debian/patches/46_io_device.patch | |
| parent | de320583f24be016934cb90875bc4edb6742e012 (diff) | |
* Fix io port access. (Closes: #46709)
- debian/patches/40_user-tss.patch: New file.
- debian/patches/41_io_unlock_ioremove.patch: Likewise.
- debian/patches/42_disable_ioperm.disabled: Likewise.
- debian/patches/43_debvice_port_fix.patch: Likewise.
- debian/patches/44_more_ports.patch: Likewise.
- debian/patches/45_io_per_task.patch: Likewise.
- debian/patches/46_io_device.patch: Likewise.
Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
Diffstat (limited to 'debian/patches/46_io_device.patch')
| -rw-r--r-- | debian/patches/46_io_device.patch | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/debian/patches/46_io_device.patch b/debian/patches/46_io_device.patch new file mode 100644 index 0000000..731d30f --- /dev/null +++ b/debian/patches/46_io_device.patch @@ -0,0 +1,117 @@ +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. + + +diff -urp gnumach-mine-5-io_per_task/i386/i386/iopb.c gnumach-mine-6-io_device/i386/i386/iopb.c +--- gnumach-mine-5-io_per_task/i386/i386/iopb.c 2005-12-29 23:42:34.000000000 +0100 ++++ gnumach-mine-6-io_device/i386/i386/iopb.c 2006-01-07 00:19:24.000000000 +0100 +@@ -38,6 +38,7 @@ + #include <kern/thread.h> + + #include <device/dev_hdr.h> ++#include <device/io_req.h> + + #include "io_port.h" + #include "iopb.h" +@@ -82,6 +83,32 @@ + 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 +@@ -130,9 +157,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)); ++ } + } + + /* +@@ -145,9 +175,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)); ++ } + } + + /* + +2006-01-07 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * conf.c: New "io" device. + (dev_name_list): Added "io" device. + +diff -urp gnumach-mine-5-io_per_task/i386/i386at/conf.c gnumach-mine-6-io_device/i386/i386at/conf.c +--- gnumach-mine-5-io_per_task/i386/i386at/conf.c 2006-01-06 23:43:24.000000000 +0100 ++++ gnumach-mine-6-io_device/i386/i386at/conf.c 2006-01-06 23:43:44.000000000 +0100 +@@ -182,6 +182,9 @@ + extern vm_offset_t ioplmmap(); + #define ioplname "iopl" + ++extern int ioopen(), ioclose(); ++#define ioname "io" ++ + extern int kmsgopen(), kmsgclose(), kmsgread(), kmsggetstat(); + #define kmsgname "kmsg" + +@@ -367,6 +370,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 0 + #if NHD > 0 + { pchdname, pchdopen, hdclose, pchdread, |
