[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V4 03/15] create arch functions to get and process EFI memory map.



On Fri, 2014-09-12 at 08:07 +0100, Jan Beulich wrote:
> >>> On 11.09.14 at 19:40, <roy.franz@xxxxxxxxxx> wrote:
> > On Thu, Sep 11, 2014 at 7:11 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> >>>>> On 10.09.14 at 02:51, <roy.franz@xxxxxxxxxx> wrote:
> >>> @@ -1171,67 +1169,12 @@ efi_start(EFI_HANDLE ImageHandle, 
> >>> EFI_SYSTEM_TABLE *SystemTable)
> >>>          }
> >>>      }
> >>>
> >>> -    efi_bs->GetMemoryMap(&efi_memmap_size, NULL, &map_key,
> >>> -                         &efi_mdesc_size, &mdesc_ver);
> >>> -    mbi.mem_upper -= efi_memmap_size;
> >>> -    mbi.mem_upper &= -__alignof__(EFI_MEMORY_DESCRIPTOR);
> >>> -    if ( mbi.mem_upper < xen_phys_start )
> >>> -        blexit(L"Out of static memory");
> >>> -    efi_memmap = (void *)(long)mbi.mem_upper;
> >>> -    status = efi_bs->GetMemoryMap(&efi_memmap_size, efi_memmap, &map_key,
> >>> -                                  &efi_mdesc_size, &mdesc_ver);
> >>> -    if ( EFI_ERROR(status) )
> >>> -        PrintErrMesg(L"Cannot obtain memory map", status);
> >>> +    efi_arch_get_memory_map(&mmap_size, &mmap, &mmap_key,
> >>> +                                  &mmap_desc_size, &mmap_desc_ver);
> >>
> >> The only arch-specific bit here is where to put the map.
> > Yes, but the ARM method of allocating the space can make the map
> > bigger.

So something which ARM does can make the result of efi_bs->GetMemoryMap
longer? Or are we talking about the bootinfo.mem array?

>   I can re-arrange
> > this so that only the memory allocation is in the arch code, but I
> > think the current implementation
> > is also reasonable.
> 
> Hmm, yes, if ARM has no way of avoiding the growth of the map
> during allocation (which at a first glance seems suspicious to me),
> then yes. Is there a problem allocating a few more entries than the
> map's current size, so the possible growth can be accommodated?
> 
> Jan
> 



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.