diff --git a/ChangeLog b/ChangeLog index fd8e1bbf4..db352e36c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2000-09-05 OKUJI Yoshinori + + * stage1/stage1.S (lba_mode) [!NO_BUGGY_BIOS_IN_THE_WORLD]: + Don't check for the geometry, since some BIOSes don't return the + number of total sectors correctly, even if they have working LBA + support. + * stage2/start.S (lba_mode) [!NO_BUGGY_BIOS_IN_THE_WORLD]: + Likewise. + * stage2/bios.c (biosdisk) [!NO_BUGGY_BIOS_IN_THE_WORLD]: + Likewise. + Reported by Jan Fricke and Pixel + . + 2000-09-05 OKUJI Yoshinori From Alessandro Rubini : diff --git a/stage1/stage1.S b/stage1/stage1.S index fa739d33f..05e74719a 100644 --- a/stage1/stage1.S +++ b/stage1/stage1.S @@ -184,8 +184,11 @@ lba_mode: movl ABS(stage2_sector), %ebx + /* check for the geometry */ +#ifdef NO_BUGGY_BIOS_IN_THE_WORLD cmpl %ecx, %ebx jge geometry_error +#endif /* NO_BUGGY_BIOS_IN_THE_WORLD */ /* the size and the reserved byte */ movw $0x0010, (%si) diff --git a/stage2/bios.c b/stage2/bios.c index 425de916d..d9adfae1d 100644 --- a/stage2/bios.c +++ b/stage2/bios.c @@ -60,9 +60,14 @@ biosdisk (int read, int drive, struct geometry *geometry, unsigned long buffer; unsigned long long block; } dap; - + + /* XXX: Don't check the geometry by default, because some buggy + BIOSes don't return the number of total sectors correctly, + even if they have working LBA support. Hell. */ +#ifdef NO_BUGGY_BIOS_IN_THE_WORLD if (sector >= geometry->total_sectors) return BIOSDISK_ERROR_GEOMETRY; +#endif /* NO_BUGGY_BIOS_IN_THE_WORLD */ /* FIXME: sizeof (DAP) must be 0x10. Should assert that the compiler can't add any padding. */ diff --git a/stage2/start.S b/stage2/start.S index 8fb021cf5..f44cc36c5 100644 --- a/stage2/start.S +++ b/stage2/start.S @@ -1,7 +1,7 @@ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 1996 Erich Boleyn - * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 1999,2000 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -96,8 +96,10 @@ lba_mode: movl (%di), %ebx /* check for the geometry */ +#ifdef NO_BUGGY_BIOS_IN_THE_WORLD cmpl %ecx, %ebx jge geometry_error +#endif /* NO_BUGGY_BIOS_IN_THE_WORLD */ /* the maximum is limited to 0x7f because of Phoenix EDD */ xorl %eax, %eax