help-grub
[Top][All Lists]
Advanced

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

Re: Accessing external code or data from the 'console' kernel module: Ca


From: Luc Van Rompaey
Subject: Re: Accessing external code or data from the 'console' kernel module: Can it be done?
Date: Fri, 03 Jul 2015 23:00:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

Taking into account all that I have learned here, I finally got it working.

However, the INT16H/AH=00H function that the console uses to read keyboard 
input, presents me with a few problems that are impossible to work around.
The most serious issue has to do with the forward slash character, in that the 
keyboard input function returns the exact same value for the slash key on the 
main (U.S.) keyboard and for the slash key on the numeric keypad.
As a result, when I remap the slash to the equal sign (as the Belgian keyboard 
layout wants it), then suddenly, the slash on the numeric keypad will produce 
an equal sign as well. Not good!

I have, therefore, decided to leave the default console (in the kernel) alone, 
and I am now working on a new module, 'nuconsole', which will not go into the 
kernel.
To overcome the problems, it will use INT16H/AH=10H (that's 10H instead of 00H) 
function to perform the keyboard input, since that function generates unique 
values for each key.
As an added bonus, it also distinguishes between the backslash/bar key (on the 
U.S. keyboard) and the extra key that sits between the left shift and the z/Z 
(or, under the Belgian layout, w/W) on my keyboard.
Under a U.S. keyboard layout, this extra key acts just like a copy of the 
backslash/bar; under the Belgian layout, it is the less/greater key.

Anyway, what I have learned about exporting functions or variables from the 
GRUB kernel, is not immediately useful in this context, but even so, it won't 
be wasted. In fact, exporting and importing between non-kernel modules turns 
out to be significantly easier and more straightforward.




reply via email to

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