Replace the region at 0 from coreboot tables to available in BSD

memory map.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-03-25 10:23:04 +01:00
parent ff99babdfe
commit 6a7fb94bfb
6 changed files with 24 additions and 3 deletions

View file

@ -86,6 +86,8 @@ struct grub_machine_mmap_iterate_ctx
void *hook_data;
};
#define GRUB_MACHINE_MEMORY_BADRAM 5
/* Helper for grub_machine_mmap_iterate. */
static int
iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
@ -105,7 +107,9 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
/* Multiboot mmaps match with the coreboot mmap
definition. Therefore, we can just pass type
through. */
mem_region->type, ctx->hook_data))
(((mem_region->type <= GRUB_MACHINE_MEMORY_BADRAM) && (mem_region->type >= GRUB_MACHINE_MEMORY_AVAILABLE))
|| mem_region->type == GRUB_MEMORY_COREBOOT_TABLES) ? mem_region->type : GRUB_MEMORY_RESERVED,
ctx->hook_data))
return 1;
mem_region++;