]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r341329:
authorToomas Soome <tsoome@FreeBSD.org>
Sun, 30 Dec 2018 09:05:02 +0000 (09:05 +0000)
committerToomas Soome <tsoome@FreeBSD.org>
Sun, 30 Dec 2018 09:05:02 +0000 (09:05 +0000)
commit6065af357329beb6860f9be797a1a9e5cb73b526
tree44dd4f4401009a734d54941c4a7a9a1e724eed41
parent4905afbe20f17129a0384bac309dd9d110cfe32f
MFC r341329:
loader.efi: fix EFI getchar() for multiple consoles

This fix is ported from illumos (issue #9970), the analysis and initial
implementation was done by John Levon.

See also: https://www.illumos.org/issues/9970

Currently, efi_cons_getchar() will wait for a key. While this seems to make
sense, the implementation of getchar() in common/console.c will loop across
getchar() for all consoles without doing ischar() first.

This means that if we've configured multiple consoles, we can't input into
the serial, as getchar() will be sat waiting for input only from efi_console.c

This patch does implement a bit more generic key buffer to support
translation of input keys, and we use generic efi_readkey() to reduce
duplication from calls from getchar() and poll().

Relnotes: yes
stand/efi/libefi/efi_console.c