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

List:       grub-help
Subject:    Re: GRUB2 time functions not working with Hyper-V Generation 2
From:       Rigoberto Corujo <rcorujo () yahoo ! com>
Date:       2014-10-08 19:07:31
Message-ID: 394049389.667986.1412795251204.JavaMail.yahoo () jws10092 ! mail ! ne1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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 <rcorujo@yahoo.com> \
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:  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-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, \
Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yiv5876106149"><div \
id="yui_3_16_0_1_1412794955616_8950"><div style="background-color: rgb(255, 255, \
255);" id="yui_3_16_0_1_1412794955616_8949"><div \
id="yiv5876106149yui_3_16_0_1_1412794507982_23495" style="color: rgb(0, 0, 0); \
font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', \
sans-serif; font-size: 16px;"><span></span></div><div \
id="yiv5876106149yui_3_16_0_1_1412794507982_23495" style="color: rgb(0, 0, 0); \
font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', \
sans-serif; font-size: 16px;" dir="ltr"><span>Hi,</span></div><div \
id="yiv5876106149yui_3_16_0_1_1412794507982_23495" style="color: rgb(0, 0, 0); \
font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', \
sans-serif; font-size: 16px;" dir="ltr"><span><br></span></div><div \
id="yiv5876106149yui_3_16_0_1_1412794507982_23495" style="color: rgb(0, 0, 0); \
font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', \
sans-serif; font-size: 16px;" dir="ltr"><span \
id="yui_3_16_0_1_1412794955616_9382">I've attached a proposed patch to the following \
bug report.</span></div> <div class="yiv5876106149qtdSeparateBR" \
id="yui_3_16_0_1_1412794955616_8948" style="color: rgb(0, 0, 0); font-family: \
HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; \
font-size: 16px;"><br></div><div class="yiv5876106149qtdSeparateBR" \
id="yui_3_16_0_1_1412794955616_8948"><div class="" \
id="yui_3_16_0_1_1412794955616_8948" style="color: rgb(0, 0, 0); font-family: \
HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; \
font-size: 16px;">https://savannah.gnu.org/bugs/index.php?42944</div><div class="" \
style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, \
Arial, 'Lucida Grande', sans-serif; font-size: 16px;" \
id="yui_3_16_0_1_1412794955616_9373"><br></div><div class="" \
id="yui_3_16_0_1_1412794955616_9373"><div class="" \
id="yui_3_16_0_1_1412794955616_9373" style=""><font face="HelveticaNeue, Helvetica \
Neue, Helvetica, Arial, Lucida Grande, sans-serif" class="" style="" \
id="yui_3_16_0_1_1412794955616_9396">bug #42944: TFTP: "error: timeout reading \
'/rhel60x64/vmlinuz'" on hyper-v Generation 2 VMs with UEFI and secure boot \
disabled</font></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, \
'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" \
class="" id="yui_3_16_0_1_1412794955616_9397"><br class="" style=""></div><div \
style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, \
Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class="" \
id="yui_3_16_0_1_1412794955616_9397" dir="ltr">I would like to ask the GRUB2 \
developers if they can please review the patch and, if it's acceptable, submit the \
changes.</div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica \
Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class="" \
id="yui_3_16_0_1_1412794955616_9397" dir="ltr"><br></div><div style="color: rgb(0, 0, \
0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', \
sans-serif; font-size: 16px;" class="" id="yui_3_16_0_1_1412794955616_9397" \
dir="ltr">Thank you,</div><div style="color: rgb(0, 0, 0); font-family: \
HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; \
font-size: 16px;" class="" id="yui_3_16_0_1_1412794955616_9397" \
dir="ltr"><br></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, \
'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" \
class="" id="yui_3_16_0_1_1412794955616_9397" dir="ltr">Rigoberto \
Corujo</div></div><div class="" style="color: rgb(0, 0, 0); font-family: \
HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; \
font-size: 16px;" id="yui_3_16_0_1_1412794955616_9373"><br class="" \
style=""></div></div><div class="yiv5876106149yqt0528868117" \
id="yiv5876106149yqt70214" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, \
'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: \
16px;"><div class="yiv5876106149yahoo_quoted" style="display: block;"> <div \
style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, \
sans-serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, \
Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"> <font \
size="2" face="Arial"> On Sunday, September 28, 2014 2:27 PM, Rigoberto Corujo \
&lt;rcorujo@yahoo.com&gt; wrote:<br clear="none"> </font> </div> <blockquote \
style="border-left:2px solid rgb(16, 16, \
255);margin-left:5px;margin-top:5px;padding-left:5px;">  <br clear="none"><br \
clear="none"> <div class="yiv5876106149y_msg_container"><div \
id="yiv5876106149"><div><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 rel="nofollow" shape="rect" target="_blank" \
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><font face="Calibri" \
size="3"></font><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><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 \
clear="none">grub_pit_wait (grub_uint16_t tics)<br clear="none">{</div><div \
style="color:rgb(0, 0, 0);font-family:Times New \
Roman;font-size:16px;font-style:normal;background-color:transparent;">...<br \
clear="none">&nbsp; grub_outb (grub_inb (<font \
color="#9d1811">GRUB_PIT_SPEAKER_PORT</font>)<br \
clear="none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&amp; ~ (GRUB_PIT_SPK_DATA |  GRUB_PIT_SPK_TMR2),<br \
clear="none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
GRUB_PIT_SPEAKER_PORT);<br clear="none">...</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></div></div><br clear="none"><br clear="none"></div> </blockquote>  \
</div> </div>   </div></div> </div></div></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