From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH for-4.5] EFI: Fix efi_arch_allocate_mmap_buffer() to return new size Date: Wed, 22 Oct 2014 11:42:50 +0100 Message-ID: <1413974570.18118.3.camel@citrix.com> References: <1413951525-17657-1-git-send-email-roy.franz@linaro.org> <54479DF00200007800040F26@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54479DF00200007800040F26@mail.emea.novell.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: Jan Beulich Cc: Roy Franz , tim@xen.org, stefano.stabellini@citrix.com, fu.wei@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-10-22 at 11:07 +0100, Jan Beulich wrote: > >>> On 22.10.14 at 06:18, wrote: > > --- a/xen/common/efi/boot.c > > +++ b/xen/common/efi/boot.c > > @@ -271,6 +271,9 @@ static void __init PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode) > > case EFI_COMPROMISED_DATA: > > mesg = L"Compromised data"; > > break; > > + case EFI_BUFFER_TOO_SMALL: > > + mesg = L"Buffer too small"; > > + break; > > I don't really mind this change, but ... > > > @@ -1038,7 +1041,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE > > *SystemTable) > > > > efi_bs->GetMemoryMap(&efi_memmap_size, NULL, &map_key, > > &efi_mdesc_size, &mdesc_ver); > > - efi_memmap = efi_arch_allocate_mmap_buffer(efi_memmap_size); > > + efi_memmap = efi_arch_allocate_mmap_buffer(&efi_memmap_size); > > if ( !efi_memmap ) > > blexit(L"Unable to allocate memory for EFI memory map"); > > ... it would not have helped here, as you don't even get to see the > error code here. This patch came about because I was seeing: Cannot obtain memory map: ErrCode: 0x8000000000000005 which I suppose is a different path. I don't think the allocation above would have ever returned EFI_BUFFER_TOO_SMALL, would it? Ian.