[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch 2/3] grub efi initrd image memory allocation 4K alignment
From: |
bibo,mao |
Subject: |
[patch 2/3] grub efi initrd image memory allocation 4K alignment |
Date: |
Tue, 24 Oct 2006 15:03:07 +0800 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
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));
}
}
- [patch 2/3] grub efi initrd image memory allocation 4K alignment,
bibo,mao <=