<div dir="ltr">There was a bug introduced earlier this year booting grub in uefi mode. Our setup looks like the following:<div><br></div><div>ipxe script:</div><div>
<p class="inbox-inbox-p1"><span class="inbox-inbox-s1">#!ipxe<br></span>chain <span class="inbox-inbox-s2"><a href="http://192.168.0.1/script.ipxe">http://192.168.0.1/script.ipxe</a></span></p></div><div><span class="inbox-inbox-s2">192.168.0.1 is a webserver that serves up a grub.efi file and another script at /script.ipxe:</span></div><div><span class="inbox-inbox-s2"><br></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s1">#!ipxe<br></span>chain<span class="inbox-inbox-Apple-converted-space"> </span><span class="inbox-inbox-inbox-inbox-s2">grub.uefi</span><br></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s2"><br></span></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s2">This successfully chains into grub, but attempting to boot in grub fails:</span></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s2"><br></span></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s2">insmod net</span></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s2">insmod efinet</span></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s2">insmod http</span></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s2"><div>net_add_addr eno0 efinet0 192.168.10.10</div><div>set net_default_server=192.168.10.1</div><div>echo 'Loading kernel'</div><div>linux (http)/kernel initrd=initrd console=ttyS0,9600 console=tty0</div><div>echo 'Loading initrd'</div><div>initrd (http)/initrd</div><div>boot</div><div><br></div><div>The boot just hangs. With debug on, grub prints out a bunch of memory mapping statements like "mmap/efi/mmap.c:66: EFI memory region 0xff000000-0x100000000: 11" but eventually stops . This same process worked with an older version of ipxe. Git-bisect shows that the following commit as the offender:</div>
<div><br></div><div>commit <b>757ab983811ac8d3f65efb65b8309738bd33bea3</b><br></div><div>
<p class="inbox-inbox-p1"><span class="inbox-inbox-s1">Author: Michael Brown <<a href="mailto:mcb30@ipxe.org"><span class="inbox-inbox-s2">mcb30@ipxe.org</span></a>></span></p>
<p class="inbox-inbox-p1"><span class="inbox-inbox-s1">Date: Wed May 4 13:04:33 2016 +0100</span></p>
<p class="inbox-inbox-p1"><span class="inbox-inbox-s1"> [efi] Use a timer event to generate the currticks() timer</span></p><p class="inbox-inbox-p1">For further verification if we git-revert both 694c18addc0dfdf51369f6d598dd0c8ca4bf2861 (which made a small modification to the timers) and 757ab983811ac8d3f65efb65b8309738bd33bea3 the boot process works again. We have tested using edk2 in qemu/kvm and real x86_64 hardware with the same result.</p><p class="inbox-inbox-p1">This leads me to believe there is something wrong with the timer code, but it isn't obvious what it might be. Adding DEBUG=efi_timer:3 only seems to print the line "EFI timer started at 20 ticks per second". For now we have just reverted the patches since we don't need ARM support, but we would be happy to help test if anyone has an idea what might be causing the freeze.<br></p><p class="inbox-inbox-p1">Vish</p>
</div></span></span></div><div><span class="inbox-inbox-s2"><span class="inbox-inbox-inbox-inbox-s2"><br></span></span></div></div>