* grub-core/boot/i386/pc/boot.S: Ignore %dl if it's not in a sane range.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-20 00:06:45 +02:00
parent 742f9232e3
commit e0337366d1
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2010-09-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/boot/i386/pc/boot.S: Ignore %dl if it's not in a sane range.
2010-09-19 Vladimir Serbinenko <phcoder@gmail.com>
Split config.h for util and core.

View file

@ -112,12 +112,16 @@ LOCAL(after_BPB):
*/
. = _start + GRUB_BOOT_MACHINE_DRIVE_CHECK
boot_drive_check:
jmp 1f /* grub-setup may overwrite this jump */
jmp 3f /* grub-setup may overwrite this jump */
testb $0x80, %dl
jnz 1f
jz 2f
3:
/* Ignore %dl different from 0-0x0f and 0x80-0x8f. */
testb $0x70, %dl
jz 1f
2:
movb $0x80, %dl
1:
/*
* ljmp to the next instruction because some bogus BIOSes
* jump to 07C0:0000 instead of 0000:7C00.