From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH 2/4] EFI/early: add /mapbs to map EfiBootServices{Code, Data} Date: Tue, 09 Jun 2015 16:24:38 +0100 Message-ID: <557721560200007800082C1B@mail.emea.novell.com> References: <55770B190200007800082A2C@mail.emea.novell.com> <55770BDF0200007800082A43@mail.emea.novell.com> <5576F226.6080104@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z2LOO-0000z7-5W for xen-devel@lists.xenproject.org; Tue, 09 Jun 2015 15:24:44 +0000 In-Reply-To: <5576F226.6080104@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 09.06.15 at 16:03, wrote: > On 09/06/15 14:53, Jan Beulich wrote: >> From: Konrad Rzeszutek Wilk >> >> To help on certain platforms to run. >> >> Signed-off-by: Konrad Rzeszutek Wilk >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/efi/efi-boot.h >> +++ b/xen/arch/x86/efi/efi-boot.h >> @@ -148,12 +148,16 @@ static void __init efi_arch_process_memo >> >> switch ( desc->Type ) >> { >> - default: >> - type = E820_RESERVED; >> - break; >> - case EfiConventionalMemory: >> case EfiBootServicesCode: >> case EfiBootServicesData: >> + if ( map_bs ) > > if ( !map_bs ) surely? It is the else case which sets a type of E820_RAM. No, we want it reserved when map_bs and treated as normal RAM when !map_bs. Jan >> + { >> + default: >> + type = E820_RESERVED; >> + break; >> + } >> + /* fall through */ >> + case EfiConventionalMemory: >> if ( !trampoline_phys && desc->PhysicalStart + len <= 0x100000 && >> len >= cfg.size && desc->PhysicalStart + len > cfg.addr ) >> cfg.addr = (desc->PhysicalStart + len - cfg.size) & PAGE_MASK;