* grub-core/boot/i386/pc/boot.S: Fix floppy probe. Due to missing

%dx restore the probe worked on non-existant drive. Reorganize the
	code a little bit to free 2 bytes necessary for push/pop.
This commit is contained in:
Vladimir Serbinenko 2013-11-24 05:01:13 +01:00
parent 9eec9699b9
commit 6f2e82be3a
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2013-11-24 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/boot/i386/pc/boot.S: Fix floppy probe. Due to missing
%dx restore the probe worked on non-existant drive. Reorganize the
code a little bit to free 2 bytes necessary for push/pop.
2013-11-23 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/mips/arc/init.c (grub_machine_get_bootlocation):

View file

@ -35,6 +35,7 @@ probe_values:
.byte 36, 18, 15, 9, 0
LOCAL(floppy_probe):
pushw %dx
/*
* Perform floppy probe.
*/
@ -50,8 +51,8 @@ LOCAL(probe_loop):
movb (%si), %cl
/* if number of sectors is 0, display error and die */
cmpb $0, %cl
jne 1f
testb %cl, %cl
jnz 1f
/*
* Floppy disk probe failure.
@ -318,11 +319,12 @@ LOCAL(chs_mode):
int $0x13
jnc LOCAL(final_init)
popw %dx
/*
* The call failed, so maybe use the floppy probe instead.
*/
testb $GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
jz LOCAL(floppy_probe)
testb %dl, %dl
jnb LOCAL(floppy_probe)
/* Nope, we definitely have a hard disk, and we're screwed. */
ERR(hd_probe_error_string)