From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VgQAM-0000OE-Et for mharc-grub-devel@gnu.org; Tue, 12 Nov 2013 21:26:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgQAD-0000FG-Na for grub-devel@gnu.org; Tue, 12 Nov 2013 21:26:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgQA5-0005KP-3p for grub-devel@gnu.org; Tue, 12 Nov 2013 21:26:41 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:55968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgQA4-0005KC-RA for grub-devel@gnu.org; Tue, 12 Nov 2013 21:26:32 -0500 Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id C2428A80B0 for ; Wed, 13 Nov 2013 03:26:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter23-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id kik36yJCgjmU for ; Wed, 13 Nov 2013 03:26:30 +0100 (CET) X-Originating-IP: 50.43.14.201 Received: from leaf (static-50-43-14-201.bvtn.or.frontiernet.net [50.43.14.201]) (Authenticated sender: josh@joshtriplett.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5D342A808E for ; Wed, 13 Nov 2013 03:26:29 +0100 (CET) Date: Tue, 12 Nov 2013 18:26:27 -0800 From: Josh Triplett To: grub-devel@gnu.org Subject: [PATCH 2/4] efi: Fix requests to allocate GRUB_MEMORY_AVAILABLE Message-ID: <04626043f86011c00505e719d84d40ef155ce312.1384309081.git.josh@joshtriplett.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 217.70.183.195 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 02:26:48 -0000 EFI firmware refuses to allocate memory of type GRUB_EFI_CONVENTIONAL_MEMORY, because that indicates a block of available memory that other allocations (or the OS) would then step on. Map GRUB_MEMORY_AVAILABLE to GRUB_EFI_LOADER_CODE instead. --- ChangeLog entry: 2013-11-13 Josh Triplett * grub-core/mmap/efi/mmap.c (make_efi_memtype): Map GRUB_MEMORY_AVAILABLE to GRUB_EFI_LOADER_CODE rather than GRUB_EFI_CONVENTIONAL_MEMORY. EFI firmware refuses to allocate memory of type GRUB_EFI_CONVENTIONAL_MEMORY, because that indicates a block of available memory that other allocations (or the OS) would then step on. grub-core/mmap/efi/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/mmap/efi/mmap.c b/grub-core/mmap/efi/mmap.c index a77efe8..e6cd185 100644 --- a/grub-core/mmap/efi/mmap.c +++ b/grub-core/mmap/efi/mmap.c @@ -146,7 +146,7 @@ make_efi_memtype (int type) return GRUB_EFI_UNUSABLE_MEMORY; case GRUB_MEMORY_AVAILABLE: - return GRUB_EFI_CONVENTIONAL_MEMORY; + return GRUB_EFI_LOADER_CODE; case GRUB_MEMORY_ACPI: return GRUB_EFI_ACPI_RECLAIM_MEMORY; -- 1.8.4.3