[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1202291836120.12283@be10.lrz>
Date: Wed, 29 Feb 2012 18:54:02 +0100 (CET)
From: Bodo Eggert <7eggert@....de>
To: "Joshua C." <joshuacov@...glemail.com>
cc: "H. Peter Anvin" <hpa@...or.com>, Bodo Eggert <7eggert@....de>,
linux-kernel@...r.kernel.org
Subject: Re: [RESUBMIT] [PATCH] Use BIOS Keyboard variable to set Numlock
On Wed, 29 Feb 2012, Joshua C. wrote:
> 2012/2/28 H. Peter Anvin <hpa@...or.com>:
>> On 02/28/2012 10:32 AM, Bodo Eggert wrote:
>>> Asking the BIOS is as correct as querying the memory location (defined
>>> to have same result), but more expensive.
>>
>>
>> Not quite, in reality; it is more likely to work on systems which implement
>> various kinds of bypass schemes. The key aspect of this, though, is that
>> this is done on a BIOS path and not by groping a memory location which may
>> not even be initialized on non-BIOS systems.
> I got the idea that we should somehow check the kbd_state and set the
> numlock accordingly but this is behind my capabilities. I tried
> several times to read those boot_params but I have no idea how to do
> it. Where are they stored, how to access them? Help anyone?
There are two bytes in the BIOS data area, one (0x417 + 0x418) containing
the settings that are supposed to be set and one that contains the values
sent to the keyboard most recently (0x496 + 0x497). Both values are
compared on each int16 call and the LED are set accordingly if the
corresponding bits differ.
You can change the LED states by setting the according byte and calling
any keyboard interrupt function, e.g. querying the availability of
characters in the buffer. I don't know about any other way to do the same
using only the BIOS.
Powered by blists - more mailing lists