From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [RFC v2 0/2] Early use of boot service memory Date: Thu, 21 Nov 2013 15:18:41 -0800 Message-ID: <528E94D1.2050809@zytor.com> References: <1385067686-73500-1-git-send-email-jerry.hoemann@hp.com> <20131121230744.GA31592@srcf.ucam.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131121230744.GA31592-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matthew Garrett , Jerry Hoemann Cc: rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org, tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org, mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, bp-l3A5Bk7waGM@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, penberg-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, mingo.kernel.org-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: linux-efi@vger.kernel.org On 11/21/2013 03:07 PM, Matthew Garrett wrote: > On Thu, Nov 21, 2013 at 02:01:24PM -0700, Jerry Hoemann wrote: >> >> Some platform have firmware that violates the UEFI spec and access boot >> service code or data segments after the system has called ExitBootServices(). >> The call to efi_reserve_boot_services in setup_arch is a workaround to >> avoid using boot service memory until after the kernel has done >> SetVirtualAddressMap. However, this reservation fragments memory >> which can cause large allocations early in boot (e.g. crash kernel) >> to fail. > > This is a problem we have to solve, but I don't think this is the right > way to solve it. Why do we not just reattempt to perform the allocation > immediately after we've freed the boot services regions? > Wouldn't the memory map already have gotten scrambled all to hell by then? -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755427Ab3KUXTj (ORCPT ); Thu, 21 Nov 2013 18:19:39 -0500 Received: from terminus.zytor.com ([198.137.202.10]:58731 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752381Ab3KUXTg (ORCPT ); Thu, 21 Nov 2013 18:19:36 -0500 Message-ID: <528E94D1.2050809@zytor.com> Date: Thu, 21 Nov 2013 15:18:41 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Matthew Garrett , Jerry Hoemann CC: rob@landley.net, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, matt.fleming@intel.com, yinghai@kernel.org, akpm@linux-foundation.org, bp@suse.de, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, penberg@kernel.org, mingo.kernel.org@gmail.com, vgoyal@redhat.com Subject: Re: [RFC v2 0/2] Early use of boot service memory References: <1385067686-73500-1-git-send-email-jerry.hoemann@hp.com> <20131121230744.GA31592@srcf.ucam.org> In-Reply-To: <20131121230744.GA31592@srcf.ucam.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/21/2013 03:07 PM, Matthew Garrett wrote: > On Thu, Nov 21, 2013 at 02:01:24PM -0700, Jerry Hoemann wrote: >> >> Some platform have firmware that violates the UEFI spec and access boot >> service code or data segments after the system has called ExitBootServices(). >> The call to efi_reserve_boot_services in setup_arch is a workaround to >> avoid using boot service memory until after the kernel has done >> SetVirtualAddressMap. However, this reservation fragments memory >> which can cause large allocations early in boot (e.g. crash kernel) >> to fail. > > This is a problem we have to solve, but I don't think this is the right > way to solve it. Why do we not just reattempt to perform the allocation > immediately after we've freed the boot services regions? > Wouldn't the memory map already have gotten scrambled all to hell by then? -hpa