[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grub-help
Subject:    GRUB2 time functions not working with Hyper-V Generation 2
From:       Rigoberto Corujo <rcorujo () yahoo ! com>
Date:       2014-09-28 18:27:41
Message-ID: 1411928861.10823.YahooMailNeo () web120204 ! mail ! ne1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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:  
Hyper-V generation 2 virtual machines – part 1 - John Howard - Senior Program \
Manager in the Hyper-V team at Microsoft - Site Home - TechNet Blogs  
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


[Attachment #5 (text/html)]

<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, \
Helvetica Neue, Helvetica, Arial, Lucida Grande, \
sans-serif;font-size:14px"><div>Hi,</div><div>&nbsp;</div><div>When using the Hyper-V \
Generation 2 hypervisor and trying to PXE boot a VM guest, the GRUB2&nbsp;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.&nbsp; In other words, \
the time goes by superfast.&nbsp; For example, you'll get the \
message:</div><div>&nbsp;</div><div>error: time out opening \
`rhel60x64/vmlinuz'.</div><div>&nbsp;</div><div>This is because the functions \
in&nbsp;"./grub-core/kern/i386/tsc.c" that are used to calculate time are not \
working.</div><div><font face="Times New Roman" size="3"></font>&nbsp;</div><div \
style="color: rgb(0, 0, 0); font-family: Times New  Roman; font-size: 16px; \
font-style: normal; background-color: transparent;">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:</div><div style="color: rgb(0, 0, 0); font-family: Times New \
Roman; font-size: 16px; font-style: normal; background-color: \
transparent;">&nbsp;</div><div style="margin: 0in 0in 0pt;"><a \
href="http://blogs.technet.com/b/jhoward/archive/2013/10/24/hyper-v-generation-2-virtual-machines-part-1.aspx#pi47623=2">Hyper-V \
generation 2 virtual machines – part 1 - John Howard - Senior Program Manager in \
the Hyper-V team at Microsoft - Site Home - TechNet Blogs</a></div><div \
style="margin: 0in 0in 0pt; color: rgb(0, 0, 255); font-family: Calibri; font-size: \
16px; font-style: normal; background-color: transparent;"><font color="#000000" \
face="Helvetica"></font>&nbsp;</div><div style="margin: 0in 0in 0pt; color: rgb(0, 0, \
0); font-family: Helvetica;  font-size: 16px; font-style: normal; background-color: \
transparent;">Referring to changes made to Hyper-V Generation 2, it says:</div><o:p \
style="margin: 0in 0in 0pt;"><font face="Calibri" size="3"></font></o:p><o:p \
style="margin: 0in 0in 0pt; color: rgb(0, 0, 0); font-family: Calibri; font-size: \
16px; font-style: normal; background-color: transparent;"><em>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), <font color="#9d1811">the Programmable \
Interrupt Timer (PIT),</font> 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, <font \
color="#9d1811">we also removed the speaker</font> and the numerical co-processor. We \
also revised ACPI.</em></o:p><div><font face="Times New Roman" size="3">

</font></div><div style="color: rgb(0, 0, 0); font-family: Times New Roman; \
font-size: 16px; font-style: normal; background-color: transparent;">I noticed that \
in "tsc.c", the grub_inb(GRUB_PIT_SPEAKER_PORT) call always returns 0xff on Hyper-V \
Generation 2.</div><div style="color: rgb(0, 0, 0); font-family: Times New Roman; \
font-size: 16px; font-style: normal; background-color: transparent;">&nbsp;</div><div \
style="color: rgb(0, 0, 0); font-family: Times New Roman; font-size: 16px; \
font-style: normal; background-color: transparent;">static void<br>grub_pit_wait \
(grub_uint16_t tics)<br>{</div><div style="color: rgb(0, 0, 0); font-family: Times \
New Roman; font-size: 16px; font-style: normal; background-color: \
transparent;">...<br>&nbsp; grub_outb (grub_inb (<font \
color="#9d1811">GRUB_PIT_SPEAKER_PORT</font>)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&amp; ~ (GRUB_PIT_SPK_DATA |  \
GRUB_PIT_SPK_TMR2),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
GRUB_PIT_SPEAKER_PORT);<br>...</div><div style="color: rgb(0, 0, 0); font-family: \
Times New Roman; font-size: 16px; font-style: normal; background-color: \
transparent;">}</div><div style="color: rgb(0, 0, 0); font-family: Times New Roman; \
font-size: 16px; font-style: normal; background-color: transparent;">&nbsp;</div><div \
style="color: rgb(0, 0, 0); font-family: Times New Roman; font-size: 16px; \
font-style: normal; background-color: transparent;">Is this a known issue that is \
already being addressed?</div><div style="color: rgb(0, 0, 0); font-family: Times New \
Roman; font-size: 16px; font-style: normal; background-color: \
transparent;">&nbsp;</div><div style="color: rgb(0, 0, 0); font-family: Times New \
Roman; font-size: 16px; font-style: normal; background-color: transparent;">Thank \
you,</div><div style="color: rgb(0, 0, 0); font-family: Times New Roman;  font-size: \
16px; font-style: normal; background-color: transparent;">&nbsp;</div><div \
style="color: rgb(0, 0, 0); font-family: Times New Roman; font-size: 16px; \
font-style: normal; background-color: transparent;">Rigoberto \
Corujo</div></div></body></html>



_______________________________________________
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic