* grub-core/loader/i386/linux.c (allocate_pages): Don't allocate

beyond 4 GiB.
	(grub_cmd_linux): Use GRUB_LINUX_BZIMAGE_ADDR for non-relocatable
	images independently of preffered adderss field.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-03-11 23:41:29 +01:00
parent 0ae4f0bddb
commit 2282da4a93
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2012-03-11 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/loader/i386/linux.c (allocate_pages): Don't allocate
beyond 4 GiB.
(grub_cmd_linux): Use GRUB_LINUX_BZIMAGE_ADDR for non-relocatable
images independently of preffered adderss field.
2012-03-11 Vladimir Serbinenko <phcoder@gmail.com> 2012-03-11 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/commands/i386/pc/play.c: Improve TRANSLATORS comments. * grub-core/commands/i386/pc/play.c: Improve TRANSLATORS comments.

View file

@ -294,7 +294,8 @@ allocate_pages (grub_size_t prot_size, grub_size_t *align,
{ {
grub_errno = GRUB_ERR_NONE; grub_errno = GRUB_ERR_NONE;
err = grub_relocator_alloc_chunk_align (relocator, &ch, err = grub_relocator_alloc_chunk_align (relocator, &ch,
0x1000000, 0xffffffff, 0x1000000,
0xffffffff & ~prot_size,
prot_size, 1 << *align, prot_size, 1 << *align,
GRUB_RELOCATOR_PREFERENCE_LOW, GRUB_RELOCATOR_PREFERENCE_LOW,
1); 1);
@ -759,7 +760,10 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
min_align = lh.min_alignment; min_align = lh.min_alignment;
prot_size = grub_le_to_cpu32 (lh.init_size); prot_size = grub_le_to_cpu32 (lh.init_size);
prot_init_space = page_align (prot_size); prot_init_space = page_align (prot_size);
preffered_address = grub_le_to_cpu64 (lh.pref_address); if (relocatable)
preffered_address = grub_le_to_cpu64 (lh.pref_address);
else
preffered_address = GRUB_LINUX_BZIMAGE_ADDR;
} }
else else
{ {