[OpenBIOS] About the keyboard device

Tarl Neustaedter tarl-b2 at tarl.net
Fri Nov 2 18:21:40 CET 2012


On 2012-Nov-2 13:05 , Programmingkid wrote:
> How do I obtain the ihandle for the keyboard? I tried " keyboard" open-dev, but that only returns zero.

That means the open failed.

Make sure your device-path is correct, and if you are sure you have that 
right, you'll have to walk the tree to find out where the open failed.

E.g., on the system I'm currently debugging on, there is a keyboard at:

/pci at 340/pci at 1/pci at 0/pci at 3/usb at 0/hub at 7/keyboard at 1

When you call open-dev, it walks through the above path opening each of 
the parents, and if any of the opens fails, the whole open-dev fails. 
E.g., it performs opens on the below list:

/pci at 340
/pci at 340/pci at 1
/pci at 340/pci at 1/pci at 0
/pci at 340/pci at 1/pci at 0/pci at 3
/pci at 340/pci at 1/pci at 0/pci at 3/usb at 0
/pci at 340/pci at 1/pci at 0/pci at 3/usb at 0/hub at 7
/pci at 340/pci at 1/pci at 0/pci at 3/usb at 0/hub at 7/keyboard at 1

If you can figure out which node in your particular system is failing, 
you can debug the "open" method to find out why the open is refusing. I 
suspect either you have the wrong path or the keyboard itself is saying 
that it won't open a second time (it's already opened by the console 
driver).

In your case, I'd go to the keyboard node and debug the open method 
there and re-try the open-dev. If you don't even get into the debugger, 
you aren't reaching the keyboard node. If you do, you can step through 
it and find out why it's refusing.




More information about the OpenBIOS mailing list