Dear SeaBIOS folks,
coreboots board status repository has some SeaBIOS warnings, and I believe the keyboard doesn’t work in that case.
``` $ git grep 'Timeout at i8042_flush' origin/master -- origin/master:amd/lamar/4.0-9540-gae5ab60/2015-04-30T02:12:19Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:amd/olivehill/4.0-7005-gb9a0809/2014-10-08T13:44:17Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:amd/olivehillplus/4.0-6942-g4177db5/2014-09-19T19:38:48Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:amd/thatcher/4.3-102-g380e167/2016-02-04T18_30_40Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:aopen/dxplplusu/4.5-485-g52896c6/2016-12-04T02_03_58Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:gizmosphere/gizmo/4.0-9564-g58649b0/2015-05-03T07:14:33Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:google/panther/4.0-9491-g64c7791/2015-04-23T21:31:14Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:google/panther/4.1-340-gb38b0f2/2015-08-25T18:38:10Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:google/panther/4.3-777-g4774bb9/2016-04-18T13_11_58Z/coreboot_console.txt:|7f6bc000| WARNING - Timeout at i8042_flush:71! origin/master:hp/2760p/4.5-906-g3fb6e6e-dirty/2017-01-27T03_04_14Z/coreboot_console.txt:|7feca000| WARNING - Timeout at i8042_flush:71! origin/master:hp/2760p/4.5-911-g9510156/2017-01-28T14_47_33Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:hp/2760p/4.5-913-g0f70fbd/2017-01-29T02_16_08Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:intel/bayleybay_fsp/4.0-6293-g0b4b230/2014-06-25T23:32:28Z/coreboot_console.txt:|7ba9a000| WARNING - Timeout at i8042_flush:71! origin/master:intel/minnowmax/4.2-429-g4013469/2015-11-30T20_21_41Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:intel/minnowmax/4.2-429-g4013469/2015-11-30T20_21_41Z/tests/cbmem-console.log:WARNING - Timeout at i8042_flush:71! origin/master:intel/minnowmax/4.5-306-g00ad7ff/2016-11-17T17_00_43Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:intel/minnowmax/4.5-306-g00ad7ff/2016-11-17T17_00_43Z/tests/cbmem-console.log:WARNING - Timeout at i8042_flush:71! origin/master:pcengines/alix2d/4.0-6723-ga0a3727-dirty/2014-08-15T23:01:34Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:pcengines/alix2d/4.0-6723-ga0a3727/2014-08-15T01:44:46Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:pcengines/apu1/4.4-422-g9aba60e/2016-06-05T08_06_37Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:pcengines/apu2/4.5-801-gfeb4ef6/2017-01-11T16_15_42Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! origin/master:siemens/mc_tcu3/4.4-108-g0d4e124/2016-05-09T06_14_45Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71! ```
I also experience this sometimes on a Lenovo X60, when I load the SeaBIOS ELF file from GRUB with the commands below.
```
chainloader (cbfsdisk)/img/seabios boot
```
Every time, the keyboard doesn’t work – on the Lenovo X60 it’s connected over the PS/2 port – the error message `Timeout at i8042_flush:71!` can be seen.
Note, that it’s unlikely to be a timing issue, as the keyboard works in the GRUB payload *before*.
Any idea, what causes the problem, and is there a way to fix it?
Thanks,
Paul
On Sun, Jan 29, 2017 at 10:08:10AM +0100, Paul Menzel wrote:
Dear SeaBIOS folks,
coreboots board status repository has some SeaBIOS warnings, and I believe the keyboard doesn’t work in that case.
$ git grep 'Timeout at i8042_flush' origin/master -- origin/master:amd/lamar/4.0-9540-gae5ab60/2015-04-30T02:12:19Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71!
I don't think that warning is a problem - it generally indicates that a ps2 port isn't present. So, I suspect most of these boards lack the ps2 port.
[...]
I also experience this sometimes on a Lenovo X60, when I load the SeaBIOS ELF file from GRUB with the commands below.
> chainloader (cbfsdisk)/img/seabios > boot
Every time, the keyboard doesn’t work – on the Lenovo X60 it’s connected over the PS/2 port – the error message `Timeout at i8042_flush:71!` can be seen.
Note, that it’s unlikely to be a timing issue, as the keyboard works in the GRUB payload *before*.
Any idea, what causes the problem, and is there a way to fix it?
I don't have much help. The message appears after 16 bytes are read from the port and the port still indcates data is available. I can't think of any valid situation where that would occur.
Is the problem reproducible?
-Kevin
Dear Kevin,
Am Sonntag, den 29.01.2017, 14:18 -0500 schrieb Kevin O'Connor:
On Sun, Jan 29, 2017 at 10:08:10AM +0100, Paul Menzel wrote:
coreboots board status repository has some SeaBIOS warnings, and I believe the keyboard doesn’t work in that case.
$ git grep 'Timeout at i8042_flush' origin/master -- origin/master:amd/lamar/4.0-9540-gae5ab60/2015-04-30T02:12:19Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71!
I don't think that warning is a problem - it generally indicates that a ps2 port isn't present. So, I suspect most of these boards lack the ps2 port.
[...]
I also experience this sometimes on a Lenovo X60, when I load the SeaBIOS ELF file from GRUB with the commands below.
> chainloader (cbfsdisk)/img/seabios > boot
Every time, the keyboard doesn’t work – on the Lenovo X60 it’s connected over the PS/2 port – the error message `Timeout at i8042_flush:71!` can be seen.
Note, that it’s unlikely to be a timing issue, as the keyboard works in the GRUB payload *before*.
Any idea, what causes the problem, and is there a way to fix it?
I don't have much help. The message appears after 16 bytes are read from the port and the port still indcates data is available. I can't think of any valid situation where that would occur.
Is the problem reproducible?
I couldn’t reproduce the log message above. I think, I rebuild SeaBIOS with higher debug level, but I am not sure.
With that, I get a non-working keyboard in SeaBIOS, when loading SeaBIOS without timeout from GRUB. Then the problem can be reproduced each time despite having the file `etc/ps2-keyboard-spinup` with 3 seconds in CBFS.
``` i8042 self test failed (got fa not 0x55) ```
Could it be that the keyboard is in an „unclean“ state from GRUB, which also still probed it?
Thanks,
Paul
On Thu, Feb 02, 2017 at 09:21:17PM +0100, Paul Menzel wrote:
Am Sonntag, den 29.01.2017, 14:18 -0500 schrieb Kevin O'Connor:
On Sun, Jan 29, 2017 at 10:08:10AM +0100, Paul Menzel wrote:
coreboots board status repository has some SeaBIOS warnings, and I believe the keyboard doesn’t work in that case.
$ git grep 'Timeout at i8042_flush' origin/master -- origin/master:amd/lamar/4.0-9540-gae5ab60/2015-04-30T02:12:19Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71!
I don't think that warning is a problem - it generally indicates that a ps2 port isn't present. So, I suspect most of these boards lack the ps2 port.
[...]
I also experience this sometimes on a Lenovo X60, when I load the SeaBIOS ELF file from GRUB with the commands below.
> chainloader (cbfsdisk)/img/seabios > boot
Every time, the keyboard doesn’t work – on the Lenovo X60 it’s connected over the PS/2 port – the error message `Timeout at i8042_flush:71!` can be seen.
Note, that it’s unlikely to be a timing issue, as the keyboard works in the GRUB payload *before*.
Any idea, what causes the problem, and is there a way to fix it?
I don't have much help. The message appears after 16 bytes are read from the port and the port still indcates data is available. I can't think of any valid situation where that would occur.
Is the problem reproducible?
I couldn’t reproduce the log message above. I think, I rebuild SeaBIOS with higher debug level, but I am not sure.
With that, I get a non-working keyboard in SeaBIOS, when loading SeaBIOS without timeout from GRUB. Then the problem can be reproduced each time despite having the file `etc/ps2-keyboard-spinup` with 3 seconds in CBFS.
i8042 self test failed (got fa not 0x55)
Could it be that the keyboard is in an „unclean“ state from GRUB, which also still probed it?
Does the patch below help?
-Kevin
--- a/src/hw/ps2port.c +++ b/src/hw/ps2port.c @@ -449,11 +449,22 @@ ps2_check_event(void) static void ps2_keyboard_setup(void *data) { - /* flush incoming keys */ + // flush incoming keys (also verifies port is likely present) int ret = i8042_flush(); if (ret) return;
+ // Disable keyboard / mouse and drain any input they may have sent + ret = i8042_command(I8042_CMD_KBD_DISABLE, 0); + if (ret) + return; + ret = i8042_command(I8042_CMD_AUX_DISABLE, 0); + if (ret) + return; + ret = i8042_flush(); + if (ret) + return; + // Controller self-test. u8 param[2]; ret = i8042_command(I8042_CMD_CTL_TEST, param);
Dear Kevin,
Am Freitag, den 03.02.2017, 12:11 -0500 schrieb Kevin O'Connor:
On Thu, Feb 02, 2017 at 09:21:17PM +0100, Paul Menzel wrote:
Am Sonntag, den 29.01.2017, 14:18 -0500 schrieb Kevin O'Connor:
On Sun, Jan 29, 2017 at 10:08:10AM +0100, Paul Menzel wrote:
coreboots board status repository has some SeaBIOS warnings, and I believe the keyboard doesn’t work in that case.
$ git grep 'Timeout at i8042_flush' origin/master -- origin/master:amd/lamar/4.0-9540-gae5ab60/2015-04-30T02:12:19Z/coreboot_console.txt:WARNING - Timeout at i8042_flush:71!
I don't think that warning is a problem - it generally indicates that a ps2 port isn't present. So, I suspect most of these boards lack the ps2 port.
[...]
I also experience this sometimes on a Lenovo X60, when I load the SeaBIOS ELF file from GRUB with the commands below.
> chainloader (cbfsdisk)/img/seabios > boot
Every time, the keyboard doesn’t work – on the Lenovo X60 it’s connected over the PS/2 port – the error message `Timeout at i8042_flush:71!` can be seen.
Note, that it’s unlikely to be a timing issue, as the keyboard works in the GRUB payload *before*.
Any idea, what causes the problem, and is there a way to fix it?
I don't have much help. The message appears after 16 bytes are read from the port and the port still indcates data is available. I can't think of any valid situation where that would occur.
Is the problem reproducible?
I couldn’t reproduce the log message above. I think, I rebuild SeaBIOS with higher debug level, but I am not sure.
With that, I get a non-working keyboard in SeaBIOS, when loading SeaBIOS without timeout from GRUB. Then the problem can be reproduced each time despite having the file `etc/ps2-keyboard-spinup` with 3 seconds in CBFS.
i8042 self test failed (got fa not 0x55)
Could it be that the keyboard is in an „unclean“ state from GRUB, which also still probed it?
Does the patch below help?
[…]
Yes, it does.
Tested-by: Paul Menzel paulepanter@users.sourceforge.net
Thanks,
Paul
On Sun, Feb 05, 2017 at 01:02:55PM +0100, Paul Menzel wrote:
Am Freitag, den 03.02.2017, 12:11 -0500 schrieb Kevin O'Connor:
On Thu, Feb 02, 2017 at 09:21:17PM +0100, Paul Menzel wrote:
With that, I get a non-working keyboard in SeaBIOS, when loading SeaBIOS without timeout from GRUB. Then the problem can be reproduced each time despite having the file `etc/ps2-keyboard-spinup` with 3 seconds in CBFS.
i8042 self test failed (got fa not 0x55)
Could it be that the keyboard is in an „unclean“ state from GRUB, which also still probed it?
Does the patch below help?
[…]
Yes, it does.
Tested-by: Paul Menzel paulepanter@users.sourceforge.net
Matt, John - any chance you can see if the patch below also fixes issues you were seeing with ps2 keyboards on some of the chromebooks?
-Kevin
--- a/src/hw/ps2port.c +++ b/src/hw/ps2port.c @@ -449,11 +449,22 @@ ps2_check_event(void) static void ps2_keyboard_setup(void *data) { - /* flush incoming keys */ + // flush incoming keys (also verifies port is likely present) int ret = i8042_flush(); if (ret) return;
+ // Disable keyboard / mouse and drain any input they may have sent + ret = i8042_command(I8042_CMD_KBD_DISABLE, NULL); + if (ret) + return; + ret = i8042_command(I8042_CMD_AUX_DISABLE, NULL); + if (ret) + return; + ret = i8042_flush(); + if (ret) + return; + // Controller self-test. u8 param[2]; ret = i8042_command(I8042_CMD_CTL_TEST, param);
On Sun, Feb 05, 2017 at 01:02:55PM +0100, Paul Menzel wrote:
Am Freitag, den 03.02.2017, 12:11 -0500 schrieb Kevin O'Connor:
Does the patch below help?
[…]
Yes, it does.
Tested-by: Paul Menzel paulepanter@users.sourceforge.net
Thanks - I committed this patch.
-Kevin