On 1/12/17 6:04 PM, Daniel Kiper wrote: > On Thu, Jan 12, 2017 at 04:23:59PM -0600, Doug Goldstein wrote: >> On 1/12/17 2:28 PM, Daniel Kiper wrote: >>> On Thu, Jan 12, 2017 at 09:52:15AM -0600, Doug Goldstein wrote: >>>> On 1/12/17 6:50 AM, Daniel Kiper wrote: >>>>> On Wed, Jan 11, 2017 at 02:20:15PM -0600, Doug Goldstein wrote: >>>>>> On 1/11/17 1:47 PM, Daniel Kiper wrote: >>>>>>> On Tue, Jan 10, 2017 at 02:51:27PM -0600, Doug Goldstein wrote: >>>>>>>> On 1/9/17 7:37 PM, Doug Goldstein wrote: > > [...] > >>>>>>>> memory region). You need to use AllocatePages() otherwise you are >>>>>>>> trampling memory that might have been allocated by the bootloader or any >>>>>>> >>>>>>> Bootloader code/data should be dead here. >>>>>> >>>>>> Correct. Unfortunately on my Lenovo laptop and my Intel NUCs I can't >>>>>> currently call ExitBootServices and a timer that iPXE has wired up has >>>>> >>>>> If you disable an important wheel in a machine you should not expect >>>>> that the machine will work. Sorry! No way! >>>> >>>> Speak to your co-workers Konrad and Boris. We've had long email threads >>>> about how certain hardware does not work with the way Xen calls >>>> ExitBootServices. >>> >>> Could you be more precise what is wrong? Or at least send links to >>> relevant threads. >> >> There have been several on the ML over the past 2 years. A quick Google >> search turns these up. >> >> http://xen.markmail.org/message/f6lx2ab4o2fch35r >> https://lists.xenproject.org/archives/html/xen-devel/2015-01/msg03164.html > > This is more or less what I expected. However, IIRC, it was not related > to ExitBootServices() itself. The problem was that some runtime services > code lived in boot services code and data regions. So, I suppose that if > you map boot services code and data regions with runtime services code > and data everything should work. However, I have just realized that we > need an option to enable this functionality from GRUB2 command line. > Though you can do a test by setting map_bs to 1 at the beginning of > efi_multiboot2(). Do not forget to enable ExitBootServices() call in Xen. On Intel NUCs, Super Micro boards and others, you are unable to call ExitBootServices() without having called SetVirtualAddressMap(). If you follow through both threads you'll see there's more than just map_bs. Konrad also proposed adding /noexitbs -- Doug Goldstein