diff --git a/ChangeLog.lbafix b/ChangeLog.lbafix index add35fb83..ec9737e9c 100644 --- a/ChangeLog.lbafix +++ b/ChangeLog.lbafix @@ -2,4 +2,5 @@ * kern/i386/pc/startup.S (grub_biosdisk_get_diskinfo_int13_extensions): Ignore return status if CF is cleared. + (grub_biosdisk_get_diskinfo_standard): Likewise. diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index 83f0b4ef8..a81795b22 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -824,6 +824,11 @@ FUNCTION(grub_biosdisk_get_diskinfo_standard) .code16 movb $0x8, %ah int $0x13 /* do the operation */ + jc noclean2 + /* Clean return value if carry isn't set to workaround + some buggy BIOSes. */ + xor %ax, %ax +noclean2: /* check if successful */ testb %ah, %ah jnz 1f