* kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
comments. Avoid copiing one more byte than necessary (just in case).
This commit is contained in:
parent
bc3a2f3115
commit
80fc88f22d
2 changed files with 17 additions and 6 deletions
|
@ -5,6 +5,9 @@
|
||||||
(grub_vga_text_term): Use grub_vga_text_init_fini() instead of
|
(grub_vga_text_term): Use grub_vga_text_init_fini() instead of
|
||||||
grub_vga_text_cls().
|
grub_vga_text_cls().
|
||||||
|
|
||||||
|
* kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
|
||||||
|
comments. Avoid copiing one more byte than necessary (just in case).
|
||||||
|
|
||||||
2008-11-20 Robert Millan <rmh@aybabtu.com>
|
2008-11-20 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
* kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
|
* kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
|
||||||
|
|
|
@ -141,24 +141,32 @@ VARIABLE(grub_multiboot_payload_entry_offset)
|
||||||
* edx: Offset of the entry point (relative to the beginning of the block).
|
* edx: Offset of the entry point (relative to the beginning of the block).
|
||||||
*/
|
*/
|
||||||
VARIABLE(grub_multiboot_forward_relocator)
|
VARIABLE(grub_multiboot_forward_relocator)
|
||||||
cld
|
/* Add entry offset. */
|
||||||
addl %edi, %edx
|
addl %edi, %edx
|
||||||
|
|
||||||
|
/* Forward copy. */
|
||||||
|
cld
|
||||||
rep
|
rep
|
||||||
movsb
|
movsb
|
||||||
|
|
||||||
jmp *%edx
|
jmp *%edx
|
||||||
VARIABLE(grub_multiboot_forward_relocator_end)
|
VARIABLE(grub_multiboot_forward_relocator_end)
|
||||||
|
|
||||||
VARIABLE(grub_multiboot_backward_relocator)
|
VARIABLE(grub_multiboot_backward_relocator)
|
||||||
|
/* Add entry offset (before %edi is mangled). */
|
||||||
|
addl %edi, %edx
|
||||||
|
|
||||||
|
/* Backward movsb is implicitly off-by-one. compensate that. */
|
||||||
|
decl %esi
|
||||||
|
decl %edi
|
||||||
|
|
||||||
|
/* Backward copy. */
|
||||||
std
|
std
|
||||||
addl %ecx, %esi
|
addl %ecx, %esi
|
||||||
addl %ecx, %edi
|
addl %ecx, %edi
|
||||||
/* backward movsb is implicitly off-by-one. compensate that. */
|
|
||||||
incl %ecx
|
|
||||||
rep
|
rep
|
||||||
movsb
|
movsb
|
||||||
/* same problem again. */
|
|
||||||
incl %edi
|
|
||||||
addl %edi, %edx
|
|
||||||
jmp *%edx
|
jmp *%edx
|
||||||
VARIABLE(grub_multiboot_backward_relocator_end)
|
VARIABLE(grub_multiboot_backward_relocator_end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue