Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46724 )
Change subject: libpayload/keyboard: Revise scancode set and translation config ......................................................................
Patch Set 3:
(4 comments)
I've still a lot of testing ahead of me. Had to update a lot more after I tried one of these ThinkPad embedded keyboards. They have some peculiarities: They start a keyboard self-test automatically, and don't reset the scancode set when told to return to defaults...
Trying to find a reasonable sequence for these, I discovered lots of races in the current code :-/
The reset problem with this special keyboard is still not addressed. As Linux' atkbd driver assumes set #2 is the default, it doesn't work without special parameters. To work around this, we could either
* unconditionally enable translation and scancode set #2, or * always select scancode set #2 in keyboard_disconnect().
Read some more drivers in the meantime. SeaBIOS always uses scancode set #2 and translation and leaves the keyboard like that on exit. GRUB seems to use untranslated set #2 but then turns translation (back) on, on exit.
https://review.coreboot.org/c/coreboot/+/46724/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46724/2//COMMIT_MSG@43 PS2, Line 43: reverted the scancode : selection made before
"because scancode set #2 is usually the default"
Done
https://review.coreboot.org/c/coreboot/+/46724/2//COMMIT_MSG@45 PS2, Line 45: where
were
Done
https://review.coreboot.org/c/coreboot/+/46724/2/payloads/libpayload/drivers... File payloads/libpayload/drivers/i8042/keyboard.c:
https://review.coreboot.org/c/coreboot/+/46724/2/payloads/libpayload/drivers... PS2, Line 329: /* Set scancode set 1 */
Needs an update.
Done
https://review.coreboot.org/c/coreboot/+/46724/2/payloads/libpayload/drivers... PS2, Line 374: 2 : 1
This should probably use I8042_SCANCODE_SET_2 : I8042_SCANCODE_SET_1 , or delete the seemingly now u […]
I guess the parameter is clear enough. Removed the definitions.