+2013-11-18 Josh Triplett <josh@joshtriplett.org>
+
+ * grub-core/mmap/efi/mmap.c (grub_mmap_register): Round up/down to
+ 4k page boundaries as expected by firmware rather than 1k
+ boundaries.
+ (grub_mmap_malign_and_register): Likewise.
+
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
* tests/grub_func_test.in: Decrease RAM size to 512M. With less
return 0;
b = grub_efi_system_table->boot_services;
- address = start & (~0x3ffULL);
- pages = (end - address + 0x3ff) >> 12;
+ address = start & (~0xfffULL);
+ pages = (end - address + 0xfff) >> 12;
status = efi_call_2 (b->free_pages, address, pages);
if (status != GRUB_EFI_SUCCESS && status != GRUB_EFI_NOT_FOUND)
{
atype = GRUB_EFI_ALLOCATE_ANY_PAGES;
#endif
- pages = (size + 0x3ff) >> 12;
+ pages = (size + 0xfff) >> 12;
status = efi_call_4 (b->allocate_pages, atype,
make_efi_memtype (type), pages, &address);
if (status != GRUB_EFI_SUCCESS)