This is the mail archive of the
mailing list for the Cygwin project.
Re: ioperm() with ports above 0x3ff
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: cygwin at cygwin dot com
- Date: Thu, 21 Feb 2008 21:46:18 +0100
- Subject: Re: ioperm() with ports above 0x3ff
- References: <loom.20080218T210001email@example.com>
Andrew Dyer, le Mon 18 Feb 2008 21:15:42 +0000, a écrit :
> 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.
Yes: on Linux ioperm doesn't work above 0x400. On Linux, so as to
access ports above 0x400 you need to use iopl(), that's why ioperm in
cygwin does this. Now, allowing >= 0x400 would be possible in cygwin's
ioperm, but then you'd get problems when using the code on Linux... The
truly proper way is really to use iopl().
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html