From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4] efi: Avoid calling boot services after ExitBootServices() Date: Tue, 9 Jun 2015 14:24:09 +0100 Message-ID: <1433856249.7108.555.camel@citrix.com> References: <1433237923-14591-1-git-send-email-ross.lagerwall@citrix.com> <5576C1BD.9020609@citrix.com> <5576EF6C020000780008294A@mail.emea.novell.com> <1433854382.7108.554.camel@citrix.com> <5576E4AC.1000403@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5576E4AC.1000403@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ross Lagerwall Cc: Keir Fraser , Andrew Cooper , Tim Deegan , xen-devel@lists.xen.org, Stefano Stabellini , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Tue, 2015-06-09 at 14:05 +0100, Ross Lagerwall wrote: > On 06/09/2015 01:53 PM, Ian Campbell wrote: > > On Tue, 2015-06-09 at 12:51 +0100, Jan Beulich wrote: > >>>>> On 09.06.15 at 12:36, wrote: > >>> ping > >> > >> I'm still waiting for the ARM maintainers to ack ... > >> > >>>> --- a/xen/arch/arm/efi/efi-boot.h > >>>> +++ b/xen/arch/arm/efi/efi-boot.h > >>>> @@ -522,6 +522,11 @@ static void __init efi_arch_blexit(void) > >>>> efi_bs->FreePool(memmap); > >>>> } > >>>> > >>>> +static void __init efi_arch_halt(void) > >>>> +{ > >>>> + stop_cpu(); > >>>> +} > >>>> + > >>>> static void __init efi_arch_load_addr_check(EFI_LOADED_IMAGE *loaded_image) > >>>> { > >>>> if ( (unsigned long)loaded_image->ImageBase & ((1 << 12) - 1) ) > >> > >> ... this. > > > > I think it is ok, it does a bit more than the x86 variant, which is that > > it would interlock correctly with __cpu_die, where the open coded on x86 > > wouldn't (assuming you have any interlock anyway. > > > > In terms of the rest of the patch, are those two places changed to use > > SystemTable->BootServices instead of efi_bs, if the point of the patch > > is to not use BootServices after exit is called? > > > > GetMemoryMap() and ExitBootServices() are the only functions explicitly > allowed after the first call to ExitBootServices() so they are called > via SystemTable->BootServices. efi_bs is set to NULL to ensure that no > other bootservices are called. I see. That might be worth a mention in the commit log?