mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
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:
1 parent
529cc99acf
commit
9056cbf38e
5 files changed
+37
-2
No files matched your search
@@ -65,13 +65,27 @@ VARIABLE(grub_relocator32_esp)
|
||||
|
||||
movl %eax, %esp
|
||||
|
||||
/* mov imm32, %eax */
|
||||
.byte 0xb8
|
||||
VARIABLE(grub_relocator32_ebp)
|
||||
.long 0
|
||||
|
||||
movl %eax, %ebp
|
||||
|
||||
/* mov imm32, %eax */
|
||||
.byte 0xb8
|
||||
VARIABLE(grub_relocator32_esi)
|
||||
.long 0
|
||||
|
||||
movl %eax, %esi
|
||||
|
||||
|
||||
/* mov imm32, %eax */
|
||||
.byte 0xb8
|
||||
VARIABLE(grub_relocator32_edi)
|
||||
.long 0
|
||||
|
||||
movl %eax, %edi
|
||||
|
||||
/* mov imm32, %eax */
|
||||
.byte 0xb8
|
||||
VARIABLE(grub_relocator32_eax)
|
||||
|
||||
Reference in new issue
Block a user