| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Spam-Check-By: | sourceware.org |
| To: | cygwin AT cygwin DOT com |
| From: | Andrew Dyer <amdyer AT gmail DOT com> |
| Subject: | ioperm() with ports above 0x3ff |
| Date: | Mon, 18 Feb 2008 21:15:42 +0000 (UTC) |
| Lines: | 28 |
| Message-ID: | <loom.20080218T210001-512@post.gmane.org> |
| Mime-Version: | 1.0 |
| User-Agent: | Loom/3.14 (http://gmane.org/) |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
I am having problems using ioperm() to try and access a parallel printer port on
a PCI card in my system running WinXP. The port is mapped to I/O port address
0xDCD8. I cannot access the port because the ioperm() driver has a check to
limit I/O port accesses to < 0x400.
from /usr/src/ioperm-0.4/driver/ioperm.c, lines 95-100
/* test input buffer size and parameters */
if ((io_stack->Parameters.DeviceIoControl.InputBufferLength < sizeof (struct
ioperm_data))
|| (!ioperm_data) || (ioperm_data->from + ioperm_data->num > 0x400))
{
Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
} else {
It looks like there is complete support for the bitmap that NT uses to allow I/O
permissions across a full x86 I/O port range of 0-0xFFFF, but the library
enforces this artificial port limit check. Is there a reason I can't see for
having this restrictive check in the driver (especially considering the nature
of what the driver does)?
I can't rebuild the driver as I don't have access to the DDK. Can someone
rebuild it with the check modified so I could test it?
Please cc: my email address as I am not subscribed to the list.
Thanks!
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |