]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* loader/multiboot.c (grub_multiboot_boot) [GRUB_USE_MULTIBOOT2]:
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 1 Jul 2010 22:40:37 +0000 (00:40 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 1 Jul 2010 22:40:37 +0000 (00:40 +0200)
Properly align mbi.
Reported by: Seth Goldberg.

ChangeLog
loader/multiboot.c

index a03294df6fecc8dfb9366dcc2a8130449f13db55..ba99ab2e2d891892329fa50e5d5d83d9e8f1b4fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-02  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * loader/multiboot.c (grub_multiboot_boot) [GRUB_USE_MULTIBOOT2]:
+       Properly align mbi.
+       Reported by: Seth Goldberg.
+
 2010-07-01  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * util/grub-mkrescue.in: Avoid module duplication.
index 592289c456f342d9cde15df97f32d206658dea93..77a732838c6c3d7fc30fa6379dc230c539d3726b 100644 (file)
@@ -136,8 +136,14 @@ grub_multiboot_boot (void)
       grub_multiboot_alloc_mbi = mbi_size;
     }
 
+#ifdef GRUB_USE_MULTIBOOT2
+  state.MULTIBOOT_MBI_REGISTER = ALIGN_UP (grub_multiboot_payload_dest
+                                          + grub_multiboot_pure_size,
+                                          MULTIBOOT_TAG_ALIGN);
+#else
   state.MULTIBOOT_MBI_REGISTER = grub_multiboot_payload_dest
     + grub_multiboot_pure_size;
+#endif
   err = grub_multiboot_make_mbi (grub_multiboot_payload_orig,
                                 grub_multiboot_payload_dest,
                                 grub_multiboot_pure_size, mbi_size);