On Thu, 2015-06-11 at 07:34 +0100, Jan Beulich wrote:
> >>> On 10.06.15 at 19:22, <roy.fr...@linaro.org> wrote:
> > On Wed, Jun 10, 2015 at 2:37 AM, Jan Beulich <jbeul...@suse.com> wrote:
> >>>>> On 10.06.15 at 11:26, <ian.campb...@citrix.com> wrote:
> >>> On Wed, 2015-06-10 at 10:15 +0100, Jan Beulich wrote:
> >>>> >>> On 10.06.15 at 10:56, <ian.campb...@citrix.com> wrote:
> >>>> > On Tue, 2015-06-09 at 14:53 +0100, Jan Beulich wrote:
> >>>> >> From: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
> >>>> >>
> >>>> >> To help on certain platforms to run.
> >>>> >>
> >>>> >> Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
> >>>> >> Signed-off-by: Jan Beulich <jbeul...@suse.com>
> >>>> >
> >>>> > To be effective (or at least consistent) on ARM, would we also want to
> >>>> > change its efi_process_memory_map_bootinfo:
> >>>> >         if ( desc_ptr->Type == EfiConventionalMemory
> >>>> >              || desc_ptr->Type == EfiBootServicesCode
> >>>> >              || desc_ptr->Type == EfiBootServicesData )
> >>>> > to include a check on map_bs?
> >>>>
> >>>> I'm not convinced, but I also don't know the history of why boot
> >>>> services areas are being included here in the first place - Roy?
> >>>> I.e. if the checks weren't there already, I'd agree that an addition
> >>>> similar to the other ones would be needed here, but with the x86
> >>>> side getting relaxed I don't see why you would want to tighten the
> >>>> ARM side at the same time.
> > 
> > The boot services code/data is "memory available for general use", just
> > like EfiConventionalMemory after ExitBootServices() is called.  Since the 
> > memory
> > map being created here is going to be used after ExitBootServices() is 
> > called,
> > I think this matches the UEFI specification. This matches x86 behavior 
> > before
> > the patch (modulo some address range checks used to set cfg.addr.)
> 
> Ouch - looks like I read this the wrong way round, and Ian was right
> in wanting a map_bs check added here:

I should have the courage of my convictions!

> EFI/ARM: don't treat EfiBootServices{Code,Data} as normal RAM under /mapbs
> 
> Signed-off-by: Jan Beulich <jbeul...@suse.com>

Acked-by: Ian Campbell <ian.campb...@citrix.com>

> 
> --- a/xen/arch/arm/efi/efi-boot.h
> +++ b/xen/arch/arm/efi/efi-boot.h
> @@ -131,9 +131,10 @@ static EFI_STATUS __init efi_process_mem
>  
>      for ( Index = 0; Index < (mmap_size / desc_size); Index++ )
>      {
> -        if ( desc_ptr->Type == EfiConventionalMemory
> -             || desc_ptr->Type == EfiBootServicesCode
> -             || desc_ptr->Type == EfiBootServicesData )
> +        if ( desc_ptr->Type == EfiConventionalMemory ||
> +             (!map_bs &&
> +              (desc_ptr->Type == EfiBootServicesCode ||
> +               desc_ptr->Type == EfiBootServicesData)) )
>          {
>              if ( i >= NR_MEM_BANKS )
>              {
> 
> Jan
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to