* 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.
This commit is contained in:
parent
9f915872ef
commit
a7c00cdb94
3 changed files with 15 additions and 1 deletions
|
@ -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>
|
2010-09-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* configure.ac: Clean LIBS variable after tests.
|
* configure.ac: Clean LIBS variable after tests.
|
||||||
|
|
|
@ -746,6 +746,7 @@ grub_freebsd_boot (void)
|
||||||
grub_memcpy (&stack[9], &bi, sizeof (bi));
|
grub_memcpy (&stack[9], &bi, sizeof (bi));
|
||||||
state.eip = entry;
|
state.eip = entry;
|
||||||
state.esp = stack_target;
|
state.esp = stack_target;
|
||||||
|
state.ebp = stack_target;
|
||||||
stack[0] = entry; /* "Return" address. */
|
stack[0] = entry; /* "Return" address. */
|
||||||
stack[1] = bootflags | FREEBSD_RB_BOOTINFO;
|
stack[1] = bootflags | FREEBSD_RB_BOOTINFO;
|
||||||
stack[2] = bootdev;
|
stack[2] = bootdev;
|
||||||
|
@ -830,7 +831,8 @@ grub_openbsd_boot (void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
state.eip = entry;
|
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[0] = entry;
|
||||||
stack[1] = bootflags;
|
stack[1] = bootflags;
|
||||||
stack[2] = openbsd_root;
|
stack[2] = openbsd_root;
|
||||||
|
@ -1045,6 +1047,7 @@ grub_netbsd_boot (void)
|
||||||
|
|
||||||
state.eip = entry;
|
state.eip = entry;
|
||||||
state.esp = stack_target;
|
state.esp = stack_target;
|
||||||
|
state.ebp = stack_target;
|
||||||
stack[0] = entry;
|
stack[0] = entry;
|
||||||
stack[1] = bootflags;
|
stack[1] = bootflags;
|
||||||
stack[2] = 0;
|
stack[2] = 0;
|
||||||
|
|
|
@ -836,6 +836,7 @@ grub_xnu_boot_resume (void)
|
||||||
struct grub_relocator32_state state;
|
struct grub_relocator32_state state;
|
||||||
|
|
||||||
state.esp = grub_xnu_stack;
|
state.esp = grub_xnu_stack;
|
||||||
|
state.ebp = grub_xnu_stack;
|
||||||
state.eip = grub_xnu_entry_point;
|
state.eip = grub_xnu_entry_point;
|
||||||
state.eax = grub_xnu_arg1;
|
state.eax = grub_xnu_arg1;
|
||||||
|
|
||||||
|
@ -1114,6 +1115,7 @@ grub_xnu_boot (void)
|
||||||
state.eip = grub_xnu_entry_point;
|
state.eip = grub_xnu_entry_point;
|
||||||
state.eax = grub_xnu_arg1;
|
state.eax = grub_xnu_arg1;
|
||||||
state.esp = grub_xnu_stack;
|
state.esp = grub_xnu_stack;
|
||||||
|
state.ebp = grub_xnu_stack;
|
||||||
return grub_relocator32_boot (grub_xnu_relocator, state);
|
return grub_relocator32_boot (grub_xnu_relocator, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue