[Top][All Lists]

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

Re: ioperm and iopl in gnumach

From: Da Zheng
Subject: Re: ioperm and iopl in gnumach
Date: Thu, 20 Aug 2009 21:34:55 +0800
User-agent: Thunderbird (Macintosh/20090605)

Samuel Thibault wrote:
> Da Zheng, le Tue 04 Aug 2009 16:15:10 +0800, a écrit :
>> 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. (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:-(
> I don't either, as that's roughly what the console driver does for e.g.
> the speaker, and it works for it. Just to make sure: you are using
> outb(value, 0x64) ? (not something else than outb, not another argument
> order).
You are right. The code I copied from gnumach used outb(port, value).
After I changed the argument order, it works well.

Zheng Da

reply via email to

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