This is the mail archive of the cygwin-xfree@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

IOPL



I am getting the following error from X-server, as
expected according to Holger(the person who ported XFree86
to OS/2).

Fatal server error:
xf86EnablePortIO: Failed to get IOPL for I/O


Program exited with code 01.


Any suggestions on how to handle it?  I did find a source code
and also compiled driver for maping I/O port on Windows. Maybe someone will
have another suggestion on it.

Suhaib

-------This from the author of XFree86/OS2 about I/O ports---
As you might have found out, there are several
inline assembler portions in the server code which directly access I/O
ports. If you go through a (possible in theory) kernel mechanism to emulate
I/O accesses - the EMX library provides such a method in OS/2 - then you
will slow down these critical parts of the code (that's why they are
assembler!) by one or two orders of magnitude. The Unix ports have the same
problem, and the trick I built into fastio is comparable to the way it was
solved in Unix. The processor has two bits IOPL in its EFLAGS CPU register,
which control a fence of privilege below which I/O accesses and some other
instructions in user mode won't trap. OS/2 by default sets this to 2,
meaning
the user processes running in ring 3, won't be allowed to do I/O. fastio
is a small ring 0 code (which is capable to alter these bits - user code
can't) which is called at task time by the X server to modify its own
per-process copy of the EFLAGS register. This should also be possible
for NT, with the help of a small driver.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]