Nico Huber has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/46724 )
Change subject: libpayload/keyboard: Revise scancode set and translation config ......................................................................
libpayload/keyboard: Revise scancode set and translation config
Some background first: The original XT keyboards used what we call scancode set #1 today. The PC/AT keyboards introduced scancode set #2, but for compatibility, its controller translated scancodes back to set #1 by default. Newer keyboards (maybe all we have to deal with) also support switching the scancode set.
This means the translation option in the controller and the scancode set selection in the keyboard have to match. In libpayload, we only support set #1 scancodes. So we either need the controller's trans- lation on and set #2 selected in the keyboard, or the controller's translation off and set #1 selected in the keyboard.
Valid configurations: * SET #1 + XLATE off * SET #2 + XLATE on
The Linux kernel leaves the decision to enable or disable the con- troller's translation to the firmware. We follow that behaviour, because Linux can be a payload too, and ideally want any payload to succeed the same with any given coreboot image.
This way, coreboot (or the controller firmware) can decide how to start best. For instance, if the keyboard is integrated and one knows for sure that it can switch scancode sets, no translation should be necessary.
Currently, coreboot leaves the controller's translation at its default setting, unless DRIVERS_PS2_KEYBOARD is enabled. The latter enables the translation unconditionally. For QEMU this means that the option effectively toggles the translation, as QEMU's controller has it disabled by default. This probably made a lot of earlier testing inconsistent.
Fixes: commit a95a6bf646 (libpayload/drivers/i8402/kbd: Fix qemu) The reset introduced there effectively reverted the scancode selection made before. It's unclear if later changes to the code where only necessary to work around it.
Change-Id: Iad85af516a7b9f9c0269ff9652ed15ee81700057 Signed-off-by: Nico Huber nico.h@gmx.de --- M payloads/libpayload/Kconfig M payloads/libpayload/drivers/i8042/i8042.c M payloads/libpayload/drivers/i8042/i8042.h M payloads/libpayload/drivers/i8042/keyboard.c 4 files changed, 33 insertions(+), 50 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/46724/2