Zero %ebp and %edi when entering Linux's 32-bit entry point, as
required by the boot protocol. * include/grub/i386/relocator.h (struct grub_relocator32_state): Add ebp and edi members. * grub-core/lib/i386/relocator.c (grub_relocator_boot): Handle state.ebp and state.edi. * grub-core/lib/i386/relocator32.S (grub_relocator32_start): Set %ebp and %edi according to grub_relocator32_ebp and grub_relocator32_edi respectively. * grub-core/loader/i386/linux.c (grub_linux_boot): Zero state.ebp and state.edi.
This commit is contained in:
parent
529cc99acf
commit
9056cbf38e
5 changed files with 37 additions and 2 deletions
|
@ -716,7 +716,7 @@ grub_linux_boot (void)
|
|||
|
||||
/* FIXME. */
|
||||
/* asm volatile ("lidt %0" : : "m" (idt_desc)); */
|
||||
state.ebx = 0;
|
||||
state.ebp = state.edi = state.ebx = 0;
|
||||
state.esi = real_mode_target;
|
||||
state.esp = real_mode_target;
|
||||
state.eip = params->code32_start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue