Move common BIOS/coreboot memory map declarations to

include/grub/i386/memory_raw.h and eliminate duplicate declarations.
This commit is contained in:
Vladimir Serbinenko 2013-11-23 12:39:21 +01:00
parent f65e14dc3a
commit 1bba40f578
11 changed files with 74 additions and 89 deletions

View file

@ -161,13 +161,13 @@ mmap_iterate_hook (grub_uint64_t addr, grub_uint64_t size,
void *data __attribute__ ((unused)))
{
/* Avoid the lower memory. */
if (addr < 0x100000)
if (addr < GRUB_MEMORY_MACHINE_UPPER_START)
{
if (size <= 0x100000 - addr)
if (size <= GRUB_MEMORY_MACHINE_UPPER_START - addr)
return 0;
size -= 0x100000 - addr;
addr = 0x100000;
size -= GRUB_MEMORY_MACHINE_UPPER_START - addr;
addr = GRUB_MEMORY_MACHINE_UPPER_START;
}
/* Ignore >4GB. */