fix a bug about a LBA check in stage2.
This commit is contained in:
parent
06663a489d
commit
72bae78465
3 changed files with 23 additions and 15 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2000-06-03 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* stage2/asm.S (check_int13_extensions): Check the bitmap only
|
||||||
|
if FORCE_LBA is zero.
|
||||||
|
* stage2/bios.c (get_diskinfo): Get rid of the wrong check for
|
||||||
|
the bit 0 of DRP.FLAGS. Now the bitmap check is correctly
|
||||||
|
performed in the function check_int13_extensions.
|
||||||
|
|
||||||
2000-06-02 OKUJI Yoshinori <okuji@gnu.org>
|
2000-06-02 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* docs/user-ref.texi (Invoking the grub shell): Added a caution.
|
* docs/user-ref.texi (Invoking the grub shell): Added a caution.
|
||||||
|
|
|
@ -1023,6 +1023,11 @@ ENTRY(check_int13_extensions)
|
||||||
jc 1f
|
jc 1f
|
||||||
cmpw $0xaa55, %bx
|
cmpw $0xaa55, %bx
|
||||||
jne 1f
|
jne 1f
|
||||||
|
|
||||||
|
/* check if AH=0x42 is supported if FORCE_LBA is zero */
|
||||||
|
movb EXT_C(force_lba), %al
|
||||||
|
testb %al, %al
|
||||||
|
jnz 1f
|
||||||
andw $1, %cx
|
andw $1, %cx
|
||||||
jz 1f
|
jz 1f
|
||||||
|
|
||||||
|
|
|
@ -158,22 +158,17 @@ get_diskinfo (int drive, struct geometry *geometry)
|
||||||
err = get_diskinfo_int13_extensions (drive, &drp);
|
err = get_diskinfo_int13_extensions (drive, &drp);
|
||||||
if (! err)
|
if (! err)
|
||||||
{
|
{
|
||||||
/* How many buggy BIOSes are there in the world...
|
/* Set the LBA flag. */
|
||||||
Some BIOSes don't set the flag correctly, even if LBA
|
geometry->flags = BIOSDISK_FLAG_LBA_EXTENSION;
|
||||||
read/write is supported, so we cannot help assuming
|
|
||||||
that the functions are supported by default and
|
|
||||||
clearing the flag when either of them fails. *sigh* */
|
|
||||||
|
|
||||||
/* Make sure that LBA read/write functions are supported. */
|
/* I'm not sure if GRUB should check the bit 1 of DRP.FLAGS,
|
||||||
if (force_lba || (drp.flags & 1))
|
so I omit the check for now. - okuji */
|
||||||
{
|
/* if (drp.flags & (1 << 1)) */
|
||||||
geometry->flags = BIOSDISK_FLAG_LBA_EXTENSION;
|
|
||||||
|
/* FIXME: when the 2TB limit becomes critical, we must
|
||||||
/* FIXME: when the 2TB limit becomes critical, we must
|
change the type of TOTAL_SECTORS to unsigned long
|
||||||
change the type of TOTAL_SECTORS to unsigned long
|
long. */
|
||||||
long. */
|
total_sectors = drp.total_sectors & ~0L;
|
||||||
total_sectors = drp.total_sectors & ~0L;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue