[OpenBIOS] [PATCH] Adds get-key-map to keyboard node
mark.cave-ayland at ilande.co.uk
Sat Nov 24 19:01:46 CET 2012
On 15/11/12 21:16, Programmingkid wrote:
>> I think you may have misunderstood what the get-key-map word does - my guess from browsing the source code is that it's related to locale, and even better there is already a version of it included in OpenBIOS (MOL section).
> How did you come to this conclusion that I don't know what get-key-map does? The program I made to test get-key-map on OpenBIOS is the same program I used to test on actual hardware. The results show my patch works.
> Test results:
> Holding down Command-v in Apple's Open Firmware:
> ff8f2460: 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 |... at ............|
> ff8f2470: 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 |................|
> Holding down Control-v (simulated Command-v) in OpenBIOS:
> 1fc9c9e8 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 ... at ............
> 1fc9c9f8 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 ................
> The 40 you see in the top row indicates the v key is being held down. The 10 you see in the second row indicates the Command key is being held down. Both sets of data show this. This data shows the patch works.
> The only key combinations that Bootx looks for is Command-v (verbose mode) and Command-s (single user mode). This is all the get-key-map word is used for. I'm not sure what more you want.
(Goes and looks again)... okay in that case I take it back. I'm getting
confused between the keyboard map and the keymap which are two different
>> Take a look at arch/ppc/mol/methods.c to see how it's done there. It should be fairly easy to port this to the qemu under arch/ppc/qemu.
>> Similarly you can see how MOL sets up the keyboard alias by looking at arch/ppc/mol/mol.fs - you'll need to point it towards adb-keyboard but otherwise it looks correct. With both of these in place you should hopefully find that the keyboard becomes responsive and boot progresses further.
> This problem has already been solved by this line of code:
> set_property(aliases, "keyboard", buf, strlen(buf) + 1);
I've committed this part as a separate patch - see r1073.
> It adds keyboard to the /aliases node. After applying my patch, I was able to see that Bootx was able to obtain the keyboard instance handle successfully.
> Thank you.
Again - please take the get-key-map routine in arch/ppc/mol/methods.c as
a starting point and make the *minimum* alterations for it to work under
QEMU, and repost the patch. It should be just a case of changing the key
detection functions, and so in that case I'd be happy to accept it as a
More information about the OpenBIOS