* 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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue