Hello Stef,


I'm using coreboot on an ASUS KGPE-D16 motherboard with 2x HID keyboards and 1x HID mouse.


Just tested your patch and it works but I have one suggestion.


Here's a breakdown of the test results with and without your patch when all of my USB devices are connected:


- Without the patch: No keyboard input during boot.

- With patch and CONFIG_NUM_USB_KEYBOARD=1: No keyboard input during boot. (same issue as without the patch.)

- With patch and CONFIG_NUM_USB_KEYBOARD=3: Can use both keyboards for input.


Haven't tested with =2 but there aren't any issues with 3.


The suggestion I have is to remove the CONFIG_NUM_USB_KEYBOARD / CONFIG_NUM_USB_MOUSE options you've added and just try to scan all connected USB devices.

Haven't taken a look at the code but I could give it a shot unless you have an idea about how to do it.


Hope this information helped. Attached my generated config.


Regards,

- Daniel K.



From: Stef van Os <stef.van.os@prodrive-technologies.com>
Sent: 21 December 2017 06:13
To: Daniel K; Kevin O'Connor
Cc: seabios@seabios.org
Subject: Re: [SeaBIOS] [PATCH 0/1] add multiple usb-hid support
 
Hi Daniel,

Is this a problem with the patch applied? It was tested on our hardware
to function.

Some questions:
* What hardware platform are you using?
* Does the numeric keyboard work if it is the only keyboard (or if you
swap ports, which hopefully changes enumeration order) in the system,
maybe the problem is elsewhere and was masked because the (normal)
keyboard was enumerated first and the second (numeric) was ignored earlier.

Also, the patch can be verified using qemu and two vnc inputs:

qemu-system-x86_64 -m 4096 -M q35 -smp 8 \
         -pflash bios.qemu.rom \
         -drive format=raw,file=disk.img \
         -device pci-bridge,addr=12.0,chassis_nr=2,id=head.2 \
         -device nec-usb-xhci,bus=head.2,addr=0f.0,id=usb.2 \
         -device VGA,id=video.1 \
         -device secondary-vga,bus=head.2,addr=02.0,id=video.2 \
         -display vnc=:15,id=primary,display=video.1 \
         -display vnc=:16,id=secondary,display=video.2 \
         -usb \
         -device usb-kbd,bus=usb.2.0,port=1,display=video.1 \
         -device usb-kbd,bus=usb.2.0,port=2,display=video.2 \
         -serial stdio

Best regards,
Stef



On 12/20/2017 06:20 PM, Daniel K wrote:
> When I have more than 2 usb keyboards connected, SeaBIOS doesn't register keyboard input.
> This persists even when I get to the disk GRUB menu.
> I have to manually unplug my other keyboard to do any input during boot.
>
> And by other keyboard, I just mean a separate numerical keypad.
>
>> From: SeaBIOS <seabios-bounces@seabios.org> on behalf of Kevin O'Connor <kevin@koconnor.net>
>> Sent: 20 December 2017 08:33
>> To: Stef van Os
>> Cc: seabios@seabios.org
>> Subject: Re: [SeaBIOS] [PATCH 0/1] add multiple usb-hid support
>>
>> On Fri, Dec 15, 2017 at 11:09:45AM +0100, Stef van Os wrote:
>>> The following patch adds support for multiple usb keyboards and mice to seabios.
>>> Maximum number of keyboards is configurable in Kconfig and defaults to 1 to keep
>>> current behavior.
>>
>> Thanks.  What's the use case for enabling multiple keyboards?
>>
>> -Kevin
>
>
>     
>