]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/loader/i386/bsd.c (grub_freebsd_boot): Set %ebp to sane
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 3 Sep 2010 12:05:19 +0000 (14:05 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 3 Sep 2010 12:05:19 +0000 (14:05 +0200)
value.
(grub_openbsd_boot): Likewise.
(grub_netbsd_boot): Likewise.
* grub-core/loader/i386/xnu.c (grub_xnu_boot_resume): Likewise.
(grub_xnu_boot): Likewise.

ChangeLog
grub-core/loader/i386/bsd.c
grub-core/loader/i386/xnu.c

index 69d46b55c5863bc266a96aee104943a2e6fd02f3..6c9e3bf6d40fdacb1c94bca7c9c39a47b659d1db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-03  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/loader/i386/bsd.c (grub_freebsd_boot): Set %ebp to sane
+       value.
+       (grub_openbsd_boot): Likewise.
+       (grub_netbsd_boot): Likewise.
+       * grub-core/loader/i386/xnu.c (grub_xnu_boot_resume): Likewise.
+       (grub_xnu_boot): Likewise.
+
 2010-09-02  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * configure.ac: Clean LIBS variable after tests.
index cfea3b6a1a7abed688ed592f73be063c124e5092..d72c8195a0e16ec46b60045249cdd9ce82cba336 100644 (file)
@@ -746,6 +746,7 @@ grub_freebsd_boot (void)
       grub_memcpy (&stack[9], &bi, sizeof (bi));
       state.eip = entry;
       state.esp = stack_target;
+      state.ebp = stack_target;
       stack[0] = entry; /* "Return" address.  */
       stack[1] = bootflags | FREEBSD_RB_BOOTINFO;
       stack[2] = bootdev;
@@ -830,7 +831,8 @@ grub_openbsd_boot (void)
 #endif
 
   state.eip = entry;
-  state.esp = ((grub_uint8_t *) stack - (grub_uint8_t *) buf0) + buf_target;
+  state.ebp = state.esp
+    = ((grub_uint8_t *) stack - (grub_uint8_t *) buf0) + buf_target;
   stack[0] = entry;
   stack[1] = bootflags;
   stack[2] = openbsd_root;
@@ -1045,6 +1047,7 @@ grub_netbsd_boot (void)
 
   state.eip = entry;
   state.esp = stack_target;
+  state.ebp = stack_target;
   stack[0] = entry;
   stack[1] = bootflags;
   stack[2] = 0;
index 556f1dbf1dad86d0d3355bfcdd5e6ac87052e1cb..d35e9e0aac61ce42c475ec861b14583977775490 100644 (file)
@@ -836,6 +836,7 @@ grub_xnu_boot_resume (void)
   struct grub_relocator32_state state;
 
   state.esp = grub_xnu_stack;
+  state.ebp = grub_xnu_stack;
   state.eip = grub_xnu_entry_point;
   state.eax = grub_xnu_arg1;
 
@@ -1114,6 +1115,7 @@ grub_xnu_boot (void)
   state.eip = grub_xnu_entry_point;
   state.eax = grub_xnu_arg1;
   state.esp = grub_xnu_stack;
+  state.ebp = grub_xnu_stack;
   return grub_relocator32_boot (grub_xnu_relocator, state);
 }