Michael Bideau
33203ca348
at_keyboard: Fix unreliable key presses
...
This patch fixes an issue that prevented the at_keyboard module to work
(for me). The cause was a bad/wrong return value in the
grub_at_keyboard_getkey() function in grub-core/term/at_keyboard.c file
at line 237. My symptoms were to have an unresponsive keyboard. Keys
needed to be pressed 10x and more to effectively be printed sometimes
generating multiple key presses (after 1 or 2 sec of no printing). It
was very problematic when typing passphrase in early stage (with
GRUB_ENABLE_CRYPTODISK). When switched to "console" terminal input
keyboard worked perfectly. It also worked great with the GRUB 2.02
packaged by Debian (2.02+dfsg1-20). It was not an output issue but an
input one.
I've managed to analyze the issue and found that it came from the commit
216950a4e
(at_keyboard: Split protocol from controller code.). Three
lines where moved from the fetch_key() function in
grub-core/term/at_keyboard.c file to the beginning of
grub_at_keyboard_getkey() function (same file). However, returning -1
made sense when it happened in fetch_key() function but not anymore in
grub_at_keyboard_getkey() function which should return GRUB_TERM_NO_KEY.
I think it was just an incomplete cut-paste missing a small manual
correction. Let's fix it.
Note: Commit message updated by Daniel Kiper.
Signed-off-by: Michael Bideau <mica.devel@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-10-21 14:07:47 +02:00
Hans de Goede
edece25a77
efi/console: Fix the "enter" key not working on x86 tablets
...
Most 8" or 7" x86 Windows 10 tablets come with volume up/down buttons and
a power-button. In their UEFI these are almost always mapped to arrow
up/down and enter.
Pressing the volume buttons (sometimes by accident) will stop the
menu countdown, but the power-button / "enter" key was not being recognized
as enter, so the user would be stuck at the grub menu.
The problem is that these tablets send scan_code 13 or 0x0d for the
power-button, which officialy maps to the F3 key. They also set
unicode_char to 0x0d.
This commit recognizes the special case of both scan_code and unicode_char
being set to 0x0d and treats this as an enter key press.
This fixes things getting stuck at the grub-menu and allows the user
to choice a grub-menu entry using the buttons on the tablet.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2018-07-11 11:53:28 +02:00
Pete Batard
bdd89d239c
core: use GRUB_TERM_ definitions when handling term characters
...
* Also use hex value for GRUB_TERM_ESC as '\e' is not in the C standard and is not understood by some compilers
2017-08-07 19:28:22 +02:00
Vladimir Serbinenko
c4b8bec5fe
at_keyboard: Fix falco chromebook case.
...
EC is slow, so we need few delays for it to toggle the bits correctly.
Command to enable clock and keyboard were not sent.
2017-05-09 14:27:52 +02:00
Julius Werner
70b555a52a
coreboot: Changed cbmemc to support updated console format from coreboot.
2017-05-09 09:03:02 +02:00
Vladimir Serbinenko
5c3fd1b135
arm_coreboot: Add Chromebook keyboard driver.
2017-05-09 08:47:34 +02:00
Vladimir Serbinenko
848bed9d92
arm_coreboot: Support keyboard for vexpress.
2017-05-08 21:42:37 +02:00
Vladimir Serbinenko
216950a4ee
at_keyboard: Split protocol from controller code.
...
On vexpress controller is different but protocol is the same, so reuse the
code.
2017-05-08 21:41:22 +02:00
Vladimir Serbinenko
461bfab7b7
coreboot: Split parts that are platform-independent.
...
We currently assume that coreboot is always i386, it's no longer the case,
so split i386-coreboot parts from generic coreboot code.
2017-05-08 19:10:24 +02:00
Vladimir Serbinenko
6f5aa28bc2
gfxterm: Fix clearing of cursor.
...
If ascent is bigger than height - 2, then we draw over character box but then
to clear cursor we only draw over character box. So trim ascent if necessarry.
2017-01-31 18:49:37 +01:00
Andrei Borzenkov
c831d2073b
at_keyboard: fix numpad "0" and "." mapping
...
Reported for set 1 by fgndevelop <fgndevelop@posteo.org>. Apparently
set 2 was reversed too.
2016-07-27 08:33:12 +03:00
Vladimir Serbinenko
0678b5d629
usb_keyboard: Remove useless include
...
This prevents non-PCI machines from having USB.
2016-02-22 20:05:54 +01:00
Andrei Borzenkov
5fcde03bf1
efi: fix warnings with recent GCC
...
../../grub-core/term/efi/console.c:128:32: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
if (key.unicode_char >= 0x20 && key.unicode_char <= 0x7f
2015-10-27 23:30:54 +03:00
Peter Jones
9e5f70174e
Use EFI_SIMPLE_TEXT_INPUT_EX to support key combinations.
2015-10-25 16:36:28 +01:00
Andrei Borzenkov
e7e05cae8d
efi/serial: fix memory leak
...
Found by: Coverity scan.
CID: 96678
2015-06-20 23:38:19 +03:00
Vladimir Serbinenko
c453760c71
* grub-core/term/gfxterm.c: Avoid division by zero.
2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
e95685dab1
Avoid division by zero in serial.
2015-01-21 17:42:13 +01:00
Andrei Borzenkov
bac5d1a64a
Fix serial --rtscts option processing
2014-12-09 21:56:39 +03:00
Vladimir Serbinenko
3c05833249
* grub-core/term/at_keyboard.c: Retry probing keyboard if
...
scancode setup failed.
2014-08-13 23:04:01 +02:00
Vladimir Serbinenko
7f64fb590c
* grub-core/term/at_keyboard.c: Tolerate missing keyboard.
2014-01-26 03:31:10 +01:00
Vladimir Serbinenko
9afe2053c9
* grub-core/term/serial.c (grub_serial_register): Fix invalid free.
...
Ensure that pointers are inited to NULL and that pointers are not
accessed after free.
2014-01-26 02:36:05 +01:00
Vladimir Serbinenko
3abb956371
* grub-core/term/terminfo.c: Recognize keys F1-F12.
2014-01-18 16:57:35 +01:00
Vladimir Serbinenko
ae558c2ccf
Enable -Wformat=2 if it's supported.
2013-12-21 15:28:28 +01:00
Vladimir Serbinenko
065adc346c
Clarify several translatable messages.
2013-12-21 03:21:45 +01:00
Vladimir Serbinenko
bfdfeb2508
Clarify several translatable messages.
2013-12-21 01:41:16 +01:00
Vladimir Serbinenko
72c9a50773
Remove xen VFB.
...
Due to XEN bug it prevents Linux boot. Remove it at least, until
workaround is found.
2013-12-18 18:43:09 +01:00
Vladimir Serbinenko
636977b089
Mark strings for translation and add remaining ones to exclude list.
2013-12-18 06:50:24 +01:00
Vladimir Serbinenko
71669c3b76
Implement XEN VFB support.
2013-12-17 13:07:26 +01:00
Vladimir Serbinenko
cd15c394cc
* grub-core/osdep/windows/emuconsole.c (grub_console_putchar):
...
Remove variable length arrays.
* grub-core/term/efi/console.c (grub_console_putchar): Likewise.
2013-12-04 10:05:33 +01:00
Vladimir Serbinenko
971dbee521
* grub-core/term/arc/console.c: Add missing cast to silence warning.
2013-11-24 05:05:34 +01:00
Vladimir Serbinenko
5e3cb8a747
* grub-core/term/terminfo.c (grub_cmd_terminfo): Fix a typo to make -g
...
work again.
2013-11-18 14:35:18 +01:00
Vladimir Serbinenko
f649a6a8fd
* grub-core/term/tparm.c (tparam_internal): Use unsigned divisions.
2013-11-13 00:51:06 +01:00
Vladimir Serbinenko
0c62a5b28e
* grub-core/term/at_keyboard.c: Don't poll non-functional AT controller
...
until it becomes operational.
2013-11-12 19:30:46 +01:00
Vladimir Serbinenko
2024ade285
* grub-core/term/ieee1275/escc.c (GRUB_MOD_INIT): Fix order of channels.
...
Reported by: Aaro Koskinen <aaro.koskinen@iki.fi>
2013-11-10 17:53:11 +01:00
Vladimir Serbinenko
9612ebc00e
Add new ports: i386-xen and x86_64-xen. This allows running GRUB in
...
XEN PV environment and load kernels.
2013-11-09 21:29:11 +01:00
Vladimir Serbinenko
9f8acdaa5d
* grub-core/term/serial.c: Add option for enabling/disabling
...
RTS/CTS flow control.
2013-11-08 18:20:20 +01:00
Vladimir Serbinenko
810f991b9e
* grub-core/term/terminfo.c: Add sequences for home and end.
2013-11-05 02:44:31 +01:00
Vladimir Serbinenko
896f913571
* grub-core/term/serial.c (options), (grub_cmd_serial): Fix handling
...
of SI suffixes.
2013-11-01 19:46:30 +01:00
Vladimir Serbinenko
89295a0628
Support --base-clock for serial command to handle weird cards with
...
non-standard base clock.
2013-11-01 19:33:22 +01:00
Vladimir Serbinenko
a28567364a
Make char and string width grub_size_t rather than grub_ssize_t.
2013-10-25 23:58:24 +02:00
Vladimir Serbinenko
af81ed880d
* conf/Makefile.common (CPPFLAGS_KERNEL): Add -DGRUB_KERNEL=1.
...
* include/grub/dl.h (GRUB_MOD_INIT), (GRUB_MOD_FINI): Define
functions when compiling for kernel.
2013-10-25 16:07:01 +02:00
Paulo Flabiano Smorigo
84a0e9699f
Add progress module to display load progress of files.
...
* grub-core/lib/progress.c: New file.
* grub-core/Makefile.core.def (progress): New module.
* grub-core/kern/file.c (grub_file_open): File name added.
* (grub_file_read): Progress hook added.
* grub-core/fs/cbfs.c (grub_cbfs_read): Likewise.
* grub-core/fs/cpio_common.c (grub_cpio_read): Likewise.
* grub-core/net/net.c (grub_net_fs_read_real): Likewise.
* include/grub/file.h (struct grub_file): Add progress module
* members.
* include/grub/term.h (struct grub_term_output): Likewise.
* grub-core/osdep/unix/emuconsole.c (grub_console_term_output):
Terminal velocity added.
* grub-core/osdep/windows/emuconsole.c (grub_console_term_output):
* Likewise.
* grub-core/term/arc/console.c (grub_console_term_output): Likewise.
* grub-core/term/efi/console.c (grub_console_term_output): Likewise.
* grub-core/term/gfxterm.c (grub_video_term): Likewise.
* grub-core/term/i386/coreboot/cbmemc.c (grub_cbmemc_term_output):
* Likewise.
* grub-core/term/i386/pc/console.c (grub_console_term_output):
* Likewise.
* grub-core/term/i386/pc/vga_text.c (grub_vga_text_term): Likewise.
* grub-core/term/ieee1275/console.c (grub_console_term_output):
* Likewise.
* grub-core/term/morse.c (grub_audio_term_output): Likewise.
* grub-core/term/serial.c (grub_serial_term_output): Likewise.
* grub-core/term/spkmodem.c (grub_spkmodem_term_output): Likewise.
* grub-core/term/uboot/console.c (uboot_console_term_output):
* Likewise.
2013-10-22 16:42:20 -02:00
Vladimir 'phcoder' Serbinenko
e89c2d48a9
Lift 255x255 erminal sie restriction to 65535x65535. Also change from
...
bitmasks to small structures of size chosen to fit in registers.
2013-10-19 23:59:32 +02:00
Vladimir 'phcoder' Serbinenko
ea73acd2ce
* grub-core/term/i386/pc/vga_text.c: Remove extra declaration of
...
cur_color.
2013-10-18 16:30:30 +02:00
Hiroyuki YAMAMORI
ceca6ddf26
Handle Japanese special keys.
...
Reported by: Hiroyuki YAMAMORI.
Codes supplied by: Hiroyuki YAMAMORI.
2013-10-17 00:49:05 +02:00
Vladimir 'phcoder' Serbinenko
69ca587652
* grub-core/osdep/windows/emuconsole.c: New file.
2013-10-14 21:33:55 +02:00
Melki Christian
3414b6c0e2
* grub-core/term/at_keyboard.c [DEBUG_AT_KEYBOARD]: Fix compilation
...
error when enabling debug.
2013-10-12 08:11:19 +02:00
Vladimir 'phcoder' Serbinenko
4fa60739f2
* grub-core/term/gfxterm.c: Add flag "functional" to skip input when
...
changing windows to avoid crash.
2013-10-03 23:32:19 +02:00
Vladimir 'phcoder' Serbinenko
e84f818865
* grub-core/term/terminfo.c (grub_terminfo_readkey): Fix
...
usage of wrong table which resulted in mishandling of 4-byte
sequences.
2013-09-28 01:03:31 +02:00
Vladimir 'phcoder' Serbinenko
2237daf246
* grub-core/term/terminfo.c: Add Home and End key sequences.
2013-09-28 00:55:38 +02:00