X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Andrew Dyer Subject: ioperm() with ports above 0x3ff Date: Mon, 18 Feb 2008 21:15:42 +0000 (UTC) Lines: 28 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: List-Subscribe: List-Archive: List-Post: List-Help: , 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/