multiboot: disentangle multiboot and multiboot2.

Previously we had multiboot and multiboot2 declaring the same symbols.
This can potentially lead to aliasing and strange behaviours when e.g.
module instead of module2 is used with multiboot2.

Bug: #51137
This commit is contained in:
Vladimir Serbinenko 2017-08-14 12:51:26 +02:00 committed by Vincent Batts
parent aa34f69d5d
commit ec4630c2b5
8 changed files with 95 additions and 85 deletions

View file

@ -243,7 +243,7 @@ grub_multiboot_get_mbi_size (void)
ret = sizeof (struct multiboot_info) + ALIGN_UP (cmdline_size, 4)
+ modcnt * sizeof (struct multiboot_mod_list) + total_modcmd
+ ALIGN_UP (sizeof(PACKAGE_STRING), 4)
+ grub_get_multiboot_mmap_count () * sizeof (struct multiboot_mmap_entry)
+ grub_multiboot_get_mmap_count () * sizeof (struct multiboot_mmap_entry)
+ elf_sec_entsize * elf_sec_num
+ 256 * sizeof (struct multiboot_color)
#if GRUB_MACHINE_HAS_VBE || GRUB_MACHINE_HAS_VGA_TEXT
@ -546,7 +546,7 @@ grub_multiboot_make_mbi (grub_uint32_t *target)
mbi->mods_count = 0;
}
mmap_size = grub_get_multiboot_mmap_count ()
mmap_size = grub_multiboot_get_mmap_count ()
* sizeof (struct multiboot_mmap_entry);
grub_fill_multiboot_mmap ((struct multiboot_mmap_entry *) ptrorig);
mbi->mmap_length = mmap_size;