[OpenBIOS] [PATCH] PPC: Rework assignment of keyboard devalias.

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon Dec 3 21:38:35 CET 2012


On 01/12/12 14:35, Blue Swirl wrote:

> On Mon, Nov 26, 2012 at 12:13 AM, Mark Cave-Ayland
> <mark.cave-ayland at ilande.co.uk>  wrote:
>> Rather than simply copy the value of input-device, we scan the device
>> tree for an entry with a device_type of keyboard and use that. This
>> ensures that the keyboard alias always points to a physical keyboard
>> device.
>
> Maybe I'm missing something, but other keyboard drivers (escc.c and
> pc_kbd.c) just add the keyboard alias themselves, this should be
> slightly faster because the scan is avoided. It's also only two lines
> of code.

The committed version was actually much smaller than this, as the string 
munging was required due to a separate bug for unit address during path 
resolution.

I'd be quite keen to do the keyboard alias assignment as a separate 
pass, as I've used QEMU with multiple keyboards attached in some 
circumstances to work around driver issues. While the current algorithm 
is to pick the first keyboard device found, I'd like to think this could 
be controlled by parameters passed into QEMU/NVRAM someday.


ATB,

Mark.



More information about the OpenBIOS mailing list