[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ioperm and iopl in gnumach

From: Thomas Schwinge
Subject: Re: ioperm and iopl in gnumach
Date: Tue, 4 Aug 2009 13:06:42 +0200
User-agent: Mutt/1.5.11


On Tue, Aug 04, 2009 at 04:15:10PM +0800, Da Zheng wrote:
> I am porting the keyboard driver to the user space and here is my problem:
> The driver reads the keyboard status from the port 0x64, and it seems
> OK. It doesn't work when the driver tries to write the command to the
> port 0x64. The whole process dies.

That obviously shouldn't happen, and thus it's the first thing to figure
out why it dies.  Is this already in the context of a translator, or a
stand-alone process?  If the former, then see
<http://www.gnu.org/software/hurd/hurd/debugging/translator.html> for two
different approaches.  But: doing this as a simple process for now will
be easier.

> (the port 0x64 is used for both read
> the status and writing the command.)
> I have used ioperm to acquire the access to the port 0x64 before
> accessing the port (K_STATUS is 0x64).
>   if (ioperm (K_STATUS, 1, 1) < 0)
>     return FALSE;
> I use the root user to run the keyboard driver. I don't know what the
> possible reason is:-(

What is your apporach?  You disabled the GNU Mach kernel keyboard driver?
And then, for now, use polling (in a busy-waiting loop) instead of IRQ
handling?  <http://www.computer-engineering.org/ps2keyboard/> seems to
contain useful instructions.


Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]