From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GcGJe-00051x-NS for mharc-grub-devel@gnu.org; Tue, 24 Oct 2006 03:03:14 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GcGJd-00051X-C4 for grub-devel@gnu.org; Tue, 24 Oct 2006 03:03:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GcGJb-00050w-RY for grub-devel@gnu.org; Tue, 24 Oct 2006 03:03:13 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GcGJb-00050t-NE for grub-devel@gnu.org; Tue, 24 Oct 2006 03:03:11 -0400 Received: from [134.134.136.24] (helo=mga09.intel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GcGJb-0003lO-95 for grub-devel@gnu.org; Tue, 24 Oct 2006 03:03:11 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by mga09.intel.com with ESMTP; 24 Oct 2006 00:03:10 -0700 Received: from bmao-mobl.ccr.corp.intel.com (HELO [10.239.20.25]) ([10.239.20.25]) by orsmga001.jf.intel.com with ESMTP; 24 Oct 2006 00:03:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,348,1157353200"; d="scan'208"; a="149709326:sNHT19987940" Message-ID: <453DBAAB.6090002@intel.com> Date: Tue, 24 Oct 2006 15:03:07 +0800 From: "bibo,mao" User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [patch 2/3] grub efi initrd image memory allocation 4K alignment X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2006 07:03:13 -0000 Hi, On grub efi platform, initrd image memory allocation start address must be 4K alignment, else it will fail to alloc memory for initrd image. thanks bibo,mao diff -Nruap grub2.org/loader/i386/efi/linux.c grub2/loader/i386/efi/linux.c --- grub2.org/loader/i386/efi/linux.c 2006-10-24 13:24:46.000000000 +0800 +++ grub2/loader/i386/efi/linux.c 2006-10-24 13:25:35.000000000 +0800 @@ -587,7 +587,6 @@ grub_rescue_cmd_initrd (int argc, char * desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size)) { if (desc->type == GRUB_EFI_CONVENTIONAL_MEMORY - && desc->physical_start >= addr_min && desc->physical_start + size < addr_max && desc->num_pages >= initrd_pages) { @@ -598,7 +597,7 @@ grub_rescue_cmd_initrd (int argc, char * physical_end = addr_max; if (physical_end > addr) - addr = physical_end - page_align (size); + addr = PAGE_DOWN(physical_end - page_align (size)); } }