Bug #141

GRUB payload hangs in HP Elitebooks

Added by Iru Cai almost 2 years ago.

Status:NewStart date:09/19/2017
Priority:NormalDue date:
Assignee:Iru Cai% Done:

0%

Category:-
Target version:-

Description

There may be some problem when initializing the keyboard controller, but SeaBIOS payload works fine. Using GRUB payload directly or chainload GRUB payload with SeaBIOS will both hang the system.

I modified GRUB and find it hangs in set_scancodes(void), when calling the first write_mode. After grub_outb (mode, KEYBOARD_REG_DATA);, the keyboard_controller_wait_until_ready() function goes to an infinite loop.

write_mode (int mode)
{
  unsigned i;
  for (i = 0; i < GRUB_AT_TRIES; i++)
    {
      grub_uint8_t ack;
      keyboard_controller_wait_until_ready ();
      grub_outb (0xf0, KEYBOARD_REG_DATA);
      keyboard_controller_wait_until_ready ();
      grub_outb (mode, KEYBOARD_REG_DATA);
      keyboard_controller_wait_until_ready ();
      ack = wait_ack ();
      if (ack == GRUB_AT_NACK)
        continue;
      if (ack == GRUB_AT_ACK)
        break;
      return 0;
    }

  return (i != GRUB_AT_TRIES);
}

Also available in: Atom PDF