If the system in question does not have a superIO, then a read of 0x64 will return 0xFF and we will loop forever. Signed-off-by: Jordan Crouse Index: libpayload/drivers/keyboard.c =================================================================== --- libpayload.orig/drivers/keyboard.c 2008-10-15 17:22:11.000000000 -0600 +++ libpayload/drivers/keyboard.c 2008-10-15 17:39:12.000000000 -0600 @@ -175,11 +175,10 @@ while (inb(0x64) & 2); } - int keyboard_havechar(void) { unsigned char c = inb(0x64); - return c & 1; + return (c == 0xFF) ? 0 : c & 1; } unsigned char keyboard_get_scancode(void) @@ -332,6 +331,12 @@ u8 mode; map = &keyboard_layouts[0]; + /* If 0x64 returns 0xff, then we have no keyboard + * controller */ + + if (inb(0x64) == 0xFF) + return; + /* Empty keyboard buffer */ while (keyboard_havechar()) keyboard_getchar(); -- Jordan Crouse Systems Software Development Engineer Advanced Micro Devices, Inc.