help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRUB2 time functions not working with Hyper-V Generation 2


From: Rigoberto Corujo
Subject: Re: GRUB2 time functions not working with Hyper-V Generation 2
Date: Wed, 8 Oct 2014 19:07:31 +0000 (UTC)

Hi,

I've attached a proposed patch to the following bug report.

https://savannah.gnu.org/bugs/index.php?42944

bug #42944: TFTP: "error: timeout reading '/rhel60x64/vmlinuz'" on hyper-v Generation 2 VMs with UEFI and secure boot disabled

I would like to ask the GRUB2 developers if they can please review the patch and, if it's acceptable, submit the changes.

Thank you,

Rigoberto Corujo

On Sunday, September 28, 2014 2:27 PM, Rigoberto Corujo <address@hidden> wrote:


Hi,
 
When using the Hyper-V Generation 2 hypervisor and trying to PXE boot a VM guest, the GRUB2 time functions are not working, which causes the PXE menu to display for a fraction of a second, instead of the usual 10 seconds or so, then boot the default menu entry, and immediately report that it timed out while loading the kernel.  In other words, the time goes by superfast.  For example, you'll get the message:
 
error: time out opening `rhel60x64/vmlinuz'.
 
This is because the functions in "./grub-core/kern/i386/tsc.c" that are used to calculate time are not working.
 
I found this site, which seems to say that the devices that GRUB2 uses to calculate the time have been removed from Hyper-V Generation 2:
 
 
Referring to changes made to Hyper-V Generation 2, it says:
Then we changed other devices such as removing the legacy i8042 keyboard controller (which has an interesting side effect I will talk about in a future part), PS/2 mouse, S3 Video, the Programmable Interrupt Controller (PIC), the Programmable Interrupt Timer (PIT), the Super I/O device on which floppy support relied. We actually went even further by removing the PCI bus as well. For good measure, we also removed the speaker and the numerical co-processor. We also revised ACPI.
I noticed that in "tsc.c", the grub_inb(GRUB_PIT_SPEAKER_PORT) call always returns 0xff on Hyper-V Generation 2.
 
static void
grub_pit_wait (grub_uint16_t tics)
{
...
  grub_outb (grub_inb (GRUB_PIT_SPEAKER_PORT)
             & ~ (GRUB_PIT_SPK_DATA | GRUB_PIT_SPK_TMR2),
             GRUB_PIT_SPEAKER_PORT);
...
}
 
Is this a known issue that is already being addressed?
 
Thank you,
 
Rigoberto Corujo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]